summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/scripts/test
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/scripts/test')
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp186
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h60
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h39
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp139
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h51
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h39
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp779
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h177
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h39
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestCallback.cpp100
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestCallback.h58
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestInterface.cpp193
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestInterface.h81
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestObj.cpp813
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestObj.h141
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h45
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm122
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestCallbackInternal.h38
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h34
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm86
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h38
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestObj.h86
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm340
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestObjInternal.h38
-rw-r--r--WebCore/bindings/scripts/test/TestCallback.idl41
-rw-r--r--WebCore/bindings/scripts/test/TestInterface.idl37
-rw-r--r--WebCore/bindings/scripts/test/TestObj.idl103
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestCallback.cpp92
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestCallback.h63
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestInterface.cpp115
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestInterface.h50
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestObj.cpp714
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestObj.h53
33 files changed, 4990 insertions, 0 deletions
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
new file mode 100644
index 0000000..6cfec74
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
@@ -0,0 +1,186 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <glib-object.h>
+#include "config.h"
+
+#include <wtf/GetPtr.h>
+#include <wtf/RefPtr.h>
+#include "ExceptionCode.h"
+#include "TestCallback.h"
+#include "WebKitDOMBinding.h"
+#include "gobject/ConvertToUTF8String.h"
+#include "webkit/WebKitDOMClass1.h"
+#include "webkit/WebKitDOMClass1Private.h"
+#include "webkit/WebKitDOMClass2.h"
+#include "webkit/WebKitDOMClass2Private.h"
+#include "webkit/WebKitDOMClass3.h"
+#include "webkit/WebKitDOMClass3Private.h"
+#include "webkit/WebKitDOMTestCallback.h"
+#include "webkit/WebKitDOMTestCallbackPrivate.h"
+#include "webkitmarshal.h"
+#include "webkitprivate.h"
+
+namespace WebKit {
+
+gpointer kit(WebCore::TestCallback* obj)
+{
+ g_return_val_if_fail(obj != 0, 0);
+
+ if (gpointer ret = DOMObjectCache::get(obj))
+ return ret;
+
+ return DOMObjectCache::put(obj, WebKit::wrapTestCallback(obj));
+}
+
+} // namespace WebKit //
+
+gboolean
+webkit_dom_test_callback_callback_with_class1param (WebKitDOMTestCallback *self, WebKitDOMClass1* class1param)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestCallback * item = WebKit::core(self);
+ g_return_val_if_fail (class1param, 0);
+ WebCore::Class1 * _g_class1param = WebKit::core(class1param);
+ g_return_val_if_fail (_g_class1param, 0);
+ gboolean res = item->callbackWithClass1Param(_g_class1param);
+ return res;
+
+}
+
+gboolean
+webkit_dom_test_callback_callback_with_class2param (WebKitDOMTestCallback *self, WebKitDOMClass2* class2param, gchar* str_arg)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestCallback * item = WebKit::core(self);
+ g_return_val_if_fail (class2param, 0);
+ g_return_val_if_fail (str_arg, 0);
+ WebCore::Class2 * _g_class2param = WebKit::core(class2param);
+ g_return_val_if_fail (_g_class2param, 0);
+ WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);
+ gboolean res = item->callbackWithClass2Param(_g_class2param, _g_str_arg);
+ return res;
+
+}
+
+glong
+webkit_dom_test_callback_callback_with_non_bool_return_type (WebKitDOMTestCallback *self, WebKitDOMClass3* class3param)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestCallback * item = WebKit::core(self);
+ g_return_val_if_fail (class3param, 0);
+ WebCore::Class3 * _g_class3param = WebKit::core(class3param);
+ g_return_val_if_fail (_g_class3param, 0);
+ glong res = item->callbackWithNonBoolReturnType(_g_class3param);
+ return res;
+
+}
+
+
+G_DEFINE_TYPE(WebKitDOMTestCallback, webkit_dom_test_callback, WEBKIT_TYPE_DOM_OBJECT)
+
+namespace WebKit {
+
+WebKitDOMTestCallback* wrapTestCallback(WebCore::TestCallback* coreObject)
+{
+ g_return_val_if_fail(coreObject != 0, 0);
+
+ WebKitDOMTestCallback* wrapper = WEBKIT_DOM_TEST_CALLBACK(g_object_new(WEBKIT_TYPE_DOM_TEST_CALLBACK, NULL));
+ g_return_val_if_fail(wrapper != 0, 0);
+
+ /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
+ * in a C-allocated GObject structure. See the finalize() code for the
+ * matching deref().
+ */
+
+ coreObject->ref();
+ WEBKIT_DOM_OBJECT(wrapper)->coreObject = coreObject;
+
+ return wrapper;
+}
+
+WebCore::TestCallback* core(WebKitDOMTestCallback* request)
+{
+ g_return_val_if_fail(request != 0, 0);
+
+ WebCore::TestCallback* coreObject = static_cast<WebCore::TestCallback*>(WEBKIT_DOM_OBJECT(request)->coreObject);
+ g_return_val_if_fail(coreObject != 0, 0);
+
+ return coreObject;
+}
+
+} // namespace WebKit
+enum {
+ PROP_0,
+};
+
+
+static void webkit_dom_test_callback_finalize(GObject* object)
+{
+ WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
+
+ if (dom_object->coreObject != NULL) {
+ WebCore::TestCallback* coreObject = static_cast<WebCore::TestCallback *>(dom_object->coreObject);
+
+ WebKit::DOMObjectCache::forget(coreObject);
+ coreObject->deref();
+
+ dom_object->coreObject = NULL;
+ }
+
+ G_OBJECT_CLASS(webkit_dom_test_callback_parent_class)->finalize(object);
+}
+
+static void webkit_dom_test_callback_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
+{
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+
+static void webkit_dom_test_callback_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
+{
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+
+static void webkit_dom_test_callback_class_init(WebKitDOMTestCallbackClass* requestClass)
+{
+ GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
+ gobjectClass->finalize = webkit_dom_test_callback_finalize;
+ gobjectClass->set_property = webkit_dom_test_callback_set_property;
+ gobjectClass->get_property = webkit_dom_test_callback_get_property;
+
+
+
+
+}
+
+static void webkit_dom_test_callback_init(WebKitDOMTestCallback* request)
+{
+}
+
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h
new file mode 100644
index 0000000..088c457
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h
@@ -0,0 +1,60 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef WebKitDOMTestCallback_h
+#define WebKitDOMTestCallback_h
+
+#include "webkit/webkitdomdefines.h"
+#include <glib-object.h>
+#include <webkit/webkitdefines.h>
+#include "webkit/WebKitDOMObject.h"
+
+
+G_BEGIN_DECLS
+#define WEBKIT_TYPE_DOM_TEST_CALLBACK (webkit_dom_test_callback_get_type())
+#define WEBKIT_DOM_TEST_CALLBACK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOM_TEST_CALLBACK, WebKitDOMTestCallback))
+#define WEBKIT_DOM_TEST_CALLBACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_DOM_TEST_CALLBACK, WebKitDOMTestCallbackClass)
+#define WEBKIT_DOM_IS_TEST_CALLBACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOM_TEST_CALLBACK))
+#define WEBKIT_DOM_IS_TEST_CALLBACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_DOM_TEST_CALLBACK))
+#define WEBKIT_DOM_TEST_CALLBACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_DOM_TEST_CALLBACK, WebKitDOMTestCallbackClass))
+
+struct _WebKitDOMTestCallback {
+ WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMTestCallbackClass {
+ WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_test_callback_get_type (void);
+
+WEBKIT_API gboolean
+webkit_dom_test_callback_callback_with_class1param (WebKitDOMTestCallback *self, WebKitDOMClass1* class1param);
+
+WEBKIT_API gboolean
+webkit_dom_test_callback_callback_with_class2param (WebKitDOMTestCallback *self, WebKitDOMClass2* class2param, gchar* str_arg);
+
+WEBKIT_API glong
+webkit_dom_test_callback_callback_with_non_bool_return_type (WebKitDOMTestCallback *self, WebKitDOMClass3* class3param);
+
+G_END_DECLS
+
+#endif /* WebKitDOMTestCallback_h */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h
new file mode 100644
index 0000000..45884b2
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h
@@ -0,0 +1,39 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef WEB_KIT_DOM_TEST_CALLBACK_PRIVATE_H
+#define WEB_KIT_DOM_TEST_CALLBACK_PRIVATE_H
+
+#include <glib-object.h>
+#include <webkit/WebKitDOMObject.h>
+#include "TestCallback.h"
+namespace WebKit {
+ WebKitDOMTestCallback *
+ wrapTestCallback(WebCore::TestCallback *coreObject);
+
+ WebCore::TestCallback *
+ core(WebKitDOMTestCallback *request);
+
+ gpointer
+ kit(WebCore::TestCallback* node);
+
+} // namespace WebKit
+
+#endif /* WEB_KIT_DOM_TEST_CALLBACK_PRIVATE_H */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp
new file mode 100644
index 0000000..2be0277
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp
@@ -0,0 +1,139 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <glib-object.h>
+#include "config.h"
+
+#include <wtf/GetPtr.h>
+#include <wtf/RefPtr.h>
+#include "ExceptionCode.h"
+#include "TestInterface.h"
+#include "WebKitDOMBinding.h"
+#include "gobject/ConvertToUTF8String.h"
+#include "webkit/WebKitDOMTestInterface.h"
+#include "webkit/WebKitDOMTestInterfacePrivate.h"
+#include "webkitmarshal.h"
+#include "webkitprivate.h"
+
+namespace WebKit {
+
+gpointer kit(WebCore::TestInterface* obj)
+{
+ g_return_val_if_fail(obj != 0, 0);
+
+ if (gpointer ret = DOMObjectCache::get(obj))
+ return ret;
+
+ return DOMObjectCache::put(obj, WebKit::wrapTestInterface(obj));
+}
+
+} // namespace WebKit //
+
+
+G_DEFINE_TYPE(WebKitDOMTestInterface, webkit_dom_test_interface, WEBKIT_TYPE_DOM_OBJECT)
+
+namespace WebKit {
+
+WebKitDOMTestInterface* wrapTestInterface(WebCore::TestInterface* coreObject)
+{
+ g_return_val_if_fail(coreObject != 0, 0);
+
+ WebKitDOMTestInterface* wrapper = WEBKIT_DOM_TEST_INTERFACE(g_object_new(WEBKIT_TYPE_DOM_TEST_INTERFACE, NULL));
+ g_return_val_if_fail(wrapper != 0, 0);
+
+ /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
+ * in a C-allocated GObject structure. See the finalize() code for the
+ * matching deref().
+ */
+
+ coreObject->ref();
+ WEBKIT_DOM_OBJECT(wrapper)->coreObject = coreObject;
+
+ return wrapper;
+}
+
+WebCore::TestInterface* core(WebKitDOMTestInterface* request)
+{
+ g_return_val_if_fail(request != 0, 0);
+
+ WebCore::TestInterface* coreObject = static_cast<WebCore::TestInterface*>(WEBKIT_DOM_OBJECT(request)->coreObject);
+ g_return_val_if_fail(coreObject != 0, 0);
+
+ return coreObject;
+}
+
+} // namespace WebKit
+enum {
+ PROP_0,
+};
+
+
+static void webkit_dom_test_interface_finalize(GObject* object)
+{
+ WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
+
+ if (dom_object->coreObject != NULL) {
+ WebCore::TestInterface* coreObject = static_cast<WebCore::TestInterface *>(dom_object->coreObject);
+
+ WebKit::DOMObjectCache::forget(coreObject);
+ coreObject->deref();
+
+ dom_object->coreObject = NULL;
+ }
+
+ G_OBJECT_CLASS(webkit_dom_test_interface_parent_class)->finalize(object);
+}
+
+static void webkit_dom_test_interface_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
+{
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+
+static void webkit_dom_test_interface_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
+{
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+
+static void webkit_dom_test_interface_class_init(WebKitDOMTestInterfaceClass* requestClass)
+{
+ GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
+ gobjectClass->finalize = webkit_dom_test_interface_finalize;
+ gobjectClass->set_property = webkit_dom_test_interface_set_property;
+ gobjectClass->get_property = webkit_dom_test_interface_get_property;
+
+
+
+
+}
+
+static void webkit_dom_test_interface_init(WebKitDOMTestInterface* request)
+{
+}
+
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h
new file mode 100644
index 0000000..f9af866
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h
@@ -0,0 +1,51 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef WebKitDOMTestInterface_h
+#define WebKitDOMTestInterface_h
+
+#include "webkit/webkitdomdefines.h"
+#include <glib-object.h>
+#include <webkit/webkitdefines.h>
+#include "webkit/WebKitDOMObject.h"
+
+
+G_BEGIN_DECLS
+#define WEBKIT_TYPE_DOM_TEST_INTERFACE (webkit_dom_test_interface_get_type())
+#define WEBKIT_DOM_TEST_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOM_TEST_INTERFACE, WebKitDOMTestInterface))
+#define WEBKIT_DOM_TEST_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_DOM_TEST_INTERFACE, WebKitDOMTestInterfaceClass)
+#define WEBKIT_DOM_IS_TEST_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOM_TEST_INTERFACE))
+#define WEBKIT_DOM_IS_TEST_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_DOM_TEST_INTERFACE))
+#define WEBKIT_DOM_TEST_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_DOM_TEST_INTERFACE, WebKitDOMTestInterfaceClass))
+
+struct _WebKitDOMTestInterface {
+ WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMTestInterfaceClass {
+ WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_test_interface_get_type (void);
+
+G_END_DECLS
+
+#endif /* WebKitDOMTestInterface_h */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h
new file mode 100644
index 0000000..45fb949
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h
@@ -0,0 +1,39 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef WEB_KIT_DOM_TEST_INTERFACE_PRIVATE_H
+#define WEB_KIT_DOM_TEST_INTERFACE_PRIVATE_H
+
+#include <glib-object.h>
+#include <webkit/WebKitDOMObject.h>
+#include "TestInterface.h"
+namespace WebKit {
+ WebKitDOMTestInterface *
+ wrapTestInterface(WebCore::TestInterface *coreObject);
+
+ WebCore::TestInterface *
+ core(WebKitDOMTestInterface *request);
+
+ gpointer
+ kit(WebCore::TestInterface* node);
+
+} // namespace WebKit
+
+#endif /* WEB_KIT_DOM_TEST_INTERFACE_PRIVATE_H */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
new file mode 100644
index 0000000..8c1bae2
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
@@ -0,0 +1,779 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <glib-object.h>
+#include "config.h"
+
+#include <wtf/GetPtr.h>
+#include <wtf/RefPtr.h>
+#include "ExceptionCode.h"
+#include "TestObj.h"
+#include "WebKitDOMBinding.h"
+#include "gobject/ConvertToUTF8String.h"
+#include "webkit/WebKitDOMSerializedScriptValue.h"
+#include "webkit/WebKitDOMSerializedScriptValuePrivate.h"
+#include "webkit/WebKitDOMTestObj.h"
+#include "webkit/WebKitDOMTestObjPrivate.h"
+#include "webkitmarshal.h"
+#include "webkitprivate.h"
+
+namespace WebKit {
+
+gpointer kit(WebCore::TestObj* obj)
+{
+ g_return_val_if_fail(obj != 0, 0);
+
+ if (gpointer ret = DOMObjectCache::get(obj))
+ return ret;
+
+ return DOMObjectCache::put(obj, WebKit::wrapTestObj(obj));
+}
+
+} // namespace WebKit //
+
+void
+webkit_dom_test_obj_void_method (WebKitDOMTestObj *self)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->voidMethod();
+
+}
+
+void
+webkit_dom_test_obj_void_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ g_return_if_fail (str_arg);
+ g_return_if_fail (obj_arg);
+ WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);
+ WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);
+ g_return_if_fail (_g_obj_arg);
+ item->voidMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg);
+
+}
+
+glong
+webkit_dom_test_obj_int_method (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ glong res = item->intMethod();
+ return res;
+
+}
+
+glong
+webkit_dom_test_obj_int_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ g_return_val_if_fail (str_arg, 0);
+ g_return_val_if_fail (obj_arg, 0);
+ WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);
+ WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);
+ g_return_val_if_fail (_g_obj_arg, 0);
+ glong res = item->intMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg);
+ return res;
+
+}
+
+WebKitDOMTestObj*
+webkit_dom_test_obj_obj_method (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethod());
+ WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
+ return res;
+
+}
+
+WebKitDOMTestObj*
+webkit_dom_test_obj_obj_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ g_return_val_if_fail (str_arg, 0);
+ g_return_val_if_fail (obj_arg, 0);
+ WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);
+ WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);
+ g_return_val_if_fail (_g_obj_arg, 0);
+ PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg));
+ WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_serialized_value (WebKitDOMTestObj *self, WebKitDOMSerializedScriptValue* serialized_arg)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ g_return_if_fail (serialized_arg);
+ WebCore::SerializedScriptValue * _g_serialized_arg = WebKit::core(serialized_arg);
+ g_return_if_fail (_g_serialized_arg);
+ item->serializedValue(_g_serialized_arg);
+
+}
+
+void
+webkit_dom_test_obj_method_with_exception (WebKitDOMTestObj *self, GError **error)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ WebCore::ExceptionCode ec = 0;
+ item->methodWithException(ec);
+ if (ec) {
+ WebCore::ExceptionCodeDescription ecdesc;
+ WebCore::getExceptionCodeDescription(ec, ecdesc);
+ g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+ }
+
+}
+
+
+/* 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)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->withDynamicFrame();
+
+}
+
+void
+webkit_dom_test_obj_with_dynamic_frame_and_arg (WebKitDOMTestObj *self, glong int_arg)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->withDynamicFrameAndArg(int_arg);
+
+}
+
+void
+webkit_dom_test_obj_with_dynamic_frame_and_optional_arg (WebKitDOMTestObj *self, glong int_arg, glong optional_arg)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->withDynamicFrameAndOptionalArg(int_arg, optional_arg);
+
+}
+
+void
+webkit_dom_test_obj_with_dynamic_frame_and_user_gesture (WebKitDOMTestObj *self, glong int_arg)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->withDynamicFrameAndUserGesture(int_arg);
+
+}
+
+void
+webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad (WebKitDOMTestObj *self, glong int_arg, glong optional_arg)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->withDynamicFrameAndUserGestureASAD(int_arg, optional_arg);
+
+}
+
+void
+webkit_dom_test_obj_with_script_state_void (WebKitDOMTestObj *self)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->withScriptStateVoid();
+
+}
+
+WebKitDOMTestObj*
+webkit_dom_test_obj_with_script_state_obj (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObj());
+ WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_with_script_state_void_exception (WebKitDOMTestObj *self, GError **error)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ WebCore::ExceptionCode ec = 0;
+ item->withScriptStateVoidException(ec);
+ if (ec) {
+ WebCore::ExceptionCodeDescription ecdesc;
+ WebCore::getExceptionCodeDescription(ec, ecdesc);
+ g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+ }
+
+}
+
+WebKitDOMTestObj*
+webkit_dom_test_obj_with_script_state_obj_exception (WebKitDOMTestObj *self, GError **error)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ WebCore::ExceptionCode ec = 0;
+ PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObjException(ec));
+ if (ec) {
+ WebCore::ExceptionCodeDescription ecdesc;
+ WebCore::getExceptionCodeDescription(ec, ecdesc);
+ g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+ }
+ WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_method_with_optional_arg (WebKitDOMTestObj *self, glong opt)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->methodWithOptionalArg(opt);
+
+}
+
+void
+webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg (WebKitDOMTestObj *self, glong non_opt, glong opt)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->methodWithNonOptionalArgAndOptionalArg(non_opt, opt);
+
+}
+
+void
+webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args (WebKitDOMTestObj *self, glong non_opt, glong opt1, glong opt2)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2);
+
+}
+
+glong
+webkit_dom_test_obj_get_read_only_int_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ glong res = item->readOnlyIntAttr();
+ return res;
+
+}
+
+gchar*
+webkit_dom_test_obj_get_read_only_string_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ gchar* res = convertToUTF8String(item->readOnlyStringAttr());
+ return res;
+
+}
+
+WebKitDOMTestObj*
+webkit_dom_test_obj_get_read_only_test_obj_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->readOnlyTestObjAttr());
+ WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
+ return res;
+
+}
+
+glong
+webkit_dom_test_obj_get_int_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ glong res = item->intAttr();
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_int_attr (WebKitDOMTestObj *self, glong value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->setIntAttr(value);
+
+}
+
+gint64
+webkit_dom_test_obj_get_long_long_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ gint64 res = item->longLongAttr();
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_long_long_attr (WebKitDOMTestObj *self, gint64 value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->setLongLongAttr(value);
+
+}
+
+guint64
+webkit_dom_test_obj_get_unsigned_long_long_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ guint64 res = item->unsignedLongLongAttr();
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_unsigned_long_long_attr (WebKitDOMTestObj *self, guint64 value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->setUnsignedLongLongAttr(value);
+
+}
+
+gchar*
+webkit_dom_test_obj_get_string_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ gchar* res = convertToUTF8String(item->stringAttr());
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_string_attr (WebKitDOMTestObj *self, gchar* value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ g_return_if_fail (value);
+ WebCore::String _g_value = WebCore::String::fromUTF8(value);
+ item->setStringAttr(_g_value);
+
+}
+
+WebKitDOMTestObj*
+webkit_dom_test_obj_get_test_obj_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->testObjAttr());
+ WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_test_obj_attr (WebKitDOMTestObj *self, WebKitDOMTestObj* value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ g_return_if_fail (value);
+ WebCore::TestObj * _g_value = WebKit::core(value);
+ g_return_if_fail (_g_value);
+ item->setTestObjAttr(_g_value);
+
+}
+
+glong
+webkit_dom_test_obj_get_attr_with_exception (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ glong res = item->attrWithException();
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_attr_with_exception (WebKitDOMTestObj *self, glong value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->setAttrWithException(value);
+
+}
+
+glong
+webkit_dom_test_obj_get_attr_with_setter_exception (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ glong res = item->attrWithSetterException();
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_attr_with_setter_exception (WebKitDOMTestObj *self, glong value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->setAttrWithSetterException(value);
+
+}
+
+glong
+webkit_dom_test_obj_get_attr_with_getter_exception (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ glong res = item->attrWithGetterException();
+ return res;
+
+}
+
+void
+webkit_dom_test_obj_set_attr_with_getter_exception (WebKitDOMTestObj *self, glong value)
+{
+ g_return_if_fail (self);
+ WebCore::TestObj * item = WebKit::core(self);
+ item->setAttrWithGetterException(value);
+
+}
+
+gchar*
+webkit_dom_test_obj_get_script_string_attr (WebKitDOMTestObj *self)
+{
+ g_return_val_if_fail (self, 0);
+ WebCore::TestObj * item = WebKit::core(self);
+ gchar* res = convertToUTF8String(item->scriptStringAttr());
+ return res;
+
+}
+
+
+G_DEFINE_TYPE(WebKitDOMTestObj, webkit_dom_test_obj, WEBKIT_TYPE_DOM_OBJECT)
+
+namespace WebKit {
+
+WebKitDOMTestObj* wrapTestObj(WebCore::TestObj* coreObject)
+{
+ g_return_val_if_fail(coreObject != 0, 0);
+
+ WebKitDOMTestObj* wrapper = WEBKIT_DOM_TEST_OBJ(g_object_new(WEBKIT_TYPE_DOM_TEST_OBJ, NULL));
+ g_return_val_if_fail(wrapper != 0, 0);
+
+ /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
+ * in a C-allocated GObject structure. See the finalize() code for the
+ * matching deref().
+ */
+
+ coreObject->ref();
+ WEBKIT_DOM_OBJECT(wrapper)->coreObject = coreObject;
+
+ return wrapper;
+}
+
+WebCore::TestObj* core(WebKitDOMTestObj* request)
+{
+ g_return_val_if_fail(request != 0, 0);
+
+ WebCore::TestObj* coreObject = static_cast<WebCore::TestObj*>(WEBKIT_DOM_OBJECT(request)->coreObject);
+ g_return_val_if_fail(coreObject != 0, 0);
+
+ return coreObject;
+}
+
+} // namespace WebKit
+enum {
+ PROP_0,
+ PROP_READ_ONLY_INT_ATTR,
+ PROP_READ_ONLY_STRING_ATTR,
+ PROP_READ_ONLY_TEST_OBJ_ATTR,
+ PROP_INT_ATTR,
+ PROP_LONG_LONG_ATTR,
+ PROP_UNSIGNED_LONG_LONG_ATTR,
+ PROP_STRING_ATTR,
+ PROP_TEST_OBJ_ATTR,
+ PROP_ATTR_WITH_EXCEPTION,
+ PROP_ATTR_WITH_SETTER_EXCEPTION,
+ PROP_ATTR_WITH_GETTER_EXCEPTION,
+ PROP_CUSTOM_ATTR,
+ PROP_SCRIPT_STRING_ATTR,
+};
+
+
+static void webkit_dom_test_obj_finalize(GObject* object)
+{
+ WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
+
+ if (dom_object->coreObject != NULL) {
+ WebCore::TestObj* coreObject = static_cast<WebCore::TestObj *>(dom_object->coreObject);
+
+ WebKit::DOMObjectCache::forget(coreObject);
+ coreObject->deref();
+
+ dom_object->coreObject = NULL;
+ }
+
+ G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->finalize(object);
+}
+
+static void webkit_dom_test_obj_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
+{
+ WebKitDOMTestObj *self = WEBKIT_DOM_TEST_OBJ(object);
+ WebCore::TestObj* coreSelf = WebKit::core(self);
+ switch (prop_id) {
+ case PROP_INT_ATTR:
+ {
+ coreSelf->setIntAttr((g_value_get_long(value)) );
+ break;
+ }
+ case PROP_UNSIGNED_LONG_LONG_ATTR:
+ {
+ coreSelf->setUnsignedLongLongAttr((g_value_get_uint64(value)) );
+ break;
+ }
+ case PROP_STRING_ATTR:
+ {
+ coreSelf->setStringAttr(WebCore::String::fromUTF8(g_value_get_string(value)) );
+ break;
+ }
+ case PROP_ATTR_WITH_EXCEPTION:
+ {
+ coreSelf->setAttrWithException((g_value_get_long(value)) );
+ break;
+ }
+ case PROP_ATTR_WITH_SETTER_EXCEPTION:
+ {
+ coreSelf->setAttrWithSetterException((g_value_get_long(value)) );
+ break;
+ }
+ case PROP_ATTR_WITH_GETTER_EXCEPTION:
+ {
+ coreSelf->setAttrWithGetterException((g_value_get_long(value)) );
+ break;
+ }
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+
+static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
+{
+ WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
+ WebCore::TestObj* coreSelf = WebKit::core(self);
+ switch (prop_id) {
+ case PROP_READ_ONLY_INT_ATTR:
+ {
+ g_value_set_long(value, coreSelf->readOnlyIntAttr());
+ break;
+ }
+ case PROP_READ_ONLY_STRING_ATTR:
+ {
+ g_value_take_string(value, convertToUTF8String(coreSelf->readOnlyStringAttr()));
+ break;
+ }
+ case PROP_READ_ONLY_TEST_OBJ_ATTR:
+ {
+ RefPtr<WebCore::TestObj> ptr = coreSelf->readOnlyTestObjAttr();
+ g_value_set_object(value, WebKit::kit(ptr.get()));
+ break;
+ }
+ case PROP_INT_ATTR:
+ {
+ g_value_set_long(value, coreSelf->intAttr());
+ break;
+ }
+ case PROP_LONG_LONG_ATTR:
+ {
+ g_value_set_int64(value, coreSelf->longLongAttr());
+ break;
+ }
+ case PROP_UNSIGNED_LONG_LONG_ATTR:
+ {
+ g_value_set_uint64(value, coreSelf->unsignedLongLongAttr());
+ break;
+ }
+ case PROP_STRING_ATTR:
+ {
+ g_value_take_string(value, convertToUTF8String(coreSelf->stringAttr()));
+ break;
+ }
+ case PROP_TEST_OBJ_ATTR:
+ {
+ RefPtr<WebCore::TestObj> ptr = coreSelf->testObjAttr();
+ g_value_set_object(value, WebKit::kit(ptr.get()));
+ break;
+ }
+ case PROP_ATTR_WITH_EXCEPTION:
+ {
+ g_value_set_long(value, coreSelf->attrWithException());
+ break;
+ }
+ case PROP_ATTR_WITH_SETTER_EXCEPTION:
+ {
+ g_value_set_long(value, coreSelf->attrWithSetterException());
+ break;
+ }
+ case PROP_ATTR_WITH_GETTER_EXCEPTION:
+ {
+ g_value_set_long(value, coreSelf->attrWithGetterException());
+ break;
+ }
+ case PROP_SCRIPT_STRING_ATTR:
+ {
+ g_value_take_string(value, convertToUTF8String(coreSelf->scriptStringAttr()));
+ break;
+ }
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+
+static void webkit_dom_test_obj_class_init(WebKitDOMTestObjClass* requestClass)
+{
+ GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
+ gobjectClass->finalize = webkit_dom_test_obj_finalize;
+ gobjectClass->set_property = webkit_dom_test_obj_set_property;
+ gobjectClass->get_property = webkit_dom_test_obj_get_property;
+
+ g_object_class_install_property(gobjectClass,
+ PROP_READ_ONLY_INT_ATTR,
+ g_param_spec_long("read-only-int-attr", /* name */
+ "test_obj_read-only-int-attr", /* short description */
+ "read-only glong TestObj.read-only-int-attr", /* longer - could do with some extra doc stuff here */
+ G_MINLONG, /* min */
+G_MAXLONG, /* max */
+0, /* default */
+ WEBKIT_PARAM_READABLE));
+ g_object_class_install_property(gobjectClass,
+ PROP_READ_ONLY_STRING_ATTR,
+ g_param_spec_string("read-only-string-attr", /* name */
+ "test_obj_read-only-string-attr", /* short description */
+ "read-only gchar* TestObj.read-only-string-attr", /* longer - could do with some extra doc stuff here */
+ "", /* default */
+ WEBKIT_PARAM_READABLE));
+ g_object_class_install_property(gobjectClass,
+ PROP_READ_ONLY_TEST_OBJ_ATTR,
+ g_param_spec_object("read-only-test-obj-attr", /* name */
+ "test_obj_read-only-test-obj-attr", /* short description */
+ "read-only WebKitDOMTestObj* TestObj.read-only-test-obj-attr", /* longer - could do with some extra doc stuff here */
+ WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
+ WEBKIT_PARAM_READABLE));
+ g_object_class_install_property(gobjectClass,
+ PROP_INT_ATTR,
+ g_param_spec_long("int-attr", /* name */
+ "test_obj_int-attr", /* short description */
+ "read-write glong TestObj.int-attr", /* longer - could do with some extra doc stuff here */
+ G_MINLONG, /* min */
+G_MAXLONG, /* max */
+0, /* default */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_LONG_LONG_ATTR,
+ g_param_spec_int64("long-long-attr", /* name */
+ "test_obj_long-long-attr", /* short description */
+ "read-write gint64 TestObj.long-long-attr", /* longer - could do with some extra doc stuff here */
+ G_MININT64, /* min */
+G_MAXINT64, /* max */
+0, /* default */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_UNSIGNED_LONG_LONG_ATTR,
+ g_param_spec_uint64("unsigned-long-long-attr", /* name */
+ "test_obj_unsigned-long-long-attr", /* short description */
+ "read-write guint64 TestObj.unsigned-long-long-attr", /* longer - could do with some extra doc stuff here */
+ 0, /* min */
+G_MAXUINT64, /* min */
+0, /* default */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_STRING_ATTR,
+ g_param_spec_string("string-attr", /* name */
+ "test_obj_string-attr", /* short description */
+ "read-write gchar* TestObj.string-attr", /* longer - could do with some extra doc stuff here */
+ "", /* default */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_TEST_OBJ_ATTR,
+ g_param_spec_object("test-obj-attr", /* name */
+ "test_obj_test-obj-attr", /* short description */
+ "read-write WebKitDOMTestObj* TestObj.test-obj-attr", /* longer - could do with some extra doc stuff here */
+ WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_ATTR_WITH_EXCEPTION,
+ g_param_spec_long("attr-with-exception", /* name */
+ "test_obj_attr-with-exception", /* short description */
+ "read-write glong TestObj.attr-with-exception", /* longer - could do with some extra doc stuff here */
+ G_MINLONG, /* min */
+G_MAXLONG, /* max */
+0, /* default */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_ATTR_WITH_SETTER_EXCEPTION,
+ g_param_spec_long("attr-with-setter-exception", /* name */
+ "test_obj_attr-with-setter-exception", /* short description */
+ "read-write glong TestObj.attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
+ G_MINLONG, /* min */
+G_MAXLONG, /* max */
+0, /* default */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_ATTR_WITH_GETTER_EXCEPTION,
+ g_param_spec_long("attr-with-getter-exception", /* name */
+ "test_obj_attr-with-getter-exception", /* short description */
+ "read-write glong TestObj.attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
+ G_MINLONG, /* min */
+G_MAXLONG, /* max */
+0, /* default */
+ WEBKIT_PARAM_READWRITE));
+ g_object_class_install_property(gobjectClass,
+ PROP_SCRIPT_STRING_ATTR,
+ g_param_spec_string("script-string-attr", /* name */
+ "test_obj_script-string-attr", /* short description */
+ "read-only gchar* TestObj.script-string-attr", /* longer - could do with some extra doc stuff here */
+ "", /* default */
+ WEBKIT_PARAM_READABLE));
+
+
+
+}
+
+static void webkit_dom_test_obj_init(WebKitDOMTestObj* request)
+{
+}
+
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
new file mode 100644
index 0000000..f8ad9c4
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
@@ -0,0 +1,177 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef WebKitDOMTestObj_h
+#define WebKitDOMTestObj_h
+
+#include "webkit/webkitdomdefines.h"
+#include <glib-object.h>
+#include <webkit/webkitdefines.h>
+#include "webkit/WebKitDOMObject.h"
+
+
+G_BEGIN_DECLS
+#define WEBKIT_TYPE_DOM_TEST_OBJ (webkit_dom_test_obj_get_type())
+#define WEBKIT_DOM_TEST_OBJ(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOM_TEST_OBJ, WebKitDOMTestObj))
+#define WEBKIT_DOM_TEST_OBJ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_DOM_TEST_OBJ, WebKitDOMTestObjClass)
+#define WEBKIT_DOM_IS_TEST_OBJ(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOM_TEST_OBJ))
+#define WEBKIT_DOM_IS_TEST_OBJ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_DOM_TEST_OBJ))
+#define WEBKIT_DOM_TEST_OBJ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_DOM_TEST_OBJ, WebKitDOMTestObjClass))
+
+struct _WebKitDOMTestObj {
+ WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMTestObjClass {
+ WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_test_obj_get_type (void);
+
+WEBKIT_API void
+webkit_dom_test_obj_void_method (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_void_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg);
+
+WEBKIT_API glong
+webkit_dom_test_obj_int_method (WebKitDOMTestObj *self);
+
+WEBKIT_API glong
+webkit_dom_test_obj_int_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg);
+
+WEBKIT_API WebKitDOMTestObj*
+webkit_dom_test_obj_obj_method (WebKitDOMTestObj *self);
+
+WEBKIT_API WebKitDOMTestObj*
+webkit_dom_test_obj_obj_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg);
+
+WEBKIT_API void
+webkit_dom_test_obj_serialized_value (WebKitDOMTestObj *self, WebKitDOMSerializedScriptValue* serialized_arg);
+
+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);
+
+WEBKIT_API void
+webkit_dom_test_obj_with_dynamic_frame_and_arg (WebKitDOMTestObj *self, glong int_arg);
+
+WEBKIT_API void
+webkit_dom_test_obj_with_dynamic_frame_and_optional_arg (WebKitDOMTestObj *self, glong int_arg, glong optional_arg);
+
+WEBKIT_API void
+webkit_dom_test_obj_with_dynamic_frame_and_user_gesture (WebKitDOMTestObj *self, glong int_arg);
+
+WEBKIT_API void
+webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad (WebKitDOMTestObj *self, glong int_arg, glong optional_arg);
+
+WEBKIT_API void
+webkit_dom_test_obj_with_script_state_void (WebKitDOMTestObj *self);
+
+WEBKIT_API WebKitDOMTestObj*
+webkit_dom_test_obj_with_script_state_obj (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_with_script_state_void_exception (WebKitDOMTestObj *self, GError **error);
+
+WEBKIT_API WebKitDOMTestObj*
+webkit_dom_test_obj_with_script_state_obj_exception (WebKitDOMTestObj *self, GError **error);
+
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_arg (WebKitDOMTestObj *self, glong opt);
+
+WEBKIT_API void
+webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg (WebKitDOMTestObj *self, glong non_opt, glong opt);
+
+WEBKIT_API void
+webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args (WebKitDOMTestObj *self, glong non_opt, glong opt1, glong opt2);
+
+WEBKIT_API glong
+webkit_dom_test_obj_get_read_only_int_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API gchar*
+webkit_dom_test_obj_get_read_only_string_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API WebKitDOMTestObj*
+webkit_dom_test_obj_get_read_only_test_obj_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API glong
+webkit_dom_test_obj_get_int_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_int_attr (WebKitDOMTestObj *self, glong value);
+
+WEBKIT_API gint64
+webkit_dom_test_obj_get_long_long_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_long_long_attr (WebKitDOMTestObj *self, gint64 value);
+
+WEBKIT_API guint64
+webkit_dom_test_obj_get_unsigned_long_long_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_unsigned_long_long_attr (WebKitDOMTestObj *self, guint64 value);
+
+WEBKIT_API gchar*
+webkit_dom_test_obj_get_string_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_string_attr (WebKitDOMTestObj *self, gchar* value);
+
+WEBKIT_API WebKitDOMTestObj*
+webkit_dom_test_obj_get_test_obj_attr (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_test_obj_attr (WebKitDOMTestObj *self, WebKitDOMTestObj* value);
+
+WEBKIT_API glong
+webkit_dom_test_obj_get_attr_with_exception (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_attr_with_exception (WebKitDOMTestObj *self, glong value);
+
+WEBKIT_API glong
+webkit_dom_test_obj_get_attr_with_setter_exception (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_attr_with_setter_exception (WebKitDOMTestObj *self, glong value);
+
+WEBKIT_API glong
+webkit_dom_test_obj_get_attr_with_getter_exception (WebKitDOMTestObj *self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_attr_with_getter_exception (WebKitDOMTestObj *self, glong value);
+
+WEBKIT_API gchar*
+webkit_dom_test_obj_get_script_string_attr (WebKitDOMTestObj *self);
+
+G_END_DECLS
+
+#endif /* WebKitDOMTestObj_h */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h
new file mode 100644
index 0000000..78cd87f
--- /dev/null
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h
@@ -0,0 +1,39 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef WEB_KIT_DOM_TEST_OBJ_PRIVATE_H
+#define WEB_KIT_DOM_TEST_OBJ_PRIVATE_H
+
+#include <glib-object.h>
+#include <webkit/WebKitDOMObject.h>
+#include "TestObj.h"
+namespace WebKit {
+ WebKitDOMTestObj *
+ wrapTestObj(WebCore::TestObj *coreObject);
+
+ WebCore::TestObj *
+ core(WebKitDOMTestObj *request);
+
+ gpointer
+ kit(WebCore::TestObj* node);
+
+} // namespace WebKit
+
+#endif /* WEB_KIT_DOM_TEST_OBJ_PRIVATE_H */
diff --git a/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp b/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp
new file mode 100644
index 0000000..2d0cfae
--- /dev/null
+++ b/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp
@@ -0,0 +1,100 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#if ENABLE(DATABASE)
+
+#include "JSTestCallback.h"
+
+#include "JSClass1.h"
+#include "JSClass2.h"
+#include "ScriptExecutionContext.h"
+#include <runtime/JSLock.h>
+#include <wtf/MainThread.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSTestCallback::JSTestCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
+ : m_data(new JSCallbackData(callback, globalObject))
+ , m_isolatedWorld(globalObject->world())
+{
+}
+
+JSTestCallback::~JSTestCallback()
+{
+ callOnMainThread(JSCallbackData::deleteData, m_data);
+#ifndef NDEBUG
+ m_data = 0;
+#endif
+}
+
+// Functions
+
+bool JSTestCallback::callbackWithClass1Param(ScriptExecutionContext* context, Class1* class1Param)
+{
+ ASSERT(m_data);
+ ASSERT(context);
+
+ RefPtr<JSTestCallback> protect(this);
+
+ JSLock lock(SilenceAssertionsOnly);
+
+ JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld.get());
+ if (!globalObject)
+ return true;
+
+ ExecState* exec = globalObject->globalExec();
+ MarkedArgumentBuffer args;
+ args.append(toJS(exec, class1Param));
+
+ bool raisedException = false;
+ m_data->invokeCallback(args, &raisedException);
+ return !raisedException;
+}
+
+bool JSTestCallback::callbackWithClass2Param(ScriptExecutionContext* context, Class2* class2Param, const String& strArg)
+{
+ ASSERT(m_data);
+ ASSERT(context);
+
+ RefPtr<JSTestCallback> protect(this);
+
+ JSLock lock(SilenceAssertionsOnly);
+
+ JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld.get());
+ if (!globalObject)
+ return true;
+
+ ExecState* exec = globalObject->globalExec();
+ MarkedArgumentBuffer args;
+ args.append(toJS(exec, class2Param));
+ args.append(toJS(exec, strArg));
+
+ bool raisedException = false;
+ m_data->invokeCallback(args, &raisedException);
+ return !raisedException;
+}
+
+}
+
+#endif // ENABLE(DATABASE)
diff --git a/WebCore/bindings/scripts/test/JS/JSTestCallback.h b/WebCore/bindings/scripts/test/JS/JSTestCallback.h
new file mode 100644
index 0000000..6e8f083
--- /dev/null
+++ b/WebCore/bindings/scripts/test/JS/JSTestCallback.h
@@ -0,0 +1,58 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef JSTestCallback_h
+#define JSTestCallback_h
+
+#if ENABLE(DATABASE)
+
+#include "JSCallbackData.h"
+#include "TestCallback.h"
+#include <wtf/Forward.h>
+
+namespace WebCore {
+
+class JSTestCallback : public TestCallback {
+public:
+ static PassRefPtr<JSTestCallback> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)
+ {
+ return adoptRef(new JSTestCallback(callback, globalObject));
+ }
+
+ virtual ~JSTestCallback();
+
+ // Functions
+ virtual bool callbackWithClass1Param(ScriptExecutionContext*, Class1* class1Param);
+ virtual bool callbackWithClass2Param(ScriptExecutionContext*, Class2* class2Param, const String& strArg);
+ COMPILE_ASSERT(false) virtual int callbackWithNonBoolReturnType(ScriptExecutionContext*, Class3* class3Param);
+ virtual int customCallback(ScriptExecutionContext*, Class5* class5Param, Class6* class6Param);
+
+private:
+ JSTestCallback(JSC::JSObject* callback, JSDOMGlobalObject*);
+
+ JSCallbackData* m_data;
+ RefPtr<DOMWrapperWorld> m_isolatedWorld;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(DATABASE)
+
+#endif
diff --git a/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
new file mode 100644
index 0000000..8855481
--- /dev/null
+++ b/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
@@ -0,0 +1,193 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "JSTestInterface.h"
+
+#include "TestInterface.h"
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+ASSERT_CLASS_FITS_IN_CELL(JSTestInterface);
+
+/* Hash table */
+#if ENABLE(JIT)
+#define THUNK_GENERATOR(generator) , generator
+#else
+#define THUNK_GENERATOR(generator)
+#endif
+
+static const HashTableValue JSTestInterfaceTableValues[2] =
+{
+ { "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
+ { 0, 0, 0, 0 THUNK_GENERATOR(0) }
+};
+
+#undef THUNK_GENERATOR
+static JSC_CONST_HASHTABLE HashTable JSTestInterfaceTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSTestInterfaceTableValues, 0 };
+#else
+ { 2, 1, JSTestInterfaceTableValues, 0 };
+#endif
+
+/* Hash table for constructor */
+#if ENABLE(JIT)
+#define THUNK_GENERATOR(generator) , generator
+#else
+#define THUNK_GENERATOR(generator)
+#endif
+
+static const HashTableValue JSTestInterfaceConstructorTableValues[1] =
+{
+ { 0, 0, 0, 0 THUNK_GENERATOR(0) }
+};
+
+#undef THUNK_GENERATOR
+static JSC_CONST_HASHTABLE HashTable JSTestInterfaceConstructorTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSTestInterfaceConstructorTableValues, 0 };
+#else
+ { 1, 0, JSTestInterfaceConstructorTableValues, 0 };
+#endif
+
+class JSTestInterfaceConstructor : public DOMConstructorObject {
+public:
+ JSTestInterfaceConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
+ : DOMConstructorObject(JSTestInterfaceConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ {
+ putDirect(exec->propertyNames().prototype, JSTestInterfacePrototype::self(exec, globalObject), None);
+ }
+ virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual const ClassInfo* classInfo() const { return &s_info; }
+ static const ClassInfo s_info;
+
+ static PassRefPtr<Structure> createStructure(JSValue proto)
+ {
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+protected:
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags;
+ static JSObject* constructTestInterface(ExecState* exec, JSObject* constructor, const ArgList&)
+ {
+ ScriptExecutionContext* context = static_cast<JSTestInterfaceConstructor*>(constructor)->scriptExecutionContext();
+ if (!context)
+ return throwError(exec, ReferenceError);
+ return asObject(toJS(exec, static_cast<JSTestInterfaceConstructor*>(constructor)->globalObject(), TestInterface::create(context)));
+ }
+ virtual ConstructType getConstructData(ConstructData& constructData)
+ {
+ constructData.native.function = constructTestInterface;
+ return ConstructTypeHost;
+ }
+};
+
+const ClassInfo JSTestInterfaceConstructor::s_info = { "TestInterfaceConstructor", 0, &JSTestInterfaceConstructorTable, 0 };
+
+bool JSTestInterfaceConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSTestInterfaceConstructor, DOMObject>(exec, &JSTestInterfaceConstructorTable, this, propertyName, slot);
+}
+
+bool JSTestInterfaceConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSTestInterfaceConstructor, DOMObject>(exec, &JSTestInterfaceConstructorTable, this, propertyName, descriptor);
+}
+
+/* Hash table for prototype */
+#if ENABLE(JIT)
+#define THUNK_GENERATOR(generator) , generator
+#else
+#define THUNK_GENERATOR(generator)
+#endif
+
+static const HashTableValue JSTestInterfacePrototypeTableValues[1] =
+{
+ { 0, 0, 0, 0 THUNK_GENERATOR(0) }
+};
+
+#undef THUNK_GENERATOR
+static JSC_CONST_HASHTABLE HashTable JSTestInterfacePrototypeTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSTestInterfacePrototypeTableValues, 0 };
+#else
+ { 1, 0, JSTestInterfacePrototypeTableValues, 0 };
+#endif
+
+const ClassInfo JSTestInterfacePrototype::s_info = { "TestInterfacePrototype", 0, &JSTestInterfacePrototypeTable, 0 };
+
+JSObject* JSTestInterfacePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestInterface>(exec, globalObject);
+}
+
+const ClassInfo JSTestInterface::s_info = { "TestInterface", 0, &JSTestInterfaceTable, 0 };
+
+JSTestInterface::JSTestInterface(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestInterface> impl)
+ : DOMObjectWithGlobalPointer(structure, globalObject)
+ , m_impl(impl)
+{
+}
+
+JSTestInterface::~JSTestInterface()
+{
+ forgetDOMObject(this, impl());
+}
+
+JSObject* JSTestInterface::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return new (exec) JSTestInterfacePrototype(JSTestInterfacePrototype::createStructure(globalObject->objectPrototype()));
+}
+
+bool JSTestInterface::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSTestInterface, Base>(exec, &JSTestInterfaceTable, this, propertyName, slot);
+}
+
+bool JSTestInterface::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSTestInterface, Base>(exec, &JSTestInterfaceTable, this, propertyName, descriptor);
+}
+
+JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ 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));
+}
+
+JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestInterface* object)
+{
+ return getDOMObjectWrapper<JSTestInterface>(exec, globalObject, object);
+}
+TestInterface* toTestInterface(JSC::JSValue value)
+{
+ return value.inherits(&JSTestInterface::s_info) ? static_cast<JSTestInterface*>(asObject(value))->impl() : 0;
+}
+
+}
diff --git a/WebCore/bindings/scripts/test/JS/JSTestInterface.h b/WebCore/bindings/scripts/test/JS/JSTestInterface.h
new file mode 100644
index 0000000..c076dbd
--- /dev/null
+++ b/WebCore/bindings/scripts/test/JS/JSTestInterface.h
@@ -0,0 +1,81 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef JSTestInterface_h
+#define JSTestInterface_h
+
+#include "JSDOMBinding.h"
+#include <runtime/JSGlobalObject.h>
+#include <runtime/ObjectPrototype.h>
+
+namespace WebCore {
+
+class TestInterface;
+
+class JSTestInterface : public DOMObjectWithGlobalPointer {
+ typedef DOMObjectWithGlobalPointer Base;
+public:
+ JSTestInterface(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TestInterface>);
+ virtual ~JSTestInterface();
+ static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+ static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
+ TestInterface* impl() const { return m_impl.get(); }
+
+private:
+ RefPtr<TestInterface> m_impl;
+protected:
+ static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+};
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
+TestInterface* toTestInterface(JSC::JSValue);
+
+class JSTestInterfacePrototype : public JSC::JSObject {
+ typedef JSC::JSObject Base;
+public:
+ static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+ JSTestInterfacePrototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
+protected:
+ static const unsigned StructureFlags = Base::StructureFlags;
+};
+
+// Attributes
+
+JSC::JSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+
+} // namespace WebCore
+
+#endif
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
new file mode 100644
index 0000000..da99de2
--- /dev/null
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -0,0 +1,813 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "JSTestObj.h"
+
+#include "JSEventListener.h"
+#include "JSTestObj.h"
+#include "JSlog.h"
+#include "KURL.h"
+#include "ScriptCallStack.h"
+#include "SerializedScriptValue.h"
+#include "TestObj.h"
+#include <runtime/Error.h>
+#include <runtime/JSNumberCell.h>
+#include <runtime/JSString.h>
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+ASSERT_CLASS_FITS_IN_CELL(JSTestObj);
+
+/* Hash table */
+#if ENABLE(JIT)
+#define THUNK_GENERATOR(generator) , generator
+#else
+#define THUNK_GENERATOR(generator)
+#endif
+
+static const HashTableValue JSTestObjTableValues[15] =
+{
+ { "readOnlyIntAttr", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "readOnlyStringAttr", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "readOnlyTestObjAttr", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyTestObjAttr), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "intAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjIntAttr), (intptr_t)setJSTestObjIntAttr THUNK_GENERATOR(0) },
+ { "longLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongAttr), (intptr_t)setJSTestObjLongLongAttr THUNK_GENERATOR(0) },
+ { "unsignedLongLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t)setJSTestObjUnsignedLongLongAttr THUNK_GENERATOR(0) },
+ { "stringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t)setJSTestObjStringAttr THUNK_GENERATOR(0) },
+ { "testObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t)setJSTestObjTestObjAttr THUNK_GENERATOR(0) },
+ { "attrWithException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithException), (intptr_t)setJSTestObjAttrWithException THUNK_GENERATOR(0) },
+ { "attrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t)setJSTestObjAttrWithSetterException THUNK_GENERATOR(0) },
+ { "attrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t)setJSTestObjAttrWithGetterException THUNK_GENERATOR(0) },
+ { "customAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t)setJSTestObjCustomAttr THUNK_GENERATOR(0) },
+ { "scriptStringAttr", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjScriptStringAttr), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
+ { 0, 0, 0, 0 THUNK_GENERATOR(0) }
+};
+
+#undef THUNK_GENERATOR
+static JSC_CONST_HASHTABLE HashTable JSTestObjTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 127, JSTestObjTableValues, 0 };
+#else
+ { 34, 31, JSTestObjTableValues, 0 };
+#endif
+
+/* Hash table for constructor */
+#if ENABLE(JIT)
+#define THUNK_GENERATOR(generator) , generator
+#else
+#define THUNK_GENERATOR(generator)
+#endif
+
+static const HashTableValue JSTestObjConstructorTableValues[1] =
+{
+ { 0, 0, 0, 0 THUNK_GENERATOR(0) }
+};
+
+#undef THUNK_GENERATOR
+static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSTestObjConstructorTableValues, 0 };
+#else
+ { 1, 0, JSTestObjConstructorTableValues, 0 };
+#endif
+
+class JSTestObjConstructor : public DOMConstructorObject {
+public:
+ JSTestObjConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
+ : DOMConstructorObject(JSTestObjConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ {
+ putDirect(exec->propertyNames().prototype, JSTestObjPrototype::self(exec, globalObject), None);
+ }
+ virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual const ClassInfo* classInfo() const { return &s_info; }
+ static const ClassInfo s_info;
+
+ static PassRefPtr<Structure> createStructure(JSValue proto)
+ {
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+protected:
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags;
+};
+
+const ClassInfo JSTestObjConstructor::s_info = { "TestObjConstructor", 0, &JSTestObjConstructorTable, 0 };
+
+bool JSTestObjConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSTestObjConstructor, DOMObject>(exec, &JSTestObjConstructorTable, this, propertyName, slot);
+}
+
+bool JSTestObjConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSTestObjConstructor, DOMObject>(exec, &JSTestObjConstructorTable, this, propertyName, descriptor);
+}
+
+/* Hash table for prototype */
+#if ENABLE(JIT)
+#define THUNK_GENERATOR(generator) , generator
+#else
+#define THUNK_GENERATOR(generator)
+#endif
+
+static const HashTableValue JSTestObjPrototypeTableValues[26] =
+{
+ { "voidMethod", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "voidMethodWithArgs", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) },
+ { "intMethod", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethod), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "intMethodWithArgs", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) },
+ { "objMethod", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "objMethodWithArgs", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) },
+ { "serializedValue", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t)1 THUNK_GENERATOR(0) },
+ { "methodWithException", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithException), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "customMethod", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethod), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "customMethodWithArgs", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) },
+ { "customArgsAndException", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomArgsAndException), (intptr_t)1 THUNK_GENERATOR(0) },
+ { "addEventListener", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t)3 THUNK_GENERATOR(0) },
+ { "removeEventListener", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t)3 THUNK_GENERATOR(0) },
+ { "withDynamicFrame", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithDynamicFrame), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "withDynamicFrameAndArg", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithDynamicFrameAndArg), (intptr_t)1 THUNK_GENERATOR(0) },
+ { "withDynamicFrameAndOptionalArg", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg), (intptr_t)2 THUNK_GENERATOR(0) },
+ { "withDynamicFrameAndUserGesture", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture), (intptr_t)1 THUNK_GENERATOR(0) },
+ { "withDynamicFrameAndUserGestureASAD", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD), (intptr_t)2 THUNK_GENERATOR(0) },
+ { "withScriptStateVoid", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoid), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "withScriptStateObj", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObj), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "withScriptStateVoidException", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoidException), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "withScriptStateObjException", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObjException), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "methodWithOptionalArg", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t)1 THUNK_GENERATOR(0) },
+ { "methodWithNonOptionalArgAndOptionalArg", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t)2 THUNK_GENERATOR(0) },
+ { "methodWithNonOptionalArgAndTwoOptionalArgs", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t)3 THUNK_GENERATOR(0) },
+ { 0, 0, 0, 0 THUNK_GENERATOR(0) }
+};
+
+#undef THUNK_GENERATOR
+static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 8191, JSTestObjPrototypeTableValues, 0 };
+#else
+ { 67, 63, JSTestObjPrototypeTableValues, 0 };
+#endif
+
+const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", 0, &JSTestObjPrototypeTable, 0 };
+
+JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestObj>(exec, globalObject);
+}
+
+bool JSTestObjPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticFunctionSlot<JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, slot);
+}
+
+bool JSTestObjPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticFunctionDescriptor<JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, descriptor);
+}
+
+const ClassInfo JSTestObj::s_info = { "TestObj", 0, &JSTestObjTable, 0 };
+
+JSTestObj::JSTestObj(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl)
+ : DOMObjectWithGlobalPointer(structure, globalObject)
+ , m_impl(impl)
+{
+}
+
+JSTestObj::~JSTestObj()
+{
+ forgetDOMObject(this, impl());
+}
+
+JSObject* JSTestObj::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return new (exec) JSTestObjPrototype(JSTestObjPrototype::createStructure(globalObject->objectPrototype()));
+}
+
+bool JSTestObj::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSTestObj, Base>(exec, &JSTestObjTable, this, propertyName, slot);
+}
+
+bool JSTestObj::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSTestObj, Base>(exec, &JSTestObjTable, this, propertyName, descriptor);
+}
+
+JSValue jsTestObjReadOnlyIntAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsNumber(exec, imp->readOnlyIntAttr());
+ return result;
+}
+
+JSValue jsTestObjReadOnlyStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsString(exec, imp->readOnlyStringAttr());
+ return result;
+}
+
+JSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->readOnlyTestObjAttr()));
+ return result;
+}
+
+JSValue jsTestObjIntAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsNumber(exec, imp->intAttr());
+ return result;
+}
+
+JSValue jsTestObjLongLongAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsNumber(exec, imp->longLongAttr());
+ return result;
+}
+
+JSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsNumber(exec, imp->unsignedLongLongAttr());
+ return result;
+}
+
+JSValue jsTestObjStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsString(exec, imp->stringAttr());
+ return result;
+}
+
+JSValue jsTestObjTestObjAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->testObjAttr()));
+ return result;
+}
+
+JSValue jsTestObjAttrWithException(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsNumber(exec, imp->attrWithException());
+ return result;
+}
+
+JSValue jsTestObjAttrWithSetterException(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsNumber(exec, imp->attrWithSetterException());
+ return result;
+}
+
+JSValue jsTestObjAttrWithGetterException(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsNumber(exec, imp->attrWithGetterException());
+ return result;
+}
+
+JSValue jsTestObjCustomAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ return castedThis->customAttr(exec);
+}
+
+JSValue jsTestObjScriptStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue result = jsOwnedStringOrNull(exec, imp->scriptStringAttr());
+ return result;
+}
+
+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);
+}
+
+void setJSTestObjIntAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setIntAttr(value.toInt32(exec));
+}
+
+void setJSTestObjLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setLongLongAttr(static_cast<long long>(value.toInteger(exec)));
+}
+
+void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setUnsignedLongLongAttr(static_cast<unsigned long long>(value.toInteger(exec)));
+}
+
+void setJSTestObjStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setStringAttr(ustringToString(value.toString(exec)));
+}
+
+void setJSTestObjTestObjAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setTestObjAttr(toTestObj(value));
+}
+
+void setJSTestObjAttrWithException(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setAttrWithException(value.toInt32(exec));
+}
+
+void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setAttrWithSetterException(value.toInt32(exec));
+}
+
+void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ imp->setAttrWithGetterException(value.toInt32(exec));
+}
+
+void setJSTestObjCustomAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ static_cast<JSTestObj*>(thisObject)->setCustomAttr(exec, value);
+}
+
+JSValue JSTestObj::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMConstructor<JSTestObjConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+
+ imp->voidMethod();
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ int intArg = args.at(0).toInt32(exec);
+ const String& strArg = ustringToString(args.at(1).toString(exec));
+ TestObj* objArg = toTestObj(args.at(2));
+
+ imp->voidMethodWithArgs(intArg, strArg, objArg);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+
+
+ JSC::JSValue result = jsNumber(exec, imp->intMethod());
+ return result;
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ int intArg = args.at(0).toInt32(exec);
+ const String& strArg = ustringToString(args.at(1).toString(exec));
+ TestObj* objArg = toTestObj(args.at(2));
+
+
+ JSC::JSValue result = jsNumber(exec, imp->intMethodWithArgs(intArg, strArg, objArg));
+ return result;
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+
+
+ JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->objMethod()));
+ return result;
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ int intArg = args.at(0).toInt32(exec);
+ const String& strArg = ustringToString(args.at(1).toString(exec));
+ TestObj* objArg = toTestObj(args.at(2));
+
+
+ JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->objMethodWithArgs(intArg, strArg, objArg)));
+ return result;
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(exec, args.at(0));
+
+ imp->serializedValue(serializedArg);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ ExceptionCode ec = 0;
+
+ imp->methodWithException(ec);
+ setDOMException(exec, ec);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ return castedThis->customMethod(exec, args);
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ return castedThis->customMethodWithArgs(exec, args);
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ ExceptionCode ec = 0;
+ ScriptCallStack callStack(exec, args, 1);
+ log* intArg = tolog(args.at(0));
+
+ imp->customArgsAndException(intArg, &callStack, ec);
+ setDOMException(exec, ec);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue listener = args.at(1);
+ if (!listener.isObject())
+ return jsUndefined();
+ imp->addEventListener(ustringToAtomicString(args.at(0).toString(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), args.at(2).toBoolean(exec));
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ JSValue listener = args.at(1);
+ if (!listener.isObject())
+ return jsUndefined();
+ imp->removeEventListener(ustringToAtomicString(args.at(0).toString(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), args.at(2).toBoolean(exec));
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ Frame* dynamicFrame = toDynamicFrame(exec);
+ if (!dynamicFrame)
+ return jsUndefined();
+
+ imp->withDynamicFrame(dynamicFrame);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ Frame* dynamicFrame = toDynamicFrame(exec);
+ if (!dynamicFrame)
+ return jsUndefined();
+ int intArg = args.at(1).toInt32(exec);
+
+ imp->withDynamicFrameAndArg(dynamicFrame, intArg);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ Frame* dynamicFrame = toDynamicFrame(exec);
+ if (!dynamicFrame)
+ return jsUndefined();
+ int intArg = args.at(1).toInt32(exec);
+
+ int argsCount = args.size();
+ if (argsCount < 3) {
+ imp->withDynamicFrameAndOptionalArg(dynamicFrame, intArg);
+ return jsUndefined();
+ }
+
+ int optionalArg = args.at(2).toInt32(exec);
+
+ imp->withDynamicFrameAndOptionalArg(dynamicFrame, intArg, optionalArg);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ Frame* dynamicFrame = toDynamicFrame(exec);
+ if (!dynamicFrame)
+ return jsUndefined();
+ int intArg = args.at(1).toInt32(exec);
+
+ imp->withDynamicFrameAndUserGesture(dynamicFrame, intArg, processingUserGesture(exec));
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ Frame* dynamicFrame = toDynamicFrame(exec);
+ if (!dynamicFrame)
+ return jsUndefined();
+ int intArg = args.at(1).toInt32(exec);
+
+ int argsCount = args.size();
+ if (argsCount < 3) {
+ imp->withDynamicFrameAndUserGestureASAD(dynamicFrame, intArg);
+ return jsUndefined();
+ }
+
+ int optionalArg = args.at(2).toInt32(exec);
+
+ imp->withDynamicFrameAndUserGestureASAD(dynamicFrame, intArg, optionalArg, processingUserGesture(exec));
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+
+ imp->withScriptStateVoid(exec);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+
+
+ JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->withScriptStateObj(exec)));
+ if (exec->hadException())
+ return jsUndefined();
+ return result;
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ ExceptionCode ec = 0;
+
+ imp->withScriptStateVoidException(exec, ec);
+ setDOMException(exec, ec);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ ExceptionCode ec = 0;
+
+
+ JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->withScriptStateObjException(exec, ec)));
+ setDOMException(exec, ec);
+ if (exec->hadException())
+ return jsUndefined();
+ return result;
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+
+ int argsCount = args.size();
+ if (argsCount < 1) {
+ imp->methodWithOptionalArg();
+ return jsUndefined();
+ }
+
+ int opt = args.at(0).toInt32(exec);
+
+ imp->methodWithOptionalArg(opt);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ int nonOpt = args.at(0).toInt32(exec);
+
+ int argsCount = args.size();
+ if (argsCount < 2) {
+ imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
+ return jsUndefined();
+ }
+
+ int opt = args.at(1).toInt32(exec);
+
+ imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
+ return jsUndefined();
+}
+
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwError(exec, TypeError);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ int nonOpt = args.at(0).toInt32(exec);
+
+ int argsCount = args.size();
+ if (argsCount < 2) {
+ imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
+ return jsUndefined();
+ }
+
+ int opt1 = args.at(1).toInt32(exec);
+ if (argsCount < 3) {
+ imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
+ return jsUndefined();
+ }
+
+ int opt2 = args.at(2).toInt32(exec);
+
+ imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
+ return jsUndefined();
+}
+
+JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* object)
+{
+ return getDOMObjectWrapper<JSTestObj>(exec, globalObject, object);
+}
+TestObj* toTestObj(JSC::JSValue value)
+{
+ return value.inherits(&JSTestObj::s_info) ? static_cast<JSTestObj*>(asObject(value))->impl() : 0;
+}
+
+}
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.h b/WebCore/bindings/scripts/test/JS/JSTestObj.h
new file mode 100644
index 0000000..f726efb
--- /dev/null
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -0,0 +1,141 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef JSTestObj_h
+#define JSTestObj_h
+
+#include "JSDOMBinding.h"
+#include <runtime/JSGlobalObject.h>
+#include <runtime/ObjectPrototype.h>
+
+namespace WebCore {
+
+class TestObj;
+
+class JSTestObj : public DOMObjectWithGlobalPointer {
+ typedef DOMObjectWithGlobalPointer Base;
+public:
+ JSTestObj(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TestObj>);
+ virtual ~JSTestObj();
+ static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
+ virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+ static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
+
+ // Custom attributes
+ JSC::JSValue customAttr(JSC::ExecState*) const;
+ void setCustomAttr(JSC::ExecState*, JSC::JSValue);
+
+ // Custom functions
+ JSC::JSValue customMethod(JSC::ExecState*, const JSC::ArgList&);
+ JSC::JSValue customMethodWithArgs(JSC::ExecState*, const JSC::ArgList&);
+ TestObj* impl() const { return m_impl.get(); }
+
+private:
+ RefPtr<TestObj> m_impl;
+protected:
+ static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+};
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
+TestObj* toTestObj(JSC::JSValue);
+
+class JSTestObjPrototype : public JSC::JSObject {
+ typedef JSC::JSObject Base;
+public:
+ static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ 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)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+ JSTestObjPrototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
+protected:
+ static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+};
+
+// Functions
+
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethod(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethodWithArgs(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrame(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndArg(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+// Attributes
+
+JSC::JSValue jsTestObjReadOnlyIntAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjReadOnlyStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjReadOnlyTestObjAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjIntAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjIntAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjLongLongAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjAttrWithException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjAttrWithException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjScriptStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+
+} // namespace WebCore
+
+#endif
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h b/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h
new file mode 100644
index 0000000..1213c6f
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebCore/DOMObject.h>
+
+#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+
+@class DOMClass1;
+@class DOMClass2;
+@class DOMClass3;
+@class DOMClass5;
+@class DOMClass6;
+@class NSString;
+
+@interface DOMTestCallback : DOMObject
+- (BOOL)callbackWithClass1Param:(DOMClass1 *)class1Param;
+- (BOOL)callbackWithClass2Param:(DOMClass2 *)class2Param strArg:(NSString *)strArg;
+- (int)callbackWithNonBoolReturnType:(DOMClass3 *)class3Param;
+- (int)customCallback:(DOMClass5 *)class5Param class6Param:(DOMClass6 *)class6Param;
+@end
+
+#endif
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm
new file mode 100644
index 0000000..5201a91
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm
@@ -0,0 +1,122 @@
+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#if ENABLE(DATABASE)
+
+#import "DOMInternal.h"
+
+#import "DOMTestCallback.h"
+
+#import "Class1.h"
+#import "Class2.h"
+#import "Class3.h"
+#import "Class5.h"
+#import "Class6.h"
+#import "DOMBlobInternal.h"
+#import "DOMCSSRuleInternal.h"
+#import "DOMCSSValueInternal.h"
+#import "DOMClass1Internal.h"
+#import "DOMClass2Internal.h"
+#import "DOMClass3Internal.h"
+#import "DOMClass5Internal.h"
+#import "DOMClass6Internal.h"
+#import "DOMEventInternal.h"
+#import "DOMNodeInternal.h"
+#import "DOMStyleSheetInternal.h"
+#import "DOMTestCallbackInternal.h"
+#import "ExceptionHandlers.h"
+#import "KURL.h"
+#import "TestCallback.h"
+#import "ThreadCheck.h"
+#import "WebCoreObjCExtras.h"
+#import "WebScriptObjectPrivate.h"
+#import <wtf/GetPtr.h>
+
+#define IMPL reinterpret_cast<WebCore::TestCallback*>(_internal)
+
+@implementation DOMTestCallback
+
+- (void)dealloc
+{
+ if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestCallback class], self))
+ return;
+
+ if (_internal)
+ IMPL->deref();
+ [super dealloc];
+}
+
+- (void)finalize
+{
+ if (_internal)
+ IMPL->deref();
+ [super finalize];
+}
+
+- (BOOL)callbackWithClass1Param:(DOMClass1 *)class1Param
+{
+ return IMPL->callbackWithClass1Param(core(class1Param));
+}
+
+- (BOOL)callbackWithClass2Param:(DOMClass2 *)class2Param strArg:(NSString *)strArg
+{
+ return IMPL->callbackWithClass2Param(core(class2Param), strArg);
+}
+
+- (int)callbackWithNonBoolReturnType:(DOMClass3 *)class3Param
+{
+ return IMPL->callbackWithNonBoolReturnType(core(class3Param));
+}
+
+- (int)customCallback:(DOMClass5 *)class5Param class6Param:(DOMClass6 *)class6Param
+{
+ return IMPL->customCallback(core(class5Param), core(class6Param));
+}
+
+@end
+
+WebCore::TestCallback* core(DOMTestCallback *wrapper)
+{
+ return wrapper ? reinterpret_cast<WebCore::TestCallback*>(wrapper->_internal) : 0;
+}
+
+DOMTestCallback *kit(WebCore::TestCallback* value)
+{
+ { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
+ if (!value)
+ return nil;
+ if (DOMTestCallback *wrapper = getDOMWrapper(value))
+ return [[wrapper retain] autorelease];
+ DOMTestCallback *wrapper = [[DOMTestCallback alloc] _init];
+ wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(value);
+ value->ref();
+ addDOMWrapper(wrapper, value);
+ return [wrapper autorelease];
+}
+
+#endif // ENABLE(DATABASE)
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackInternal.h b/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackInternal.h
new file mode 100644
index 0000000..d8ea940
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackInternal.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebCore/DOMTestCallback.h>
+
+#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+
+namespace WebCore {
+ class TestCallback;
+}
+
+WebCore::TestCallback* core(DOMTestCallback *);
+DOMTestCallback *kit(WebCore::TestCallback*);
+
+#endif
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h b/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h
new file mode 100644
index 0000000..db7be28
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebCore/DOMObject.h>
+
+#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+
+@interface DOMTestInterface : DOMObject
+@end
+
+#endif
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm
new file mode 100644
index 0000000..a88b366
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm
@@ -0,0 +1,86 @@
+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "DOMInternal.h"
+
+#import "DOMTestInterface.h"
+
+#import "DOMBlobInternal.h"
+#import "DOMCSSRuleInternal.h"
+#import "DOMCSSValueInternal.h"
+#import "DOMEventInternal.h"
+#import "DOMNodeInternal.h"
+#import "DOMStyleSheetInternal.h"
+#import "DOMTestInterfaceInternal.h"
+#import "ExceptionHandlers.h"
+#import "TestInterface.h"
+#import "ThreadCheck.h"
+#import "WebCoreObjCExtras.h"
+#import "WebScriptObjectPrivate.h"
+#import <wtf/GetPtr.h>
+
+#define IMPL reinterpret_cast<WebCore::TestInterface*>(_internal)
+
+@implementation DOMTestInterface
+
+- (void)dealloc
+{
+ if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestInterface class], self))
+ return;
+
+ if (_internal)
+ IMPL->deref();
+ [super dealloc];
+}
+
+- (void)finalize
+{
+ if (_internal)
+ IMPL->deref();
+ [super finalize];
+}
+
+@end
+
+WebCore::TestInterface* core(DOMTestInterface *wrapper)
+{
+ return wrapper ? reinterpret_cast<WebCore::TestInterface*>(wrapper->_internal) : 0;
+}
+
+DOMTestInterface *kit(WebCore::TestInterface* value)
+{
+ { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
+ if (!value)
+ return nil;
+ if (DOMTestInterface *wrapper = getDOMWrapper(value))
+ return [[wrapper retain] autorelease];
+ DOMTestInterface *wrapper = [[DOMTestInterface alloc] _init];
+ wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(value);
+ value->ref();
+ addDOMWrapper(wrapper, value);
+ return [wrapper autorelease];
+}
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h b/WebCore/bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h
new file mode 100644
index 0000000..fef60a3
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebCore/DOMTestInterface.h>
+
+#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+
+namespace WebCore {
+ class TestInterface;
+}
+
+WebCore::TestInterface* core(DOMTestInterface *);
+DOMTestInterface *kit(WebCore::TestInterface*);
+
+#endif
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
new file mode 100644
index 0000000..dd9d2ee
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebCore/DOMObject.h>
+
+#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+
+@class DOMTestObj;
+@class DOMlog;
+@class NSString;
+@protocol DOMEventListener;
+
+@interface DOMTestObj : DOMObject
+- (int)readOnlyIntAttr;
+- (NSString *)readOnlyStringAttr;
+- (DOMTestObj *)readOnlyTestObjAttr;
+- (int)intAttr;
+- (void)setIntAttr:(int)newIntAttr;
+- (long long)longLongAttr;
+- (void)setLongLongAttr:(long long)newLongLongAttr;
+- (unsigned long long)unsignedLongLongAttr;
+- (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr;
+- (NSString *)stringAttr;
+- (void)setStringAttr:(NSString *)newStringAttr;
+- (DOMTestObj *)testObjAttr;
+- (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr;
+- (int)attrWithException;
+- (void)setAttrWithException:(int)newAttrWithException;
+- (int)attrWithSetterException;
+- (void)setAttrWithSetterException:(int)newAttrWithSetterException;
+- (int)attrWithGetterException;
+- (void)setAttrWithGetterException:(int)newAttrWithGetterException;
+- (int)customAttr;
+- (void)setCustomAttr:(int)newCustomAttr;
+- (NSString *)scriptStringAttr;
+- (void)voidMethod;
+- (void)voidMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
+- (int)intMethod;
+- (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
+- (DOMTestObj *)objMethod;
+- (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
+- (void)serializedValue:(NSString *)serializedArg;
+- (void)methodWithException;
+- (void)customMethod;
+- (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
+- (void)customArgsAndException:(DOMlog *)intArg;
+- (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
+- (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
+- (void)withDynamicFrame;
+- (void)withDynamicFrameAndArg:(int)intArg;
+- (void)withDynamicFrameAndOptionalArg:(int)intArg optionalArg:(int)optionalArg;
+- (void)withDynamicFrameAndUserGesture:(int)intArg;
+- (void)withDynamicFrameAndUserGestureASAD:(int)intArg optionalArg:(int)optionalArg;
+- (void)withScriptStateVoid;
+- (DOMTestObj *)withScriptStateObj;
+- (void)withScriptStateVoidException;
+- (DOMTestObj *)withScriptStateObjException;
+- (void)methodWithOptionalArg:(int)opt;
+- (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt;
+- (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2;
+@end
+
+#endif
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
new file mode 100644
index 0000000..b964e36
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
@@ -0,0 +1,340 @@
+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "DOMInternal.h"
+
+#import "DOMTestObj.h"
+
+#import "DOMBlobInternal.h"
+#import "DOMCSSRuleInternal.h"
+#import "DOMCSSValueInternal.h"
+#import "DOMEventInternal.h"
+#import "DOMNodeInternal.h"
+#import "DOMStyleSheetInternal.h"
+#import "DOMTestObjInternal.h"
+#import "DOMlogInternal.h"
+#import "EventListener.h"
+#import "ExceptionHandlers.h"
+#import "KURL.h"
+#import "ObjCEventListener.h"
+#import "SerializedScriptValue.h"
+#import "TestObj.h"
+#import "ThreadCheck.h"
+#import "WebCoreObjCExtras.h"
+#import "WebScriptObjectPrivate.h"
+#import "log.h"
+#import <wtf/GetPtr.h>
+
+#define IMPL reinterpret_cast<WebCore::TestObj*>(_internal)
+
+@implementation DOMTestObj
+
+- (void)dealloc
+{
+ if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestObj class], self))
+ return;
+
+ if (_internal)
+ IMPL->deref();
+ [super dealloc];
+}
+
+- (void)finalize
+{
+ if (_internal)
+ IMPL->deref();
+ [super finalize];
+}
+
+- (int)readOnlyIntAttr
+{
+ return IMPL->readOnlyIntAttr();
+}
+
+- (NSString *)readOnlyStringAttr
+{
+ return IMPL->readOnlyStringAttr();
+}
+
+- (DOMTestObj *)readOnlyTestObjAttr
+{
+ return kit(WTF::getPtr(IMPL->readOnlyTestObjAttr()));
+}
+
+- (int)intAttr
+{
+ return IMPL->intAttr();
+}
+
+- (void)setIntAttr:(int)newIntAttr
+{
+ IMPL->setIntAttr(newIntAttr);
+}
+
+- (long long)longLongAttr
+{
+ return IMPL->longLongAttr();
+}
+
+- (void)setLongLongAttr:(long long)newLongLongAttr
+{
+ IMPL->setLongLongAttr(newLongLongAttr);
+}
+
+- (unsigned long long)unsignedLongLongAttr
+{
+ return IMPL->unsignedLongLongAttr();
+}
+
+- (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr
+{
+ IMPL->setUnsignedLongLongAttr(newUnsignedLongLongAttr);
+}
+
+- (NSString *)stringAttr
+{
+ return IMPL->stringAttr();
+}
+
+- (void)setStringAttr:(NSString *)newStringAttr
+{
+ IMPL->setStringAttr(newStringAttr);
+}
+
+- (DOMTestObj *)testObjAttr
+{
+ return kit(WTF::getPtr(IMPL->testObjAttr()));
+}
+
+- (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr
+{
+ ASSERT(newTestObjAttr);
+
+ IMPL->setTestObjAttr(core(newTestObjAttr));
+}
+
+- (int)attrWithException
+{
+ return IMPL->attrWithException();
+}
+
+- (void)setAttrWithException:(int)newAttrWithException
+{
+ IMPL->setAttrWithException(newAttrWithException);
+}
+
+- (int)attrWithSetterException
+{
+ return IMPL->attrWithSetterException();
+}
+
+- (void)setAttrWithSetterException:(int)newAttrWithSetterException
+{
+ IMPL->setAttrWithSetterException(newAttrWithSetterException);
+}
+
+- (int)attrWithGetterException
+{
+ return IMPL->attrWithGetterException();
+}
+
+- (void)setAttrWithGetterException:(int)newAttrWithGetterException
+{
+ IMPL->setAttrWithGetterException(newAttrWithGetterException);
+}
+
+- (int)customAttr
+{
+ return IMPL->customAttr();
+}
+
+- (void)setCustomAttr:(int)newCustomAttr
+{
+ IMPL->setCustomAttr(newCustomAttr);
+}
+
+- (NSString *)scriptStringAttr
+{
+ return IMPL->scriptStringAttr();
+}
+
+- (void)voidMethod
+{
+ IMPL->voidMethod();
+}
+
+- (void)voidMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
+{
+ IMPL->voidMethodWithArgs(intArg, strArg, core(objArg));
+}
+
+- (int)intMethod
+{
+ return IMPL->intMethod();
+}
+
+- (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
+{
+ return IMPL->intMethodWithArgs(intArg, strArg, core(objArg));
+}
+
+- (DOMTestObj *)objMethod
+{
+ return kit(WTF::getPtr(IMPL->objMethod()));
+}
+
+- (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
+{
+ return kit(WTF::getPtr(IMPL->objMethodWithArgs(intArg, strArg, core(objArg))));
+}
+
+- (void)serializedValue:(NSString *)serializedArg
+{
+ IMPL->serializedValue(WebCore::SerializedScriptValue::create(WebCore::String(serializedArg)));
+}
+
+- (void)methodWithException
+{
+ WebCore::ExceptionCode ec = 0;
+ IMPL->methodWithException(ec);
+ WebCore::raiseOnDOMError(ec);
+}
+
+- (void)customMethod
+{
+ IMPL->customMethod();
+}
+
+- (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
+{
+ IMPL->customMethodWithArgs(intArg, strArg, core(objArg));
+}
+
+- (void)customArgsAndException:(DOMlog *)intArg
+{
+ WebCore::ExceptionCode ec = 0;
+ IMPL->customArgsAndException(core(intArg), ec);
+ WebCore::raiseOnDOMError(ec);
+}
+
+- (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
+{
+ RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener);
+ IMPL->addEventListener(type, WTF::getPtr(nativeEventListener), useCapture);
+}
+
+- (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
+{
+ RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener);
+ IMPL->removeEventListener(type, WTF::getPtr(nativeEventListener), useCapture);
+}
+
+- (void)withDynamicFrame
+{
+ IMPL->withDynamicFrame();
+}
+
+- (void)withDynamicFrameAndArg:(int)intArg
+{
+ IMPL->withDynamicFrameAndArg(intArg);
+}
+
+- (void)withDynamicFrameAndOptionalArg:(int)intArg optionalArg:(int)optionalArg
+{
+ IMPL->withDynamicFrameAndOptionalArg(intArg, optionalArg);
+}
+
+- (void)withDynamicFrameAndUserGesture:(int)intArg
+{
+ IMPL->withDynamicFrameAndUserGesture(intArg);
+}
+
+- (void)withDynamicFrameAndUserGestureASAD:(int)intArg optionalArg:(int)optionalArg
+{
+ IMPL->withDynamicFrameAndUserGestureASAD(intArg, optionalArg);
+}
+
+- (void)withScriptStateVoid
+{
+ IMPL->withScriptStateVoid();
+}
+
+- (DOMTestObj *)withScriptStateObj
+{
+ return kit(WTF::getPtr(IMPL->withScriptStateObj()));
+}
+
+- (void)withScriptStateVoidException
+{
+ WebCore::ExceptionCode ec = 0;
+ IMPL->withScriptStateVoidException(ec);
+ WebCore::raiseOnDOMError(ec);
+}
+
+- (DOMTestObj *)withScriptStateObjException
+{
+ WebCore::ExceptionCode ec = 0;
+ DOMTestObj *result = kit(WTF::getPtr(IMPL->withScriptStateObjException(ec)));
+ WebCore::raiseOnDOMError(ec);
+ return result;
+}
+
+- (void)methodWithOptionalArg:(int)opt
+{
+ IMPL->methodWithOptionalArg(opt);
+}
+
+- (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt
+{
+ IMPL->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
+}
+
+- (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2
+{
+ IMPL->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
+}
+
+@end
+
+WebCore::TestObj* core(DOMTestObj *wrapper)
+{
+ return wrapper ? reinterpret_cast<WebCore::TestObj*>(wrapper->_internal) : 0;
+}
+
+DOMTestObj *kit(WebCore::TestObj* value)
+{
+ { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
+ if (!value)
+ return nil;
+ if (DOMTestObj *wrapper = getDOMWrapper(value))
+ return [[wrapper retain] autorelease];
+ DOMTestObj *wrapper = [[DOMTestObj alloc] _init];
+ wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(value);
+ value->ref();
+ addDOMWrapper(wrapper, value);
+ return [wrapper autorelease];
+}
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObjInternal.h b/WebCore/bindings/scripts/test/ObjC/DOMTestObjInternal.h
new file mode 100644
index 0000000..c24ea84
--- /dev/null
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObjInternal.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebCore/DOMTestObj.h>
+
+#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+
+namespace WebCore {
+ class TestObj;
+}
+
+WebCore::TestObj* core(DOMTestObj *);
+DOMTestObj *kit(WebCore::TestObj*);
+
+#endif
diff --git a/WebCore/bindings/scripts/test/TestCallback.idl b/WebCore/bindings/scripts/test/TestCallback.idl
new file mode 100644
index 0000000..25db4c6
--- /dev/null
+++ b/WebCore/bindings/scripts/test/TestCallback.idl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary formstrArg, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This IDL file is for testing the bindings code generator with an interface
+// that has the "Callback" attribute and for tracking changes in its ouput.
+module test {
+ interface [
+ Conditional=DATABASE,
+ Callback
+ ] TestCallback {
+ boolean callbackWithClass1Param(in Class1 class1Param);
+ boolean callbackWithClass2Param(in Class2 class2Param, in DOMString strArg);
+ long callbackWithNonBoolReturnType(in Class3 class3Param);
+ [Custom] long customCallback(in Class5 class5Param, in Class6 class6Param);
+ };
+}
diff --git a/WebCore/bindings/scripts/test/TestInterface.idl b/WebCore/bindings/scripts/test/TestInterface.idl
new file mode 100644
index 0000000..5a8b008
--- /dev/null
+++ b/WebCore/bindings/scripts/test/TestInterface.idl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary formstrArg, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This IDL file is for testing the bindings code generator and for tracking
+// changes in its ouput.
+module test {
+ interface [
+ CanBeConstructed,
+ CallWith=ScriptExecutionContext
+ ] TestInterface {
+ };
+}
diff --git a/WebCore/bindings/scripts/test/TestObj.idl b/WebCore/bindings/scripts/test/TestObj.idl
new file mode 100644
index 0000000..b14328d
--- /dev/null
+++ b/WebCore/bindings/scripts/test/TestObj.idl
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary formstrArg, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This IDL file is for testing the bindings code generator and for tracking
+// changes in its ouput.
+module test {
+ interface TestObj {
+ // Attributes
+ readonly attribute long readOnlyIntAttr;
+ readonly attribute DOMString readOnlyStringAttr;
+ readonly attribute TestObj readOnlyTestObjAttr;
+ attribute long intAttr;
+ attribute long long longLongAttr;
+ attribute unsigned long long unsignedLongLongAttr;
+ attribute DOMString stringAttr;
+ attribute TestObj testObjAttr;
+
+ // Methods
+ void voidMethod();
+ void voidMethodWithArgs(in long intArg, in DOMString strArg, in TestObj objArg);
+ long intMethod();
+ long intMethodWithArgs(in long intArg, in DOMString strArg, in TestObj objArg);
+ TestObj objMethod();
+ TestObj objMethodWithArgs(in long intArg, in DOMString strArg, in TestObj objArg);
+
+ void serializedValue(in SerializedScriptValue serializedArg);
+
+ // Exceptions
+ void methodWithException() raises(DOMException);
+ attribute long attrWithException raises(DOMException);
+ attribute long attrWithSetterException getraises(DOMException);
+ attribute long attrWithGetterException setraises(DOMException);
+
+ // 'Custom' extended attribute
+ attribute [Custom] long customAttr;
+ [Custom] void customMethod();
+ [Custom] void customMethodWithArgs(in long intArg, in DOMString strArg, in TestObj objArg);
+
+ [CustomArgumentHandling] void customArgsAndException(in log intArg)
+ raises(DOMException);
+
+ void addEventListener(in DOMString type,
+ in EventListener listener,
+ in boolean useCapture);
+ void removeEventListener(in DOMString type,
+ in EventListener listener,
+ in boolean useCapture);
+
+ // 'CallWith' extended attribute
+ [CallWith=DynamicFrame] void withDynamicFrame();
+ [CallWith=DynamicFrame] void withDynamicFrameAndArg(in long intArg);
+ [CallWith=DynamicFrame] void withDynamicFrameAndOptionalArg(in long intArg, in [Optional] long optionalArg);
+ [NeedsUserGestureCheck, CallWith=DynamicFrame] void withDynamicFrameAndUserGesture(in long intArg);
+ [NeedsUserGestureCheck, CallWith=DynamicFrame] void withDynamicFrameAndUserGestureASAD(in long intArg, in [Optional] long optionalArg);
+ [CallWith=ScriptState] void withScriptStateVoid();
+ [CallWith=ScriptState] TestObj withScriptStateObj();
+ [CallWith=ScriptState] void withScriptStateVoidException()
+ raises(DOMException);
+ [CallWith=ScriptState] TestObj withScriptStateObjException()
+ raises(DOMException);
+
+ // 'Optional' extended attribute
+ void methodWithOptionalArg(in [Optional] long opt);
+ void methodWithNonOptionalArgAndOptionalArg(in long nonOpt, in [Optional] long opt);
+ void methodWithNonOptionalArgAndTwoOptionalArgs(in long nonOpt, in [Optional] long opt1, in long opt2);
+
+ // 'ConvertScriptString' extended attribute
+ readonly attribute [ConvertScriptString] DOMString scriptStringAttr;
+
+#ifdef TESTING_V8
+ // Overloads
+ void overloadedMethod(in TestObj objArg, in DOMString strArg);
+ void overloadedMethod(in TestObj objArg, in [Optional] long intArg);
+ void overloadedMethod(in DOMString strArg);
+ void overloadedMethod(in long intArg);
+#endif
+ };
+}
diff --git a/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp b/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
new file mode 100644
index 0000000..e72330d
--- /dev/null
+++ b/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
@@ -0,0 +1,92 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#include "V8TestCallback.h"
+
+#if ENABLE(DATABASE)
+
+#include "Frame.h"
+#include "ScriptExecutionContext.h"
+#include "V8Class1.h"
+#include "V8Class2.h"
+#include "V8CustomVoidCallback.h"
+#include "V8DOMString.h"
+
+namespace WebCore {
+
+V8TestCallback::V8TestCallback(v8::Local<v8::Object> callback, Frame* frame)
+ : m_callback(v8::Persistent<v8::Object>::New(callback))
+ , m_frame(frame)
+ , m_worldContext(UseCurrentWorld)
+{
+}
+
+V8TestCallback::~V8TestCallback()
+{
+ m_callback.Dispose();
+}
+
+// Functions
+
+bool V8TestCallback::callbackWithClass1Param(ScriptExecutionContext* context, Class1* class1Param)
+{
+ v8::HandleScope handleScope;
+
+ v8::Handle<v8::Context> v8Context = toV8Context(context, m_worldContext);
+ if (v8Context.IsEmpty())
+ return true;
+
+ v8::Context::Scope scope(v8Context);
+
+ v8::Handle<v8::Value> argv[] = {
+ toV8(class1Param)
+ };
+
+ RefPtr<Frame> protect(m_frame);
+
+ bool callbackReturnValue = false;
+ return !invokeCallback(m_callback, 1, argv, callbackReturnValue);
+}
+
+bool V8TestCallback::callbackWithClass2Param(ScriptExecutionContext* context, Class2* class2Param, const String& strArg)
+{
+ v8::HandleScope handleScope;
+
+ v8::Handle<v8::Context> v8Context = toV8Context(context, m_worldContext);
+ if (v8Context.IsEmpty())
+ return true;
+
+ v8::Context::Scope scope(v8Context);
+
+ v8::Handle<v8::Value> argv[] = {
+ toV8(class2Param),
+ toV8(strArg)
+ };
+
+ RefPtr<Frame> protect(m_frame);
+
+ bool callbackReturnValue = false;
+ return !invokeCallback(m_callback, 2, argv, callbackReturnValue);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DATABASE)
diff --git a/WebCore/bindings/scripts/test/V8/V8TestCallback.h b/WebCore/bindings/scripts/test/V8/V8TestCallback.h
new file mode 100644
index 0000000..f58f3f0
--- /dev/null
+++ b/WebCore/bindings/scripts/test/V8/V8TestCallback.h
@@ -0,0 +1,63 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#if ENABLE(DATABASE)
+
+#ifndef V8TestCallback_h
+#define V8TestCallback_h
+
+#include "TestCallback.h"
+#include "WorldContextHandle.h"
+#include <v8.h>
+#include <wtf/Forward.h>
+
+namespace WebCore {
+
+class Frame;
+
+class V8TestCallback : public TestCallback {
+public:
+ static PassRefPtr<V8TestCallback> create(v8::Local<v8::Value> value, Frame* frame)
+ {
+ ASSERT(value->IsObject());
+ return adoptRef(new V8TestCallback(value->ToObject(), frame));
+ }
+
+ virtual ~V8TestCallback();
+
+ // Functions
+ virtual bool callbackWithClass1Param(ScriptExecutionContext*, Class1* class1Param);
+ virtual bool callbackWithClass2Param(ScriptExecutionContext*, Class2* class2Param, const String& strArg);
+ COMPILE_ASSERT(false) virtual int callbackWithNonBoolReturnType(ScriptExecutionContext*, Class3* class3Param);
+ virtual int customCallback(ScriptExecutionContext*, Class5* class5Param, Class6* class6Param);
+
+private:
+ V8TestCallback(v8::Local<v8::Object>, Frame*);
+
+ v8::Persistent<v8::Object> m_callback;
+ RefPtr<Frame> m_frame;
+ WorldContextHandle m_worldContext;
+};
+
+}
+
+#endif // V8TestCallback_h
+
+#endif // ENABLE(DATABASE)
diff --git a/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp b/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
new file mode 100644
index 0000000..f0bfb86
--- /dev/null
+++ b/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
@@ -0,0 +1,115 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#include "V8TestInterface.h"
+
+#include "RuntimeEnabledFeatures.h"
+#include "V8Binding.h"
+#include "V8BindingState.h"
+#include "V8DOMWrapper.h"
+#include "V8IsolatedContext.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+
+WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestInterface::derefObject, 0 };
+
+namespace TestInterfaceInternal {
+
+template <typename T> void V8_USE(T) { }
+
+} // namespace TestInterfaceInternal
+
+v8::Handle<v8::Value> V8TestInterface::constructorCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestInterface.Contructor");
+ return V8Proxy::constructDOMObjectWithScriptExecutionContext<TestInterface>(args, &info);
+}
+static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc)
+{
+ v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "TestInterface", v8::Persistent<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount,
+ 0, 0,
+ 0, 0);
+ desc->SetCallHandler(V8TestInterface::constructorCallback);
+
+
+ // Custom toString template
+ desc->Set(getToStringName(), getToStringTemplate());
+ return desc;
+}
+
+v8::Persistent<v8::FunctionTemplate> V8TestInterface::GetRawTemplate()
+{
+ static v8::Persistent<v8::FunctionTemplate> V8TestInterfaceRawCache = createRawTemplate();
+ return V8TestInterfaceRawCache;
+}
+
+v8::Persistent<v8::FunctionTemplate> V8TestInterface::GetTemplate()
+{
+ static v8::Persistent<v8::FunctionTemplate> V8TestInterfaceCache = ConfigureV8TestInterfaceTemplate(GetRawTemplate());
+ return V8TestInterfaceCache;
+}
+
+TestInterface* V8TestInterface::toNative(v8::Handle<v8::Object> object)
+{
+ return reinterpret_cast<TestInterface*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
+}
+
+bool V8TestInterface::HasInstance(v8::Handle<v8::Value> value)
+{
+ return GetRawTemplate()->HasInstance(value);
+}
+
+
+v8::Handle<v8::Object> V8TestInterface::wrap(TestInterface* impl)
+{
+ v8::Handle<v8::Object> wrapper;
+ V8Proxy* proxy = 0;
+ wrapper = getDOMObjectMap().get(impl);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl);
+ if (wrapper.IsEmpty())
+ return wrapper;
+
+ impl->ref();
+ getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ return wrapper;
+}
+
+v8::Handle<v8::Value> toV8(PassRefPtr<TestInterface > impl)
+{
+ return toV8(impl.get());
+}
+
+v8::Handle<v8::Value> toV8(TestInterface* impl)
+{
+ if (!impl)
+ return v8::Null();
+ return V8TestInterface::wrap(impl);
+}
+
+void V8TestInterface::derefObject(void* object)
+{
+ static_cast<TestInterface*>(object)->deref();
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/scripts/test/V8/V8TestInterface.h b/WebCore/bindings/scripts/test/V8/V8TestInterface.h
new file mode 100644
index 0000000..ce1310e
--- /dev/null
+++ b/WebCore/bindings/scripts/test/V8/V8TestInterface.h
@@ -0,0 +1,50 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef V8TestInterface_h
+#define V8TestInterface_h
+
+#include "StringHash.h"
+#include "TestInterface.h"
+#include "WrapperTypeInfo.h"
+#include <v8.h>
+#include <wtf/HashMap.h>
+
+namespace WebCore {
+
+class V8TestInterface {
+
+public:
+ static bool HasInstance(v8::Handle<v8::Value> value);
+ static v8::Persistent<v8::FunctionTemplate> GetRawTemplate();
+ static v8::Persistent<v8::FunctionTemplate> GetTemplate();
+ static TestInterface* toNative(v8::Handle<v8::Object>);
+ static v8::Handle<v8::Object> wrap(TestInterface*);
+ static void derefObject(void*);
+ static WrapperTypeInfo info;
+ static v8::Handle<v8::Value> constructorCallback(const v8::Arguments& args);
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
+};
+
+v8::Handle<v8::Value> toV8(TestInterface*);
+v8::Handle<v8::Value> toV8(PassRefPtr<TestInterface >);
+}
+
+#endif // V8TestInterface_h
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
new file mode 100644
index 0000000..94dcd5e
--- /dev/null
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -0,0 +1,714 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#include "V8TestObj.h"
+
+#include "ExceptionCode.h"
+#include "RuntimeEnabledFeatures.h"
+#include "ScriptCallStack.h"
+#include "SerializedScriptValue.h"
+#include "V8Binding.h"
+#include "V8BindingState.h"
+#include "V8DOMWrapper.h"
+#include "V8IsolatedContext.h"
+#include "V8Proxy.h"
+#include "V8log.h"
+#include <wtf/GetPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+WrapperTypeInfo V8TestObj::info = { V8TestObj::GetTemplate, V8TestObj::derefObject, 0 };
+
+namespace TestObjInternal {
+
+template <typename T> void V8_USE(T) { }
+
+static v8::Handle<v8::Value> readOnlyIntAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.readOnlyIntAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8::Integer::New(imp->readOnlyIntAttr());
+}
+
+static v8::Handle<v8::Value> readOnlyStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.readOnlyStringAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8String(imp->readOnlyStringAttr());
+}
+
+static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.readOnlyTestObjAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ RefPtr<TestObj> result = imp->readOnlyTestObjAttr();
+ v8::Handle<v8::Value> wrapper = result.get() ? getDOMObjectMap().get(result.get()) : v8::Handle<v8::Value>();
+ if (wrapper.IsEmpty()) {
+ wrapper = toV8(result.get());
+ if (!wrapper.IsEmpty())
+ V8DOMWrapper::setHiddenReference(info.Holder(), wrapper);
+ }
+ return wrapper;
+}
+
+static v8::Handle<v8::Value> intAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.intAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8::Integer::New(imp->intAttr());
+}
+
+static void intAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.intAttr._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ int v = toInt32(value);
+ imp->setIntAttr(v);
+ return;
+}
+
+static v8::Handle<v8::Value> longLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.longLongAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8::Number::New(static_cast<double>(imp->longLongAttr()));
+}
+
+static void longLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.longLongAttr._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ long long v = toInt64(value);
+ imp->setLongLongAttr(WTF::getPtr(v));
+ return;
+}
+
+static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.unsignedLongLongAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8::Number::New(static_cast<double>(imp->unsignedLongLongAttr()));
+}
+
+static void unsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.unsignedLongLongAttr._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ unsigned long long v = toInt64(value);
+ imp->setUnsignedLongLongAttr(WTF::getPtr(v));
+ return;
+}
+
+static v8::Handle<v8::Value> stringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.stringAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8String(imp->stringAttr());
+}
+
+static void stringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.stringAttr._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ V8Parameter<> v = value;
+ imp->setStringAttr(v);
+ return;
+}
+
+static v8::Handle<v8::Value> testObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.testObjAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return toV8(imp->testObjAttr());
+}
+
+static void testObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.testObjAttr._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ TestObj* v = V8TestObj::HasInstance(value) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
+ imp->setTestObjAttr(WTF::getPtr(v));
+ return;
+}
+
+static v8::Handle<v8::Value> attrWithExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.attrWithException._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8::Integer::New(imp->attrWithException());
+}
+
+static void attrWithExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.attrWithException._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ int v = toInt32(value);
+ imp->setAttrWithException(v);
+ return;
+}
+
+static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.attrWithSetterException._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8::Integer::New(imp->attrWithSetterException());
+}
+
+static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.attrWithSetterException._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ int v = toInt32(value);
+ imp->setAttrWithSetterException(v);
+ return;
+}
+
+static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.attrWithGetterException._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ return v8::Integer::New(imp->attrWithGetterException());
+}
+
+static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.attrWithGetterException._set");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ int v = toInt32(value);
+ imp->setAttrWithGetterException(v);
+ return;
+}
+
+static v8::Handle<v8::Value> scriptStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestObj.scriptStringAttr._get");
+ TestObj* imp = V8TestObj::toNative(info.Holder());
+ v8StringOrNull(exec, imp->scriptStringAttr());
+}
+
+static v8::Handle<v8::Value> voidMethodCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.voidMethod");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ imp->voidMethod();
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> voidMethodWithArgsCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.voidMethodWithArgs");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ V8Parameter<> strArg = args[1];
+ TestObj* objArg = V8TestObj::HasInstance(args[2]) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(args[2])) : 0;
+ imp->voidMethodWithArgs(intArg, strArg, objArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> intMethodCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.intMethod");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ return v8::Integer::New(imp->intMethod());
+}
+
+static v8::Handle<v8::Value> intMethodWithArgsCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.intMethodWithArgs");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ V8Parameter<> strArg = args[1];
+ TestObj* objArg = V8TestObj::HasInstance(args[2]) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(args[2])) : 0;
+ return v8::Integer::New(imp->intMethodWithArgs(intArg, strArg, objArg));
+}
+
+static v8::Handle<v8::Value> objMethodCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.objMethod");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ return toV8(imp->objMethod());
+}
+
+static v8::Handle<v8::Value> objMethodWithArgsCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.objMethodWithArgs");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ V8Parameter<> strArg = args[1];
+ TestObj* objArg = V8TestObj::HasInstance(args[2]) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(args[2])) : 0;
+ return toV8(imp->objMethodWithArgs(intArg, strArg, objArg));
+}
+
+static v8::Handle<v8::Value> serializedValueCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.serializedValue");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ bool serializedArgDidThrow = false;
+ RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(args[0], serializedArgDidThrow);
+ if (serializedArgDidThrow)
+ return v8::Undefined();
+ imp->serializedValue(serializedArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> methodWithExceptionCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.methodWithException");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ ExceptionCode ec = 0;
+ {
+ imp->methodWithException(ec);
+ if (UNLIKELY(ec))
+ goto fail;
+ return v8::Handle<v8::Value>();
+ }
+ fail:
+ V8Proxy::setDOMException(ec);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> customArgsAndExceptionCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.customArgsAndException");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ ExceptionCode ec = 0;
+ {
+ OwnPtr<ScriptCallStack> callStack(ScriptCallStack::create(args, 1));
+ if (!callStack)
+ return v8::Undefined();
+ log* intArg = V8log::HasInstance(args[0]) ? V8log::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ imp->customArgsAndException(intArg, callStack.get(), ec);
+ if (UNLIKELY(ec))
+ goto fail;
+ return v8::Handle<v8::Value>();
+ }
+ fail:
+ V8Proxy::setDOMException(ec);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> addEventListenerCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.addEventListener()");
+ RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(args[1], false, ListenerFindOrCreate);
+ if (listener) {
+ V8TestObj::toNative(args.Holder())->addEventListener(v8ValueToAtomicWebCoreString(args[0]), listener, args[2]->BooleanValue());
+ createHiddenDependency(args.Holder(), args[1], V8TestObj::eventListenerCacheIndex);
+ }
+ return v8::Undefined();
+}
+
+static v8::Handle<v8::Value> removeEventListenerCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.removeEventListener()");
+ RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(args[1], false, ListenerFindOnly);
+ if (listener) {
+ V8TestObj::toNative(args.Holder())->removeEventListener(v8ValueToAtomicWebCoreString(args[0]), listener.get(), args[2]->BooleanValue());
+ removeHiddenDependency(args.Holder(), args[1], V8TestObj::eventListenerCacheIndex);
+ }
+ return v8::Undefined();
+}
+
+static v8::Handle<v8::Value> withDynamicFrameCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withDynamicFrame");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!enteredFrame)
+ return v8::Undefined();
+ imp->withDynamicFrame(enteredFrame);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> withDynamicFrameAndArgCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withDynamicFrameAndArg");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!enteredFrame)
+ return v8::Undefined();
+ imp->withDynamicFrameAndArg(enteredFrame, intArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> withDynamicFrameAndOptionalArgCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withDynamicFrameAndOptionalArg");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ if (args.Length() <= 1) {
+ Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!enteredFrame)
+ return v8::Undefined();
+ imp->withDynamicFrameAndOptionalArg(enteredFrame, intArg);
+ return v8::Handle<v8::Value>();
+ }
+ int optionalArg = toInt32(args[1]);
+ Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!enteredFrame)
+ return v8::Undefined();
+ imp->withDynamicFrameAndOptionalArg(enteredFrame, intArg, optionalArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> withDynamicFrameAndUserGestureCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withDynamicFrameAndUserGesture");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!enteredFrame)
+ return v8::Undefined();
+ imp->withDynamicFrameAndUserGesture(enteredFrame, intArg, processingUserGesture());
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> withDynamicFrameAndUserGestureASADCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withDynamicFrameAndUserGestureASAD");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ if (args.Length() <= 1) {
+ Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!enteredFrame)
+ return v8::Undefined();
+ imp->withDynamicFrameAndUserGestureASAD(enteredFrame, intArg, processingUserGesture());
+ return v8::Handle<v8::Value>();
+ }
+ int optionalArg = toInt32(args[1]);
+ Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!enteredFrame)
+ return v8::Undefined();
+ imp->withDynamicFrameAndUserGestureASAD(enteredFrame, intArg, optionalArg, processingUserGesture());
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> withScriptStateVoidCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withScriptStateVoid");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ EmptyScriptState state;
+ imp->withScriptStateVoid(&state);
+ if (state.hadException())
+ return throwError(state.exception());
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> withScriptStateObjCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withScriptStateObj");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ EmptyScriptState state;
+ RefPtr<TestObj> result = imp->withScriptStateObj(&state);
+ if (state.hadException())
+ return throwError(state.exception());
+ return toV8(result.release());
+}
+
+static v8::Handle<v8::Value> withScriptStateVoidExceptionCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withScriptStateVoidException");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ ExceptionCode ec = 0;
+ {
+ EmptyScriptState state;
+ imp->withScriptStateVoidException(&state, ec);
+ if (UNLIKELY(ec))
+ goto fail;
+ if (state.hadException())
+ return throwError(state.exception());
+ return v8::Handle<v8::Value>();
+ }
+ fail:
+ V8Proxy::setDOMException(ec);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> withScriptStateObjExceptionCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.withScriptStateObjException");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ ExceptionCode ec = 0;
+ {
+ EmptyScriptState state;
+ RefPtr<TestObj> result = imp->withScriptStateObjException(&state, ec);
+ if (UNLIKELY(ec))
+ goto fail;
+ if (state.hadException())
+ return throwError(state.exception());
+ return toV8(result.release());
+ }
+ fail:
+ V8Proxy::setDOMException(ec);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> methodWithOptionalArgCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.methodWithOptionalArg");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ if (args.Length() <= 0) {
+ imp->methodWithOptionalArg();
+ return v8::Handle<v8::Value>();
+ }
+ int opt = toInt32(args[0]);
+ imp->methodWithOptionalArg(opt);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> methodWithNonOptionalArgAndOptionalArgCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.methodWithNonOptionalArgAndOptionalArg");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int nonOpt = toInt32(args[0]);
+ if (args.Length() <= 1) {
+ imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
+ return v8::Handle<v8::Value>();
+ }
+ int opt = toInt32(args[1]);
+ imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> methodWithNonOptionalArgAndTwoOptionalArgsCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.methodWithNonOptionalArgAndTwoOptionalArgs");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int nonOpt = toInt32(args[0]);
+ if (args.Length() <= 1) {
+ imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
+ return v8::Handle<v8::Value>();
+ }
+ int opt1 = toInt32(args[1]);
+ int opt2 = toInt32(args[2]);
+ imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> overloadedMethod1Callback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.overloadedMethod1");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ TestObj* objArg = V8TestObj::HasInstance(args[0]) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ V8Parameter<> strArg = args[1];
+ imp->overloadedMethod(objArg, strArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> overloadedMethod2Callback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.overloadedMethod2");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ TestObj* objArg = V8TestObj::HasInstance(args[0]) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ if (args.Length() <= 1) {
+ imp->overloadedMethod(objArg);
+ return v8::Handle<v8::Value>();
+ }
+ int intArg = toInt32(args[1]);
+ imp->overloadedMethod(objArg, intArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> overloadedMethod3Callback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.overloadedMethod3");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ V8Parameter<> strArg = args[0];
+ imp->overloadedMethod(strArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> overloadedMethod4Callback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.overloadedMethod4");
+ TestObj* imp = V8TestObj::toNative(args.Holder());
+ int intArg = toInt32(args[0]);
+ imp->overloadedMethod(intArg);
+ return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> overloadedMethodCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.TestObj.overloadedMethod");
+ if ((args.Length() == 2 && (args[0]->IsNull() || V8TestObj::HasInstance(args[0])) && (args[1]->IsNull() || args[1]->IsUndefined() || args[1]->IsString() || args[1]->IsObject())))
+ return overloadedMethod1Callback(args);
+ if ((args.Length() == 1 && (args[0]->IsNull() || V8TestObj::HasInstance(args[0]))) || (args.Length() == 2 && (args[0]->IsNull() || V8TestObj::HasInstance(args[0]))))
+ return overloadedMethod2Callback(args);
+ if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || args[0]->IsString() || args[0]->IsObject())))
+ return overloadedMethod3Callback(args);
+ if (args.Length() == 1)
+ return overloadedMethod4Callback(args);
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+}
+
+} // namespace TestObjInternal
+
+static const BatchedAttribute TestObjAttrs[] = {
+ // Attribute 'readOnlyIntAttr' (Type: 'readonly attribute' ExtAttr: '')
+ {"readOnlyIntAttr", TestObjInternal::readOnlyIntAttrAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'readOnlyStringAttr' (Type: 'readonly attribute' ExtAttr: '')
+ {"readOnlyStringAttr", TestObjInternal::readOnlyStringAttrAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'readOnlyTestObjAttr' (Type: 'readonly attribute' ExtAttr: '')
+ {"readOnlyTestObjAttr", TestObjInternal::readOnlyTestObjAttrAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'intAttr' (Type: 'attribute' ExtAttr: '')
+ {"intAttr", TestObjInternal::intAttrAttrGetter, TestObjInternal::intAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'longLongAttr' (Type: 'attribute' ExtAttr: '')
+ {"longLongAttr", TestObjInternal::longLongAttrAttrGetter, TestObjInternal::longLongAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'unsignedLongLongAttr' (Type: 'attribute' ExtAttr: '')
+ {"unsignedLongLongAttr", TestObjInternal::unsignedLongLongAttrAttrGetter, TestObjInternal::unsignedLongLongAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'stringAttr' (Type: 'attribute' ExtAttr: '')
+ {"stringAttr", TestObjInternal::stringAttrAttrGetter, TestObjInternal::stringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'testObjAttr' (Type: 'attribute' ExtAttr: '')
+ {"testObjAttr", TestObjInternal::testObjAttrAttrGetter, TestObjInternal::testObjAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'attrWithException' (Type: 'attribute' ExtAttr: '')
+ {"attrWithException", TestObjInternal::attrWithExceptionAttrGetter, TestObjInternal::attrWithExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'attrWithSetterException' (Type: 'attribute' ExtAttr: '')
+ {"attrWithSetterException", TestObjInternal::attrWithSetterExceptionAttrGetter, TestObjInternal::attrWithSetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'attrWithGetterException' (Type: 'attribute' ExtAttr: '')
+ {"attrWithGetterException", TestObjInternal::attrWithGetterExceptionAttrGetter, TestObjInternal::attrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'customAttr' (Type: 'attribute' ExtAttr: 'Custom')
+ {"customAttr", V8TestObj::customAttrAccessorGetter, V8TestObj::customAttrAccessorSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'scriptStringAttr' (Type: 'readonly attribute' ExtAttr: 'ConvertScriptString')
+ {"scriptStringAttr", TestObjInternal::scriptStringAttrAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+};
+static const BatchedCallback TestObjCallbacks[] = {
+ {"voidMethod", TestObjInternal::voidMethodCallback},
+ {"intMethod", TestObjInternal::intMethodCallback},
+ {"objMethod", TestObjInternal::objMethodCallback},
+ {"serializedValue", TestObjInternal::serializedValueCallback},
+ {"methodWithException", TestObjInternal::methodWithExceptionCallback},
+ {"customMethod", V8TestObj::customMethodCallback},
+ {"customMethodWithArgs", V8TestObj::customMethodWithArgsCallback},
+ {"addEventListener", TestObjInternal::addEventListenerCallback},
+ {"removeEventListener", TestObjInternal::removeEventListenerCallback},
+ {"withDynamicFrame", TestObjInternal::withDynamicFrameCallback},
+ {"withDynamicFrameAndArg", TestObjInternal::withDynamicFrameAndArgCallback},
+ {"withDynamicFrameAndOptionalArg", TestObjInternal::withDynamicFrameAndOptionalArgCallback},
+ {"withDynamicFrameAndUserGesture", TestObjInternal::withDynamicFrameAndUserGestureCallback},
+ {"withDynamicFrameAndUserGestureASAD", TestObjInternal::withDynamicFrameAndUserGestureASADCallback},
+ {"withScriptStateVoid", TestObjInternal::withScriptStateVoidCallback},
+ {"withScriptStateObj", TestObjInternal::withScriptStateObjCallback},
+ {"withScriptStateVoidException", TestObjInternal::withScriptStateVoidExceptionCallback},
+ {"withScriptStateObjException", TestObjInternal::withScriptStateObjExceptionCallback},
+ {"methodWithOptionalArg", TestObjInternal::methodWithOptionalArgCallback},
+ {"methodWithNonOptionalArgAndOptionalArg", TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback},
+ {"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback},
+ {"overloadedMethod", TestObjInternal::overloadedMethodCallback},
+};
+static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persistent<v8::FunctionTemplate> desc)
+{
+ v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "TestObj", v8::Persistent<v8::FunctionTemplate>(), V8TestObj::internalFieldCount,
+ TestObjAttrs, sizeof(TestObjAttrs) / sizeof(*TestObjAttrs),
+ TestObjCallbacks, sizeof(TestObjCallbacks) / sizeof(*TestObjCallbacks));
+ v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
+ v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
+
+
+ // Custom Signature 'voidMethodWithArgs'
+ const int voidMethodWithArgsArgc = 3;
+ v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8TestObj::GetRawTemplate() };
+ v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(desc, voidMethodWithArgsArgc, voidMethodWithArgsArgv);
+ proto->Set(v8::String::New("voidMethodWithArgs"), v8::FunctionTemplate::New(TestObjInternal::voidMethodWithArgsCallback, v8::Handle<v8::Value>(), voidMethodWithArgsSignature));
+
+ // Custom Signature 'intMethodWithArgs'
+ const int intMethodWithArgsArgc = 3;
+ v8::Handle<v8::FunctionTemplate> intMethodWithArgsArgv[intMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8TestObj::GetRawTemplate() };
+ v8::Handle<v8::Signature> intMethodWithArgsSignature = v8::Signature::New(desc, intMethodWithArgsArgc, intMethodWithArgsArgv);
+ proto->Set(v8::String::New("intMethodWithArgs"), v8::FunctionTemplate::New(TestObjInternal::intMethodWithArgsCallback, v8::Handle<v8::Value>(), intMethodWithArgsSignature));
+
+ // Custom Signature 'objMethodWithArgs'
+ const int objMethodWithArgsArgc = 3;
+ v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8TestObj::GetRawTemplate() };
+ v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(desc, objMethodWithArgsArgc, objMethodWithArgsArgv);
+ proto->Set(v8::String::New("objMethodWithArgs"), v8::FunctionTemplate::New(TestObjInternal::objMethodWithArgsCallback, v8::Handle<v8::Value>(), objMethodWithArgsSignature));
+
+ // Custom Signature 'customArgsAndException'
+ const int customArgsAndExceptionArgc = 1;
+ v8::Handle<v8::FunctionTemplate> customArgsAndExceptionArgv[customArgsAndExceptionArgc] = { V8log::GetRawTemplate() };
+ v8::Handle<v8::Signature> customArgsAndExceptionSignature = v8::Signature::New(desc, customArgsAndExceptionArgc, customArgsAndExceptionArgv);
+ proto->Set(v8::String::New("customArgsAndException"), v8::FunctionTemplate::New(TestObjInternal::customArgsAndExceptionCallback, v8::Handle<v8::Value>(), customArgsAndExceptionSignature));
+
+ // Custom toString template
+ desc->Set(getToStringName(), getToStringTemplate());
+ return desc;
+}
+
+v8::Persistent<v8::FunctionTemplate> V8TestObj::GetRawTemplate()
+{
+ static v8::Persistent<v8::FunctionTemplate> V8TestObjRawCache = createRawTemplate();
+ return V8TestObjRawCache;
+}
+
+v8::Persistent<v8::FunctionTemplate> V8TestObj::GetTemplate()
+{
+ static v8::Persistent<v8::FunctionTemplate> V8TestObjCache = ConfigureV8TestObjTemplate(GetRawTemplate());
+ return V8TestObjCache;
+}
+
+TestObj* V8TestObj::toNative(v8::Handle<v8::Object> object)
+{
+ return reinterpret_cast<TestObj*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
+}
+
+bool V8TestObj::HasInstance(v8::Handle<v8::Value> value)
+{
+ return GetRawTemplate()->HasInstance(value);
+}
+
+
+v8::Handle<v8::Object> V8TestObj::wrap(TestObj* impl)
+{
+ v8::Handle<v8::Object> wrapper;
+ V8Proxy* proxy = 0;
+ wrapper = getDOMObjectMap().get(impl);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl);
+ if (wrapper.IsEmpty())
+ return wrapper;
+
+ impl->ref();
+ getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ return wrapper;
+}
+
+v8::Handle<v8::Value> toV8(PassRefPtr<TestObj > impl)
+{
+ return toV8(impl.get());
+}
+
+v8::Handle<v8::Value> toV8(TestObj* impl)
+{
+ if (!impl)
+ return v8::Null();
+ return V8TestObj::wrap(impl);
+}
+
+void V8TestObj::derefObject(void* object)
+{
+ static_cast<TestObj*>(object)->deref();
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.h b/WebCore/bindings/scripts/test/V8/V8TestObj.h
new file mode 100644
index 0000000..5d6770a
--- /dev/null
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.h
@@ -0,0 +1,53 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef V8TestObj_h
+#define V8TestObj_h
+
+#include "StringHash.h"
+#include "TestObj.h"
+#include "WrapperTypeInfo.h"
+#include <v8.h>
+#include <wtf/HashMap.h>
+
+namespace WebCore {
+
+class V8TestObj {
+
+public:
+ static bool HasInstance(v8::Handle<v8::Value> value);
+ static v8::Persistent<v8::FunctionTemplate> GetRawTemplate();
+ static v8::Persistent<v8::FunctionTemplate> GetTemplate();
+ static TestObj* toNative(v8::Handle<v8::Object>);
+ static v8::Handle<v8::Object> wrap(TestObj*);
+ static void derefObject(void*);
+ static WrapperTypeInfo info;
+ static v8::Handle<v8::Value> customMethodCallback(const v8::Arguments&);
+ static v8::Handle<v8::Value> customMethodWithArgsCallback(const v8::Arguments&);
+ static v8::Handle<v8::Value> customAttrAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);
+ static void customAttrAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
+};
+
+v8::Handle<v8::Value> toV8(TestObj*);
+v8::Handle<v8::Value> toV8(PassRefPtr<TestObj >);
+}
+
+#endif // V8TestObj_h