diff options
Diffstat (limited to 'Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp')
-rw-r--r-- | Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp index 1f48ee9..a5234d9 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp @@ -26,6 +26,7 @@ #include "JSClass1.h" #include "JSClass2.h" +#include "JSDOMStringList.h" #include "ScriptExecutionContext.h" #include <runtime/JSLock.h> #include <wtf/MainThread.h> @@ -110,6 +111,24 @@ bool JSTestCallback::callbackWithClass2Param(Class2* class2Param, const String& return !raisedException; } +bool JSTestCallback::callbackWithStringList(DOMStringList* listParam) +{ + if (!canInvokeCallback()) + return true; + + RefPtr<JSTestCallback> protect(this); + + JSLock lock(SilenceAssertionsOnly); + + ExecState* exec = m_data->globalObject()->globalExec(); + MarkedArgumentBuffer args; + args.append(toJS(exec, listParam)); + + bool raisedException = false; + m_data->invokeCallback(args, &raisedException); + return !raisedException; +} + } #endif // ENABLE(DATABASE) |