2009-07-13 John Gregg <johnnyg@google.com>
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jul 2009 09:31:06 +0000 (09:31 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jul 2009 09:31:06 +0000 (09:31 +0000)
        Reviewed by David Levin.

        Correct the logic to determine if a V8 callback returns a value.
        https://bugs.webkit.org/show_bug.cgi?id=27155

        * bindings/v8/custom/V8CustomVoidCallback.cpp:
        (WebCore::invokeCallback):
        - Don't crash if result.IsEmpty().

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

WebCore/ChangeLog
WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp

index f5f017f9e7e67f973697f85e16ae40bbfd87ba8f..55cefb84bca69cd227f285849c35e50340eb764c 100644 (file)
@@ -1,3 +1,14 @@
+2009-07-13  John Gregg  <johnnyg@google.com>
+
+        Reviewed by David Levin.
+
+        Correct the logic to determine if a V8 callback returns a value.
+        https://bugs.webkit.org/show_bug.cgi?id=27155
+
+        * bindings/v8/custom/V8CustomVoidCallback.cpp:
+        (WebCore::invokeCallback):
+        - Don't crash if result.IsEmpty().
+
 2009-07-13  Drew Wilson  <atwilson@google.com>
 
         Reviewed by David Levin.
index 5df6d09cf426c41a577ffc221b0e253af8eff960..9067ce38f3092e53bf2252f8872e24fe43483ae4 100644 (file)
@@ -89,7 +89,7 @@ bool invokeCallback(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8
 
     v8::Handle<v8::Value> result = proxy->callFunction(callbackFunction, thisObject, argc, argv);
 
-    callbackReturnValue = result.IsEmpty() && result->IsBoolean() && result->BooleanValue();
+    callbackReturnValue = !result.IsEmpty() && result->IsBoolean() && result->BooleanValue();
 
     return exceptionCatcher.HasCaught();
 }