diff options
Diffstat (limited to 'Source/WebCore/bindings/scripts/test/JS')
5 files changed, 21 insertions, 0 deletions
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp index 069b8ae..1f48ee9 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp @@ -56,6 +56,23 @@ JSTestCallback::~JSTestCallback() // Functions +bool JSTestCallback::callbackWithNoParam() +{ + if (!canInvokeCallback()) + return true; + + RefPtr<JSTestCallback> protect(this); + + JSLock lock(SilenceAssertionsOnly); + + ExecState* exec = m_data->globalObject()->globalExec(); + MarkedArgumentBuffer args; + + bool raisedException = false; + m_data->invokeCallback(args, &raisedException); + return !raisedException; +} + bool JSTestCallback::callbackWithClass1Param(Class1* class1Param) { if (!canInvokeCallback()) diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h index ae91a6c..ba3559c 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h @@ -40,6 +40,7 @@ public: virtual ~JSTestCallback(); // Functions + virtual bool callbackWithNoParam(); virtual bool callbackWithClass1Param(Class1* class1Param); virtual bool callbackWithClass2Param(Class2* class2Param, const String& strArg); COMPILE_ASSERT(false) virtual int callbackWithNonBoolReturnType(Class3* class3Param); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp index 8e71df1..684f587 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp @@ -166,6 +166,7 @@ JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, const Iden JSTestInterface* domObject = static_cast<JSTestInterface*>(asObject(slotBase)); return JSTestInterface::getConstructor(exec, domObject->globalObject()); } + JSValue JSTestInterface::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { return getDOMConstructor<JSTestInterfaceConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp index e505ed2..f1c09b5 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp @@ -162,6 +162,7 @@ JSValue jsTestMediaQueryListListenerConstructor(ExecState* exec, JSValue slotBas JSTestMediaQueryListListener* domObject = static_cast<JSTestMediaQueryListListener*>(asObject(slotBase)); return JSTestMediaQueryListListener::getConstructor(exec, domObject->globalObject()); } + JSValue JSTestMediaQueryListListener::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { return getDOMConstructor<JSTestMediaQueryListListenerConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp index c4c77ee..9d446a2 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp @@ -607,6 +607,7 @@ JSValue jsTestObjConstructor(ExecState* exec, JSValue slotBase, const Identifier JSTestObj* domObject = static_cast<JSTestObj*>(asObject(slotBase)); return JSTestObj::getConstructor(exec, domObject->globalObject()); } + void JSTestObj::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { lookupPut<JSTestObj, Base>(exec, propertyName, value, &JSTestObjTable, this, slot); |