CTTE autogenerated bindings code
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2015 02:13:55 +0000 (02:13 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2015 02:13:55 +0000 (02:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=151682

Reviewed by Darin Adler.

Make sure that JS bindings pass a reference to the object when calling static member functions.

* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::getGamepads):
* Modules/gamepad/NavigatorGamepad.h:
* Modules/geolocation/NavigatorGeolocation.cpp:
(WebCore::NavigatorGeolocation::geolocation):
* Modules/geolocation/NavigatorGeolocation.h:
* Modules/mediasource/AudioTrackMediaSource.h:
(WebCore::AudioTrackMediaSource::sourceBuffer):
* Modules/mediasource/TextTrackMediaSource.h:
(WebCore::TextTrackMediaSource::sourceBuffer):
* Modules/mediasource/VideoTrackMediaSource.h:
(WebCore::VideoTrackMediaSource::sourceBuffer):
* Modules/mediastream/HTMLMediaElementMediaStream.cpp:
(WebCore::HTMLMediaElementMediaStream::srcObject):
(WebCore::HTMLMediaElementMediaStream::setSrcObject):
* Modules/mediastream/HTMLMediaElementMediaStream.h:
* Modules/mediastream/NavigatorMediaDevices.cpp:
(WebCore::NavigatorMediaDevices::mediaDevices):
* Modules/mediastream/NavigatorMediaDevices.h:
* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::webkitNotifications):
* Modules/notifications/DOMWindowNotifications.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
* Modules/notifications/WorkerGlobalScopeNotifications.cpp:
(WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
* Modules/notifications/WorkerGlobalScopeNotifications.h:
* Modules/speech/DOMWindowSpeechSynthesis.cpp:
(WebCore::DOMWindowSpeechSynthesis::speechSynthesis):
* Modules/speech/DOMWindowSpeechSynthesis.h:
* Modules/webdatabase/DOMWindowWebDatabase.cpp:
(WebCore::DOMWindowWebDatabase::openDatabase):
* Modules/webdatabase/DOMWindowWebDatabase.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
* testing/Internals.cpp:
(WebCore::Internals::enableMockSpeechSynthesizer):

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

24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp
Source/WebCore/Modules/gamepad/NavigatorGamepad.h
Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp
Source/WebCore/Modules/geolocation/NavigatorGeolocation.h
Source/WebCore/Modules/mediasource/AudioTrackMediaSource.h
Source/WebCore/Modules/mediasource/TextTrackMediaSource.h
Source/WebCore/Modules/mediasource/VideoTrackMediaSource.h
Source/WebCore/Modules/mediastream/HTMLMediaElementMediaStream.cpp
Source/WebCore/Modules/mediastream/HTMLMediaElementMediaStream.h
Source/WebCore/Modules/mediastream/NavigatorMediaDevices.cpp
Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h
Source/WebCore/Modules/notifications/DOMWindowNotifications.cpp
Source/WebCore/Modules/notifications/DOMWindowNotifications.h
Source/WebCore/Modules/notifications/Notification.cpp
Source/WebCore/Modules/notifications/WorkerGlobalScopeNotifications.cpp
Source/WebCore/Modules/notifications/WorkerGlobalScopeNotifications.h
Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp
Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.h
Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp
Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/testing/Internals.cpp

index 1117fe9..03b9329 100644 (file)
@@ -1,3 +1,51 @@
+2015-11-30  Anders Carlsson  <andersca@apple.com>
+
+        CTTE autogenerated bindings code
+        https://bugs.webkit.org/show_bug.cgi?id=151682
+
+        Reviewed by Darin Adler.
+
+        Make sure that JS bindings pass a reference to the object when calling static member functions.
+
+        * Modules/gamepad/NavigatorGamepad.cpp:
+        (WebCore::NavigatorGamepad::getGamepads):
+        * Modules/gamepad/NavigatorGamepad.h:
+        * Modules/geolocation/NavigatorGeolocation.cpp:
+        (WebCore::NavigatorGeolocation::geolocation):
+        * Modules/geolocation/NavigatorGeolocation.h:
+        * Modules/mediasource/AudioTrackMediaSource.h:
+        (WebCore::AudioTrackMediaSource::sourceBuffer):
+        * Modules/mediasource/TextTrackMediaSource.h:
+        (WebCore::TextTrackMediaSource::sourceBuffer):
+        * Modules/mediasource/VideoTrackMediaSource.h:
+        (WebCore::VideoTrackMediaSource::sourceBuffer):
+        * Modules/mediastream/HTMLMediaElementMediaStream.cpp:
+        (WebCore::HTMLMediaElementMediaStream::srcObject):
+        (WebCore::HTMLMediaElementMediaStream::setSrcObject):
+        * Modules/mediastream/HTMLMediaElementMediaStream.h:
+        * Modules/mediastream/NavigatorMediaDevices.cpp:
+        (WebCore::NavigatorMediaDevices::mediaDevices):
+        * Modules/mediastream/NavigatorMediaDevices.h:
+        * Modules/notifications/DOMWindowNotifications.cpp:
+        (WebCore::DOMWindowNotifications::webkitNotifications):
+        * Modules/notifications/DOMWindowNotifications.h:
+        * Modules/notifications/Notification.cpp:
+        (WebCore::Notification::Notification):
+        * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
+        (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
+        * Modules/notifications/WorkerGlobalScopeNotifications.h:
+        * Modules/speech/DOMWindowSpeechSynthesis.cpp:
+        (WebCore::DOMWindowSpeechSynthesis::speechSynthesis):
+        * Modules/speech/DOMWindowSpeechSynthesis.h:
+        * Modules/webdatabase/DOMWindowWebDatabase.cpp:
+        (WebCore::DOMWindowWebDatabase::openDatabase):
+        * Modules/webdatabase/DOMWindowWebDatabase.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        (GenerateParametersCheck):
+        * testing/Internals.cpp:
+        (WebCore::Internals::enableMockSpeechSynthesizer):
+
 2015-11-30  Katlyn Graff  <kgraff@apple.com>
 
         Rename ActiveDOMObject/DOMWindow PageCacheSuspension code to support more reasons for suspension
index 94f445e..6e6038d 100644 (file)
@@ -81,9 +81,9 @@ Ref<Gamepad> NavigatorGamepad::gamepadFromPlatformGamepad(PlatformGamepad& platf
     return *m_gamepads[index];
 }
 
-const Vector<RefPtr<Gamepad>>& NavigatorGamepad::getGamepads(Navigator* navigator)
+const Vector<RefPtr<Gamepad>>& NavigatorGamepad::getGamepads(Navigator& navigator)
 {
-    return NavigatorGamepad::from(navigator)->gamepads();
+    return NavigatorGamepad::from(&navigator)->gamepads();
 }
 
 const Vector<RefPtr<Gamepad>>& NavigatorGamepad::gamepads()
index bccc879..319dd39 100644 (file)
@@ -46,7 +46,7 @@ public:
 
     // The array of Gamepads might be sparse.
     // Null checking each entry is necessary.
-    static const Vector<RefPtr<Gamepad>>& getGamepads(Navigator*);
+    static const Vector<RefPtr<Gamepad>>& getGamepads(Navigator&);
 
     double navigationStart() const { return m_navigationStart; }
 
index 7f95ec5..ffa00c2 100644 (file)
@@ -66,9 +66,9 @@ void NavigatorGeolocation::resetAllGeolocationPermission()
 }
 #endif // PLATFORM(IOS)
 
-Geolocation* NavigatorGeolocation::geolocation(Navigator* navigator)
+Geolocation* NavigatorGeolocation::geolocation(Navigator& navigator)
 {
-    return NavigatorGeolocation::from(navigator)->geolocation();
+    return NavigatorGeolocation::from(&navigator)->geolocation();
 }
 
 Geolocation* NavigatorGeolocation::geolocation() const
index 2037ea9..f68d091 100644 (file)
@@ -38,7 +38,7 @@ public:
     virtual ~NavigatorGeolocation();
     static NavigatorGeolocation* from(Navigator*);
 
-    static Geolocation* geolocation(Navigator*);
+    static Geolocation* geolocation(Navigator&);
     Geolocation* geolocation() const;
 
 #if PLATFORM(IOS)
index d9be811..8cf5016 100644 (file)
@@ -36,7 +36,7 @@ class SourceBuffer;
 
 class AudioTrackMediaSource {
 public:
-    static SourceBuffer* sourceBuffer(AudioTrack* track) { return track->sourceBuffer(); }
+    static SourceBuffer* sourceBuffer(AudioTrack& track) { return track.sourceBuffer(); }
 };
 
 }
index f0595e5..a9af7db 100644 (file)
@@ -36,7 +36,7 @@ class SourceBuffer;
 
 class TextTrackMediaSource {
 public:
-    static SourceBuffer* sourceBuffer(TextTrack* track) { return track->sourceBuffer(); }
+    static SourceBuffer* sourceBuffer(TextTrack& track) { return track.sourceBuffer(); }
 };
 
 }
index f7f5f64..ce00e07 100644 (file)
@@ -36,7 +36,7 @@ class SourceBuffer;
 
 class VideoTrackMediaSource {
 public:
-    static SourceBuffer* sourceBuffer(VideoTrack* track) { return track->sourceBuffer(); }
+    static SourceBuffer* sourceBuffer(VideoTrack& track) { return track.sourceBuffer(); }
 };
 
 }
index d2c9b93..9f9fdb1 100644 (file)
 
 namespace WebCore {
 
-MediaStream* HTMLMediaElementMediaStream::srcObject(HTMLMediaElement* mediaElement)
+MediaStream* HTMLMediaElementMediaStream::srcObject(HTMLMediaElement& mediaElement)
 {
-    ASSERT(mediaElement);
-    return mediaElement->srcObject();
+    return mediaElement.srcObject();
 }
 
-void HTMLMediaElementMediaStream::setSrcObject(HTMLMediaElement* mediaElement, MediaStream* mediaStream)
+void HTMLMediaElementMediaStream::setSrcObject(HTMLMediaElement& mediaElement, MediaStream* mediaStream)
 {
-    ASSERT(mediaElement);
-    mediaElement->setSrcObject(mediaStream);
+    mediaElement.setSrcObject(mediaStream);
 }
 
 } // namespace WebCore
index 83c5212..544c0fc 100644 (file)
@@ -37,8 +37,8 @@ class MediaStream;
 
 class HTMLMediaElementMediaStream {
 public:
-    static MediaStream* srcObject(HTMLMediaElement*);
-    static void setSrcObject(HTMLMediaElement*, MediaStream*);
+    static MediaStream* srcObject(HTMLMediaElement&);
+    static void setSrcObject(HTMLMediaElement&, MediaStream*);
 };
 
 } // namespace WebCore
index 71f02d9..3aeeb47 100644 (file)
@@ -60,9 +60,9 @@ NavigatorMediaDevices* NavigatorMediaDevices::from(Navigator* navigator)
     return supplement;
 }
 
-MediaDevices* NavigatorMediaDevices::mediaDevices(Navigator* navigator)
+MediaDevices* NavigatorMediaDevices::mediaDevices(Navigator& navigator)
 {
-    return NavigatorMediaDevices::from(navigator)->mediaDevices();
+    return NavigatorMediaDevices::from(&navigator)->mediaDevices();
 }
 
 MediaDevices* NavigatorMediaDevices::mediaDevices() const
index 35a0499..38af302 100644 (file)
@@ -48,7 +48,7 @@ public:
     virtual ~NavigatorMediaDevices();
     static NavigatorMediaDevices* from(Navigator*);
 
-    static MediaDevices* mediaDevices(Navigator*);
+    static MediaDevices* mediaDevices(Navigator&);
     MediaDevices* mediaDevices() const;
 
 private:
index 83b99ae..922231f 100644 (file)
@@ -63,9 +63,9 @@ DOMWindowNotifications* DOMWindowNotifications::from(DOMWindow* window)
     return supplement;
 }
 
-NotificationCenter* DOMWindowNotifications::webkitNotifications(DOMWindow* window)
+NotificationCenter* DOMWindowNotifications::webkitNotifications(DOMWindow& window)
 {
-    return DOMWindowNotifications::from(window)->webkitNotifications();
+    return DOMWindowNotifications::from(&window)->webkitNotifications();
 }
 
 void DOMWindowNotifications::disconnectFrameForDocumentSuspension()
index e9d1bfe..ccc768d 100644 (file)
@@ -43,7 +43,7 @@ public:
     explicit DOMWindowNotifications(DOMWindow*);
     virtual ~DOMWindowNotifications();
 
-    static NotificationCenter* webkitNotifications(DOMWindow*);
+    static NotificationCenter* webkitNotifications(DOMWindow&);
     static DOMWindowNotifications* from(DOMWindow*);
 
     virtual void disconnectFrameForDocumentSuspension() override;
index bfeaab9..2738056 100644 (file)
@@ -86,7 +86,7 @@ Notification::Notification(ScriptExecutionContext& context, const String& title)
     , m_state(Idle)
     , m_taskTimer(std::make_unique<Timer>(*this, &Notification::taskTimerFired))
 {
-    m_notificationCenter = DOMWindowNotifications::webkitNotifications(downcast<Document>(context).domWindow());
+    m_notificationCenter = DOMWindowNotifications::webkitNotifications(*downcast<Document>(context).domWindow());
     
     ASSERT(m_notificationCenter->client());
     m_taskTimer->startOneShot(0);
index 4e1e675..b224fae 100644 (file)
@@ -61,9 +61,9 @@ WorkerGlobalScopeNotifications* WorkerGlobalScopeNotifications::from(WorkerGloba
     return supplement;
 }
 
-NotificationCenter* WorkerGlobalScopeNotifications::webkitNotifications(WorkerGlobalScope* context)
+NotificationCenter* WorkerGlobalScopeNotifications::webkitNotifications(WorkerGlobalScope& context)
 {
-    return WorkerGlobalScopeNotifications::from(context)->webkitNotifications();
+    return WorkerGlobalScopeNotifications::from(&context)->webkitNotifications();
 }
 
 NotificationCenter* WorkerGlobalScopeNotifications::webkitNotifications()
index 7da529b..90ba511 100644 (file)
@@ -42,7 +42,7 @@ public:
     explicit WorkerGlobalScopeNotifications(WorkerGlobalScope*);
     virtual ~WorkerGlobalScopeNotifications();
 
-    static NotificationCenter* webkitNotifications(WorkerGlobalScope*);
+    static NotificationCenter* webkitNotifications(WorkerGlobalScope&);
     static WorkerGlobalScopeNotifications* from(WorkerGlobalScope*);
 
 private:
index c377b9b..697f4e6 100644 (file)
@@ -65,9 +65,9 @@ DOMWindowSpeechSynthesis* DOMWindowSpeechSynthesis::from(DOMWindow* window)
 }
 
 // static
-SpeechSynthesis* DOMWindowSpeechSynthesis::speechSynthesis(DOMWindow* window)
+SpeechSynthesis* DOMWindowSpeechSynthesis::speechSynthesis(DOMWindow& window)
 {
-    return DOMWindowSpeechSynthesis::from(window)->speechSynthesis();
+    return DOMWindowSpeechSynthesis::from(&window)->speechSynthesis();
 }
 
 SpeechSynthesis* DOMWindowSpeechSynthesis::speechSynthesis()
index 15677e5..423231d 100644 (file)
@@ -41,7 +41,7 @@ public:
     explicit DOMWindowSpeechSynthesis(DOMWindow*);
     virtual ~DOMWindowSpeechSynthesis();
     
-    WEBCORE_EXPORT static SpeechSynthesis* speechSynthesis(DOMWindow*);
+    WEBCORE_EXPORT static SpeechSynthesis* speechSynthesis(DOMWindow&);
     static DOMWindowSpeechSynthesis* from(DOMWindow*);
     
 private:
index 1217e5b..5b9fdb3 100644 (file)
 
 namespace WebCore {
 
-RefPtr<Database> DOMWindowWebDatabase::openDatabase(DOMWindow* window, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec)
+RefPtr<Database> DOMWindowWebDatabase::openDatabase(DOMWindow& window, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec)
 {
-    if (!window->isCurrentlyDisplayedInFrame())
+    if (!window.isCurrentlyDisplayedInFrame())
         return nullptr;
 
     RefPtr<Database> database = nullptr;
     DatabaseManager& dbManager = DatabaseManager::singleton();
     DatabaseError error = DatabaseError::None;
-    if (dbManager.isAvailable() && window->document()->securityOrigin()->canAccessDatabase(window->document()->topOrigin())) {
-        database = dbManager.openDatabase(window->document(), name, version, displayName, estimatedSize, creationCallback, error);
+    if (dbManager.isAvailable() && window.document()->securityOrigin()->canAccessDatabase(window.document()->topOrigin())) {
+        database = dbManager.openDatabase(window.document(), name, version, displayName, estimatedSize, creationCallback, error);
         ASSERT(database || error != DatabaseError::None);
         ec = DatabaseManager::exceptionCodeForDatabaseError(error);
     } else
index bfd71a8..656f883 100644 (file)
@@ -42,7 +42,7 @@ class Frame;
 
 class DOMWindowWebDatabase {
 public:
-    static RefPtr<Database> openDatabase(DOMWindow*, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode&);
+    static RefPtr<Database> openDatabase(DOMWindow&, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode&);
 
 private:
     DOMWindowWebDatabase() { };
index b132a07..bfbc8b6 100644 (file)
@@ -2435,7 +2435,7 @@ sub GenerateImplementation
                         my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
                         $implIncludes{"${implementedBy}.h"} = 1;
                         $functionName = "WebCore::${implementedBy}::${functionName}";
-                        unshift(@arguments, "&impl") if !$attribute->isStatic;
+                        unshift(@arguments, "impl") if !$attribute->isStatic;
                     } elsif ($attribute->isStatic) {
                         $functionName = "${interfaceName}::${functionName}";
                     } else {
@@ -2777,7 +2777,7 @@ sub GenerateImplementation
                     if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) {
                         my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
                         AddToImplIncludes("${implementedBy}.h", $attribute->signature->extendedAttributes->{"Conditional"});
-                        unshift(@arguments, "&impl") if !$attribute->isStatic;
+                        unshift(@arguments, "impl") if !$attribute->isStatic;
                         $functionName = "WebCore::${implementedBy}::${functionName}";
                     } elsif ($attribute->isStatic) {
                         $functionName = "${interfaceName}::${functionName}";
@@ -3296,7 +3296,7 @@ sub GenerateParametersCheck
     my $implementedBy = $function->signature->extendedAttributes->{"ImplementedBy"};
     if ($implementedBy) {
         AddToImplIncludes("${implementedBy}.h", $function->signature->extendedAttributes->{"Conditional"});
-        unshift(@arguments, "&impl") if !$function->isStatic;
+        unshift(@arguments, "impl") if !$function->isStatic;
         $functionName = "WebCore::${implementedBy}::${functionImplementationName}";
     } elsif ($function->isStatic) {
         $functionName = "${interfaceName}::${functionImplementationName}";
index 3297946..5fa9635 100644 (file)
@@ -556,7 +556,7 @@ EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* state, JSObject* slotB
         return throwGetterTypeError(*state, "TestInterface", "supplementalStr1");
     }
     auto& impl = castedThis->wrapped();
-    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr1(&impl));
+    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr1(impl));
     return JSValue::encode(result);
 }
 
@@ -575,7 +575,7 @@ EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* state, JSObject* slotB
         return throwGetterTypeError(*state, "TestInterface", "supplementalStr2");
     }
     auto& impl = castedThis->wrapped();
-    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr2(&impl));
+    JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr2(impl));
     return JSValue::encode(result);
 }
 
@@ -606,7 +606,7 @@ EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* state, JSObject* slotB
         return throwGetterTypeError(*state, "TestInterface", "supplementalNode");
     }
     auto& impl = castedThis->wrapped();
-    JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalNode(&impl)));
+    JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalNode(impl)));
     return JSValue::encode(result);
 }
 
@@ -741,7 +741,7 @@ void setJSTestInterfaceSupplementalStr2(ExecState* state, JSObject* baseObject,
     String nativeValue = value.toString(state)->value(state);
     if (UNLIKELY(state->hadException()))
         return;
-    WebCore::TestSupplemental::setSupplementalStr2(&impl, nativeValue);
+    WebCore::TestSupplemental::setSupplementalStr2(impl, nativeValue);
 }
 
 #endif
@@ -777,7 +777,7 @@ void setJSTestInterfaceSupplementalNode(ExecState* state, JSObject* baseObject,
     Node* nativeValue = JSNode::toWrapped(value);
     if (UNLIKELY(state->hadException()))
         return;
-    WebCore::TestSupplemental::setSupplementalNode(&impl, nativeValue);
+    WebCore::TestSupplemental::setSupplementalNode(impl, nativeValue);
 }
 
 #endif
@@ -862,7 +862,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1
         return throwThisTypeError(*state, "TestInterface", "supplementalMethod1");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
     auto& impl = castedThis->wrapped();
-    WebCore::TestSupplemental::supplementalMethod1(&impl);
+    WebCore::TestSupplemental::supplementalMethod1(impl);
     return JSValue::encode(jsUndefined());
 }
 
@@ -889,7 +889,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2
     TestObj* objArg = JSTestObj::toWrapped(state->argument(1));
     if (UNLIKELY(state->hadException()))
         return JSValue::encode(jsUndefined());
-    JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalMethod2(&impl, scriptContext, strArg, objArg, ec)));
+    JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalMethod2(impl, scriptContext, strArg, objArg, ec)));
 
     setDOMException(state, ec);
     return JSValue::encode(result);
index 5e42a79..6c156e4 100644 (file)
@@ -948,7 +948,7 @@ void Internals::enableMockSpeechSynthesizer()
     Document* document = contextDocument();
     if (!document || !document->domWindow())
         return;
-    SpeechSynthesis* synthesis = DOMWindowSpeechSynthesis::speechSynthesis(document->domWindow());
+    SpeechSynthesis* synthesis = DOMWindowSpeechSynthesis::speechSynthesis(*document->domWindow());
     if (!synthesis)
         return;