Title: [189143] trunk/Source/WebCore
Revision
189143
Author
a...@apple.com
Date
2015-08-28 22:45:41 -0700 (Fri, 28 Aug 2015)

Log Message

Update bindings test results after
https://bugs.webkit.org/show_bug.cgi?id=148591

JSCallbackData::invokeCallback() should return the Exception to the caller

* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
(WebCore::JSTestCallbackFunction::callbackWithNoParam):
(WebCore::JSTestCallbackFunction::callbackWithArrayParam):
(WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallbackFunction::callbackWithStringList):
(WebCore::JSTestCallbackFunction::callbackWithBoolean):
(WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (189142 => 189143)


--- trunk/Source/WebCore/ChangeLog	2015-08-29 05:05:24 UTC (rev 189142)
+++ trunk/Source/WebCore/ChangeLog	2015-08-29 05:45:41 UTC (rev 189143)
@@ -1,3 +1,25 @@
+2015-08-28  Alexey Proskuryakov  <a...@apple.com>
+
+        Update bindings test results after
+        https://bugs.webkit.org/show_bug.cgi?id=148591
+
+        JSCallbackData::invokeCallback() should return the Exception to the caller
+
+        * bindings/scripts/test/JS/JSTestCallback.cpp:
+        (WebCore::JSTestCallback::callbackWithNoParam):
+        (WebCore::JSTestCallback::callbackWithArrayParam):
+        (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
+        (WebCore::JSTestCallback::callbackWithStringList):
+        (WebCore::JSTestCallback::callbackWithBoolean):
+        (WebCore::JSTestCallback::callbackRequiresThisToPass):
+        * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
+        (WebCore::JSTestCallbackFunction::callbackWithNoParam):
+        (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
+        (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
+        (WebCore::JSTestCallbackFunction::callbackWithStringList):
+        (WebCore::JSTestCallbackFunction::callbackWithBoolean):
+        (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
+
 2015-08-28  Chris Dumez  <cdu...@apple.com>
 
         JSCallbackData::invokeCallback() should return the Exception to the caller

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (189142 => 189143)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2015-08-29 05:05:24 UTC (rev 189142)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2015-08-29 05:45:41 UTC (rev 189143)
@@ -129,9 +129,11 @@
     ExecState* exec = m_data->globalObject()->globalExec();
     MarkedArgumentBuffer args;
 
-    bool raisedException = false;
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithNoParam"), &raisedException);
-    return !raisedException;
+    NakedPtr<Exception> returnedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithNoParam"), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallback::callbackWithArrayParam(RefPtr<Float32Array> arrayParam)
@@ -147,9 +149,11 @@
     MarkedArgumentBuffer args;
     args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(arrayParam)));
 
-    bool raisedException = false;
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithArrayParam"), &raisedException);
-    return !raisedException;
+    NakedPtr<Exception> returnedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithArrayParam"), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallback::callbackWithSerializedScriptValueParam(PassRefPtr<SerializedScriptValue> srzParam, const String& strArg)
@@ -166,9 +170,11 @@
     args.append(srzParam ? srzParam->deserialize(exec, castedThis->globalObject(), 0) : jsNull());
     args.append(jsStringWithCache(exec, strArg));
 
-    bool raisedException = false;
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithSerializedScriptValueParam"), &raisedException);
-    return !raisedException;
+    NakedPtr<Exception> returnedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithSerializedScriptValueParam"), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallback::callbackWithStringList(PassRefPtr<DOMStringList> listParam)
@@ -184,9 +190,11 @@
     MarkedArgumentBuffer args;
     args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(listParam)));
 
-    bool raisedException = false;
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithStringList"), &raisedException);
-    return !raisedException;
+    NakedPtr<Exception> returnedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithStringList"), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallback::callbackWithBoolean(bool boolParam)
@@ -202,9 +210,11 @@
     MarkedArgumentBuffer args;
     args.append(jsBoolean(boolParam));
 
-    bool raisedException = false;
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithBoolean"), &raisedException);
-    return !raisedException;
+    NakedPtr<Exception> returnedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackWithBoolean"), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallback::callbackRequiresThisToPass(int longParam, TestNode* testNodeParam)
@@ -221,9 +231,11 @@
     args.append(jsNumber(longParam));
     args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(testNodeParam)));
 
-    bool raisedException = false;
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackRequiresThisToPass"), &raisedException);
-    return !raisedException;
+    NakedPtr<Exception> returnedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(exec, "callbackRequiresThisToPass"), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 }

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (189142 => 189143)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2015-08-29 05:05:24 UTC (rev 189142)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp	2015-08-29 05:45:41 UTC (rev 189143)
@@ -74,10 +74,12 @@
     ExecState* exec = m_data->globalObject()->globalExec();
     MarkedArgumentBuffer args;
 
-    bool raisedException = false;
+    NakedPtr<Exception> returnedException;
     UNUSED_PARAM(exec);
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
-    return !raisedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallbackFunction::callbackWithArrayParam(RefPtr<Float32Array> arrayParam)
@@ -93,10 +95,12 @@
     MarkedArgumentBuffer args;
     args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(arrayParam)));
 
-    bool raisedException = false;
+    NakedPtr<Exception> returnedException;
     UNUSED_PARAM(exec);
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
-    return !raisedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallbackFunction::callbackWithSerializedScriptValueParam(PassRefPtr<SerializedScriptValue> srzParam, const String& strArg)
@@ -113,10 +117,12 @@
     args.append(srzParam ? srzParam->deserialize(exec, castedThis->globalObject(), 0) : jsNull());
     args.append(jsStringWithCache(exec, strArg));
 
-    bool raisedException = false;
+    NakedPtr<Exception> returnedException;
     UNUSED_PARAM(exec);
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
-    return !raisedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallbackFunction::callbackWithStringList(PassRefPtr<DOMStringList> listParam)
@@ -132,10 +138,12 @@
     MarkedArgumentBuffer args;
     args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(listParam)));
 
-    bool raisedException = false;
+    NakedPtr<Exception> returnedException;
     UNUSED_PARAM(exec);
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
-    return !raisedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallbackFunction::callbackWithBoolean(bool boolParam)
@@ -151,10 +159,12 @@
     MarkedArgumentBuffer args;
     args.append(jsBoolean(boolParam));
 
-    bool raisedException = false;
+    NakedPtr<Exception> returnedException;
     UNUSED_PARAM(exec);
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
-    return !raisedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 bool JSTestCallbackFunction::callbackRequiresThisToPass(int longParam, TestNode* testNodeParam)
@@ -171,10 +181,12 @@
     args.append(jsNumber(longParam));
     args.append(toJS(exec, m_data->globalObject(), WTF::getPtr(testNodeParam)));
 
-    bool raisedException = false;
+    NakedPtr<Exception> returnedException;
     UNUSED_PARAM(exec);
-    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), &raisedException);
-    return !raisedException;
+    m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
+    if (returnedException)
+        reportException(exec, returnedException);
+    return !returnedException;
 }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to