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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189143
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-08-28 Alexey Proskuryakov <ap@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 <cdumez@apple.com>
JSCallbackData::invokeCallback() should return the Exception to the caller
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)
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)
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)
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)
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)
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;
}
}
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)
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)
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)
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)
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)
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;
}
}