WebAudio JSC-related fixes
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Mar 2012 07:59:24 +0000 (07:59 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Mar 2012 07:59:24 +0000 (07:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80299

Reviewed by Adam Barth.

* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
Wrap the audio context in a DOM wrapper.
* webaudio/AudioContext.idl: No need to protect EventTarget by V8
guards, I think.
* webaudio/JavaScriptAudioNode.idl: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109870 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSAudioContextCustom.cpp
Source/WebCore/webaudio/AudioContext.idl
Source/WebCore/webaudio/JavaScriptAudioNode.idl

index 9280586..9d99825 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-05  Philippe Normand  <pnormand@igalia.com>
+
+        WebAudio JSC-related fixes
+        https://bugs.webkit.org/show_bug.cgi?id=80299
+
+        Reviewed by Adam Barth.
+
+        * bindings/js/JSAudioContextCustom.cpp:
+        (WebCore::JSAudioContextConstructor::constructJSAudioContext):
+        Wrap the audio context in a DOM wrapper.
+        * webaudio/AudioContext.idl: No need to protect EventTarget by V8
+        guards, I think.
+        * webaudio/JavaScriptAudioNode.idl: Ditto.
+
 2012-03-05  Kishore Bolisetty  <kbolisetty@innominds.com>
 
         Element not fully repainted after application and removal of transform
index f8fab62..64e44e6 100644 (file)
@@ -101,7 +101,7 @@ EncodedJSValue JSC_HOST_CALL JSAudioContextConstructor::constructJSAudioContext(
     if (!audioContext.get())
         return throwVMError(exec, createReferenceError(exec, "Error creating AudioContext"));
 
-    return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), audioContext.get())));
+    return JSValue::encode(CREATE_DOM_WRAPPER(exec, jsConstructor->globalObject(), AudioContext, audioContext.get()));
 }
 
 } // namespace WebCore
index 6f02329..c1ff8c6 100644 (file)
@@ -30,9 +30,7 @@ module webaudio {
         CustomConstructor,
         ConstructorParameters=0,
         JSCustomMarkFunction,
-#if defined(V8_BINDING) && V8_BINDING
         EventTarget
-#endif        
     ] AudioContext {
         // All rendered audio ultimately connects to destination, which represents the audio hardware.
         readonly attribute AudioDestinationNode destination;
index 83e3e62..97da0c1 100644 (file)
@@ -28,9 +28,7 @@ module audio {
         Conditional=WEB_AUDIO,
         JSGenerateToJSObject,
         JSCustomMarkFunction,
-#if defined(V8_BINDING) && V8_BINDING
         EventTarget
-#endif
     ] JavaScriptAudioNode : AudioNode {
         // Rendering callback
         attribute EventListener onaudioprocess;