summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp')
-rw-r--r--Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp b/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
index 9ce2e1af4..2ee81eb27 100644
--- a/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
@@ -28,14 +28,15 @@
#include "V8AudioContext.h"
-#include <wtf/ArrayBuffer.h>
#include "AudioBuffer.h"
#include "AudioContext.h"
+#include "BindingState.h"
#include "Frame.h"
#include "V8ArrayBuffer.h"
#include "V8AudioBuffer.h"
#include "V8Binding.h"
#include "V8Proxy.h"
+#include <wtf/ArrayBuffer.h>
namespace WebCore {
@@ -49,7 +50,7 @@ v8::Handle<v8::Value> V8AudioContext::constructorCallback(const v8::Arguments& a
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
+ Frame* frame = currentFrame(BindingState::instance());
if (!frame)
return V8Proxy::throwError(V8Proxy::ReferenceError, "AudioContext constructor associated frame is unavailable", args.GetIsolate());
@@ -64,7 +65,7 @@ v8::Handle<v8::Value> V8AudioContext::constructorCallback(const v8::Arguments& a
ExceptionCode ec = 0;
audioContext = AudioContext::create(document, ec);
if (ec)
- return throwError(ec, args.GetIsolate());
+ return V8Proxy::setDOMException(ec, args.GetIsolate());
if (!audioContext.get())
return V8Proxy::throwError(V8Proxy::SyntaxError, "audio resources unavailable for AudioContext construction", args.GetIsolate());
} else {
@@ -90,7 +91,7 @@ v8::Handle<v8::Value> V8AudioContext::constructorCallback(const v8::Arguments& a
ExceptionCode ec = 0;
audioContext = AudioContext::createOfflineContext(document, numberOfChannels, numberOfFrames, sampleRate, ec);
if (ec)
- return throwError(ec, args.GetIsolate());
+ return V8Proxy::setDOMException(ec, args.GetIsolate());
}
if (!audioContext.get())