summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/scripts/test
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/scripts/test')
-rw-r--r--Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp10
-rw-r--r--Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h2
-rw-r--r--Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp18
-rw-r--r--Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h3
-rw-r--r--Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp6
-rw-r--r--Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h6
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp19
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp8
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h8
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp8
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h8
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp8
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestObj.h8
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp8
-rw-r--r--Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h8
-rw-r--r--Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h2
-rw-r--r--Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm8
-rw-r--r--Source/WebCore/bindings/scripts/test/TestCallback.idl1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp29
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp5
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp5
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp5
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp5
25 files changed, 137 insertions, 53 deletions
diff --git a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp
index 62ebc3c..d12d0c3 100644
--- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp
+++ b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp
@@ -27,11 +27,13 @@
#include "Class1.h"
#include "Class2.h"
#include "Class3.h"
+#include "DOMStringList.h"
#include "KURL.h"
#include "TestCallback.h"
#include "WebDOMClass1.h"
#include "WebDOMClass2.h"
#include "WebDOMClass3.h"
+#include "WebDOMDOMStringList.h"
#include "WebDOMString.h"
#include "WebExceptionHandler.h"
#include "wtf/text/AtomicString.h"
@@ -115,6 +117,14 @@ int WebDOMTestCallback::callbackWithNonBoolReturnType(const WebDOMClass3& class3
return impl()->callbackWithNonBoolReturnType(toWebCore(class3Param));
}
+bool WebDOMTestCallback::callbackWithStringList(const WebDOMDOMStringList& listParam)
+{
+ if (!impl())
+ return false;
+
+ return impl()->callbackWithStringList(toWebCore(listParam));
+}
+
WebCore::TestCallback* toWebCore(const WebDOMTestCallback& wrapper)
{
return wrapper.impl();
diff --git a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
index 7a077e2..8d11a4b 100644
--- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
+++ b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
@@ -37,6 +37,7 @@ class WebDOMClass2;
class WebDOMClass3;
class WebDOMClass5;
class WebDOMClass6;
+class WebDOMDOMStringList;
class WebDOMTestCallback : public WebDOMObject {
public:
@@ -51,6 +52,7 @@ public:
bool callbackWithClass2Param(const WebDOMClass2& class2Param, const WebDOMString& strArg);
int callbackWithNonBoolReturnType(const WebDOMClass3& class3Param);
int customCallback(const WebDOMClass5& class5Param, const WebDOMClass6& class6Param);
+ bool callbackWithStringList(const WebDOMDOMStringList& listParam);
WebCore::TestCallback* impl() const;
diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
index 054dc38..b63f50e 100644
--- a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
+++ b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
@@ -37,6 +37,8 @@
#include "webkit/WebKitDOMClass2Private.h"
#include "webkit/WebKitDOMClass3.h"
#include "webkit/WebKitDOMClass3Private.h"
+#include "webkit/WebKitDOMDOMStringList.h"
+#include "webkit/WebKitDOMDOMStringListPrivate.h"
#include "webkit/WebKitDOMTestCallback.h"
#include "webkit/WebKitDOMTestCallbackPrivate.h"
#include "webkitdefines.h"
@@ -117,6 +119,22 @@ webkit_dom_test_callback_callback_with_non_bool_return_type(WebKitDOMTestCallbac
return res;
}
+gboolean
+webkit_dom_test_callback_callback_with_string_list(WebKitDOMTestCallback* self, WebKitDOMDOMStringList* list_param)
+{
+ g_return_val_if_fail(self, 0);
+ WebCore::JSMainThreadNullState state;
+ WebCore::TestCallback * item = WebKit::core(self);
+ g_return_val_if_fail(list_param, 0);
+ WebCore::DOMStringList * converted_list_param = NULL;
+ if (list_param != NULL) {
+ converted_list_param = WebKit::core(list_param);
+ g_return_val_if_fail(converted_list_param, 0);
+ }
+ gboolean res = item->callbackWithStringList(converted_list_param);
+ return res;
+}
+
G_DEFINE_TYPE(WebKitDOMTestCallback, webkit_dom_test_callback, WEBKIT_TYPE_DOM_OBJECT)
diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h
index 6049c79..541afb2 100644
--- a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h
+++ b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h
@@ -58,6 +58,9 @@ webkit_dom_test_callback_callback_with_class2param(WebKitDOMTestCallback* self,
WEBKIT_API glong
webkit_dom_test_callback_callback_with_non_bool_return_type(WebKitDOMTestCallback* self, WebKitDOMClass3* class3param);
+WEBKIT_API gboolean
+webkit_dom_test_callback_callback_with_string_list(WebKitDOMTestCallback* self, WebKitDOMDOMStringList* list_param);
+
G_END_DECLS
#endif /* WebKitDOMTestCallback_h */
diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
index 44d58d4..1f81c5d 100644
--- a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
@@ -250,12 +250,6 @@ webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error
}
}
-
-/* TODO: event function webkit_dom_test_obj_add_event_listener */
-
-
-/* TODO: event function webkit_dom_test_obj_remove_event_listener */
-
void
webkit_dom_test_obj_with_dynamic_frame(WebKitDOMTestObj* self)
{
diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
index 0416664..0f0f3c1 100644
--- a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
+++ b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
@@ -82,12 +82,6 @@ webkit_dom_test_obj_options_object(WebKitDOMTestObj* self, WebKitDOMOptionsObjec
WEBKIT_API void
webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error);
-
-/* TODO: event function webkit_dom_test_obj_add_event_listener */
-
-
-/* TODO: event function webkit_dom_test_obj_remove_event_listener */
-
WEBKIT_API void
webkit_dom_test_obj_with_dynamic_frame(WebKitDOMTestObj* self);
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)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h
index ba3559c..226e874 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h
@@ -45,6 +45,7 @@ public:
virtual bool callbackWithClass2Param(Class2* class2Param, const String& strArg);
COMPILE_ASSERT(false) virtual int callbackWithNonBoolReturnType(Class3* class3Param);
virtual int customCallback(Class5* class5Param, Class6* class6Param);
+ virtual bool callbackWithStringList(DOMStringList* listParam);
private:
JSTestCallback(JSC::JSObject* callback, JSDOMGlobalObject*);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
index 8d519f5..ce0fef6 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
@@ -69,9 +69,9 @@ public:
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
@@ -82,7 +82,7 @@ protected:
const ClassInfo JSTestInterfaceConstructor::s_info = { "TestInterfaceConstructor", &DOMConstructorObject::s_info, &JSTestInterfaceConstructorTable, 0 };
JSTestInterfaceConstructor::JSTestInterfaceConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
- : DOMConstructorObject(JSTestInterfaceConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ : DOMConstructorObject(JSTestInterfaceConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)
{
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestInterfacePrototype::self(exec, globalObject), DontDelete | ReadOnly);
@@ -144,7 +144,7 @@ JSTestInterface::JSTestInterface(NonNullPassRefPtr<Structure> structure, JSDOMGl
JSObject* JSTestInterface::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
- return new (exec) JSTestInterfacePrototype(globalObject, JSTestInterfacePrototype::createStructure(globalObject->objectPrototype()));
+ return new (exec) JSTestInterfacePrototype(globalObject, JSTestInterfacePrototype::createStructure(globalObject->globalData(), globalObject->objectPrototype()));
}
bool JSTestInterface::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
index 2cabc23..5ee33a0 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
@@ -41,9 +41,9 @@ public:
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
@@ -63,9 +63,9 @@ class JSTestInterfacePrototype : public JSC::JSObjectWithGlobalObject {
public:
static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
JSTestInterfacePrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
protected:
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
index 0e5edeb..efaee3b 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
@@ -70,9 +70,9 @@ public:
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
@@ -81,7 +81,7 @@ protected:
const ClassInfo JSTestMediaQueryListListenerConstructor::s_info = { "TestMediaQueryListListenerConstructor", &DOMConstructorObject::s_info, &JSTestMediaQueryListListenerConstructorTable, 0 };
JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
- : DOMConstructorObject(JSTestMediaQueryListListenerConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ : DOMConstructorObject(JSTestMediaQueryListListenerConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)
{
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestMediaQueryListListenerPrototype::self(exec, globalObject), DontDelete | ReadOnly);
@@ -140,7 +140,7 @@ JSTestMediaQueryListListener::JSTestMediaQueryListListener(NonNullPassRefPtr<Str
JSObject* JSTestMediaQueryListListener::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
- return new (exec) JSTestMediaQueryListListenerPrototype(globalObject, JSTestMediaQueryListListenerPrototype::createStructure(globalObject->objectPrototype()));
+ return new (exec) JSTestMediaQueryListListenerPrototype(globalObject, JSTestMediaQueryListListenerPrototype::createStructure(globalObject->globalData(), globalObject->objectPrototype()));
}
bool JSTestMediaQueryListListener::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
index a9f8606..fdb8a02 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
@@ -39,9 +39,9 @@ public:
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
@@ -63,9 +63,9 @@ public:
static const JSC::ClassInfo s_info;
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
JSTestMediaQueryListListenerPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
protected:
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index fd2f4d9..a98cafa 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -149,9 +149,9 @@ public:
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
@@ -160,7 +160,7 @@ protected:
const ClassInfo JSTestObjConstructor::s_info = { "TestObjConstructor", &DOMConstructorObject::s_info, &JSTestObjConstructorTable, 0 };
JSTestObjConstructor::JSTestObjConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
- : DOMConstructorObject(JSTestObjConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ : DOMConstructorObject(JSTestObjConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)
{
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestObjPrototype::self(exec, globalObject), DontDelete | ReadOnly);
@@ -265,7 +265,7 @@ JSTestObj::JSTestObj(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject*
JSObject* JSTestObj::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
- return new (exec) JSTestObjPrototype(globalObject, JSTestObjPrototype::createStructure(globalObject->objectPrototype()));
+ return new (exec) JSTestObjPrototype(globalObject, JSTestObjPrototype::createStructure(globalObject->globalData(), globalObject->objectPrototype()));
}
bool JSTestObj::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
index 7e21168..751239b 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -40,9 +40,9 @@ public:
virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
@@ -72,9 +72,9 @@ public:
static const JSC::ClassInfo s_info;
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
JSTestObjPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
protected:
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
index 5dd6c44..535f99b 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
@@ -71,9 +71,9 @@ public:
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
@@ -82,7 +82,7 @@ protected:
const ClassInfo JSTestSerializedScriptValueInterfaceConstructor::s_info = { "TestSerializedScriptValueInterfaceConstructor", &DOMConstructorObject::s_info, &JSTestSerializedScriptValueInterfaceConstructorTable, 0 };
JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
- : DOMConstructorObject(JSTestSerializedScriptValueInterfaceConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ : DOMConstructorObject(JSTestSerializedScriptValueInterfaceConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)
{
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestSerializedScriptValueInterfacePrototype::self(exec, globalObject), DontDelete | ReadOnly);
@@ -130,7 +130,7 @@ JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface(NonNu
JSObject* JSTestSerializedScriptValueInterface::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
- return new (exec) JSTestSerializedScriptValueInterfacePrototype(globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(globalObject->objectPrototype()));
+ return new (exec) JSTestSerializedScriptValueInterfacePrototype(globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(globalObject->globalData(), globalObject->objectPrototype()));
}
bool JSTestSerializedScriptValueInterface::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
index 175fb12..d5f8879 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
@@ -41,9 +41,9 @@ public:
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
@@ -63,9 +63,9 @@ class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSObjectWithGl
public:
static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
static const JSC::ClassInfo s_info;
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
JSTestSerializedScriptValueInterfacePrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
protected:
diff --git a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h
index 08c30b7..3d6f7bd 100644
--- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h
+++ b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h
@@ -33,6 +33,7 @@
@class DOMClass3;
@class DOMClass5;
@class DOMClass6;
+@class DOMDOMStringList;
@class NSString;
@interface DOMTestCallback : DOMObject
@@ -41,6 +42,7 @@
- (BOOL)callbackWithClass2Param:(DOMClass2 *)class2Param strArg:(NSString *)strArg;
- (int)callbackWithNonBoolReturnType:(DOMClass3 *)class3Param;
- (int)customCallback:(DOMClass5 *)class5Param class6Param:(DOMClass6 *)class6Param;
+- (BOOL)callbackWithStringList:(DOMDOMStringList *)listParam;
@end
#endif
diff --git a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm
index c4be39d..e070de5 100644
--- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm
+++ b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm
@@ -45,8 +45,10 @@
#import "DOMClass3Internal.h"
#import "DOMClass5Internal.h"
#import "DOMClass6Internal.h"
+#import "DOMDOMStringListInternal.h"
#import "DOMEventInternal.h"
#import "DOMNodeInternal.h"
+#import "DOMStringList.h"
#import "DOMStyleSheetInternal.h"
#import "DOMTestCallbackInternal.h"
#import "ExceptionHandlers.h"
@@ -109,6 +111,12 @@
return IMPL->customCallback(core(class5Param), core(class6Param));
}
+- (BOOL)callbackWithStringList:(DOMDOMStringList *)listParam
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->callbackWithStringList(core(listParam));
+}
+
@end
WebCore::TestCallback* core(DOMTestCallback *wrapper)
diff --git a/Source/WebCore/bindings/scripts/test/TestCallback.idl b/Source/WebCore/bindings/scripts/test/TestCallback.idl
index 9679a5a..2475251 100644
--- a/Source/WebCore/bindings/scripts/test/TestCallback.idl
+++ b/Source/WebCore/bindings/scripts/test/TestCallback.idl
@@ -38,5 +38,6 @@ module test {
boolean callbackWithClass2Param(in Class2 class2Param, in DOMString strArg);
long callbackWithNonBoolReturnType(in Class3 class3Param);
[Custom] long customCallback(in Class5 class5Param, in Class6 class6Param);
+ boolean callbackWithStringList(in DOMStringList listParam);
};
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
index 057302d..c17f73d 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
@@ -27,7 +27,7 @@
#include "V8Class1.h"
#include "V8Class2.h"
#include "V8CustomVoidCallback.h"
-#include "V8DOMString.h"
+#include "V8DOMStringList.h"
#include "V8Proxy.h"
#include <wtf/GetPtr.h>
#include <wtf/RefCounted.h>
@@ -131,6 +131,33 @@ bool V8TestCallback::callbackWithClass2Param(Class2* class2Param, const String&
return !invokeCallback(m_callback, 2, argv, callbackReturnValue, scriptExecutionContext());
}
+bool V8TestCallback::callbackWithStringList(PassRefPtr<DOMStringList> listParam)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ v8::HandleScope handleScope;
+
+ v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_worldContext);
+ if (v8Context.IsEmpty())
+ return true;
+
+ v8::Context::Scope scope(v8Context);
+
+ v8::Handle<v8::Value> listParamHandle = toV8(listParam);
+ if (listParamHandle.IsEmpty()) {
+ CRASH();
+ return true;
+ }
+
+ v8::Handle<v8::Value> argv[] = {
+ listParamHandle
+ };
+
+ bool callbackReturnValue = false;
+ return !invokeCallback(m_callback, 1, argv, callbackReturnValue, scriptExecutionContext());
+}
+
} // namespace WebCore
#endif // ENABLE(DATABASE)
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h
index 8ff8c26..194f13c 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h
@@ -50,6 +50,7 @@ public:
virtual bool callbackWithClass2Param(Class2* class2Param, const String& strArg);
COMPILE_ASSERT(false) virtual int callbackWithNonBoolReturnType(Class3* class3Param);
virtual int customCallback(Class5* class5Param, Class6* class6Param);
+ virtual bool callbackWithStringList(PassRefPtr<DOMStringList> listParam);
private:
V8TestCallback(v8::Local<v8::Object>, ScriptExecutionContext*);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
index 4c40d98..21c8804 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
@@ -33,7 +33,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestInterface::derefObject, 0 };
+WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestInterface::derefObject, 0, 0 };
namespace TestInterfaceInternal {
@@ -87,7 +87,8 @@ v8::Handle<v8::Object> V8TestInterface::wrapSlow(TestInterface* impl)
return wrapper;
impl->ref();
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
index ab9e6db..6d71ea7 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
@@ -33,7 +33,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestMediaQueryListListener::info = { V8TestMediaQueryListListener::GetTemplate, V8TestMediaQueryListListener::derefObject, 0 };
+WrapperTypeInfo V8TestMediaQueryListListener::info = { V8TestMediaQueryListListener::GetTemplate, V8TestMediaQueryListListener::derefObject, 0, 0 };
namespace TestMediaQueryListListenerInternal {
@@ -94,7 +94,8 @@ v8::Handle<v8::Object> V8TestMediaQueryListListener::wrapSlow(TestMediaQueryList
return wrapper;
impl->ref();
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index 4298756..5884e89 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -46,7 +46,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestObj::info = { V8TestObj::GetTemplate, V8TestObj::derefObject, 0 };
+WrapperTypeInfo V8TestObj::info = { V8TestObj::GetTemplate, V8TestObj::derefObject, 0, 0 };
namespace TestObjInternal {
@@ -1380,7 +1380,8 @@ v8::Handle<v8::Object> V8TestObj::wrapSlow(TestObj* impl)
return wrapper;
impl->ref();
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
index fef8dbd..c6cc4d6 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
@@ -34,7 +34,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestSerializedScriptValueInterface::info = { V8TestSerializedScriptValueInterface::GetTemplate, V8TestSerializedScriptValueInterface::derefObject, 0 };
+WrapperTypeInfo V8TestSerializedScriptValueInterface::info = { V8TestSerializedScriptValueInterface::GetTemplate, V8TestSerializedScriptValueInterface::derefObject, 0, 0 };
namespace TestSerializedScriptValueInterfaceInternal {
@@ -83,7 +83,8 @@ v8::Handle<v8::Object> V8TestSerializedScriptValueInterface::wrapSlow(TestSerial
impl->ref();
SerializedScriptValue::deserializeAndSetProperty(wrapper, "value", static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), impl->value());
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}