[Windows] Unreviewed build fix after r156487.
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Sep 2013 23:16:07 +0000 (23:16 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Sep 2013 23:16:07 +0000 (23:16 +0000)
Add explicit casting needed by MSVC to compile this code. Much
of this could probably be removed when we move to VS2012 or newer.

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSEventListener.cpp
Source/WebCore/bindings/js/JSEventListener.h
Source/WebCore/bridge/jsc/BridgeJSC.cpp

index a6e52bdd165063a99aecd4288980c89150b269dc..9f85582b465a35ea3e909dd715599f7fe6145f6c 100644 (file)
@@ -1,3 +1,17 @@
+2013-09-26  Brent Fulgham  <bfulgham@apple.com>
+
+        [Windows] Unreviewed build fix after r156487.
+
+        Add explicit casting needed by MSVC to compile this code. Much
+        of this could probably be removed when we move to VS2012 or newer.
+
+        * bindings/js/JSEventListener.cpp:
+        (WebCore::JSEventListener::JSEventListener):
+        * bindings/js/JSEventListener.h:
+        (WebCore::JSEventListener::jsFunction):
+        * bridge/jsc/BridgeJSC.cpp:
+        (JSC::Bindings::Instance::createRuntimeObject):
+
 2013-09-26  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r156510.
index 9361511fd8a42d6b37cd35d72414d1a01855bccf..d914e303bd2764bf62b6110d99aa07ce68b1dcc5 100644 (file)
@@ -47,7 +47,7 @@ JSEventListener::JSEventListener(JSObject* function, JSObject* wrapper, bool isA
 {
     if (wrapper) {
         JSC::Heap::writeBarrier(wrapper, function);
-        m_jsFunction = function;
+        m_jsFunction = JSC::Weak<JSC::JSObject>(function);
     } else
         ASSERT(!function);
 #if ENABLE(INSPECTOR)
index ccf66254dff1bbada4d70da2211463606afa1177..0e7840722fe535100dd23f4da337eed3bbde300c 100644 (file)
@@ -85,7 +85,7 @@ namespace WebCore {
         if (!m_jsFunction) {
             JSC::JSObject* function = initializeJSFunction(scriptExecutionContext);
             JSC::Heap::writeBarrier(m_wrapper.get(), function);
-            m_jsFunction = function;
+            m_jsFunction = JSC::Weak<JSC::JSObject>(function);
         }
 
         // Verify that we have a valid wrapper protecting our function from
index d242501c1e5349b223804d45a35d2053e29ce85b..f8bcfbc0c75f6ae2363aa6a3361966c902bbd5a2 100644 (file)
@@ -82,7 +82,7 @@ JSObject* Instance::createRuntimeObject(ExecState* exec)
 
     JSLockHolder lock(exec);
     RuntimeObject* newObject = newRuntimeObject(exec);
-    m_runtimeObject = newObject;
+    m_runtimeObject = JSC::Weak<RuntimeObject>(newObject);
     m_rootObject->addRuntimeObject(exec->vm(), newObject);
     return newObject;
 }