[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jianli at chromium.org jianli at chromium.org
Wed Dec 22 16:09:28 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c2867900120c63db454bae0b2a18a9b09594ece6
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 19 02:13:44 2010 +0000

    Make binding code generation scripts support 'short' type
    https://bugs.webkit.org/show_bug.cgi?id=49704
    
    Reviewed by Kenneth Russell.
    
    Updated binding tests.
    
    * bindings/scripts/CodeGeneratorJS.pm: Also fixed a style issue.
    * bindings/scripts/CodeGeneratorV8.pm:
    * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
    * bindings/scripts/test/CPP/WebDOMTestObj.h:
    * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
    * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
    * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
    * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
    * bindings/scripts/test/JS/JSTestObj.cpp:
    * bindings/scripts/test/JS/JSTestObj.h:
    * bindings/scripts/test/ObjC/DOMTestObj.h:
    * bindings/scripts/test/ObjC/DOMTestObj.mm:
    * bindings/scripts/test/TestObj.idl:
    * bindings/scripts/test/V8/V8TestObj.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72358 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index dc3d4f2..cf84a9a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-11-18  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        Make binding code generation scripts support 'short' type
+        https://bugs.webkit.org/show_bug.cgi?id=49704
+
+        Updated binding tests.
+
+        * bindings/scripts/CodeGeneratorJS.pm: Also fixed a style issue.
+        * bindings/scripts/CodeGeneratorV8.pm:
+        * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
+        * bindings/scripts/test/CPP/WebDOMTestObj.h:
+        * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
+        * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        * bindings/scripts/test/TestObj.idl:
+        * bindings/scripts/test/V8/V8TestObj.cpp:
+
 2010-11-18  Mark Rowe  <mrowe at apple.com>
 
         Rubber-stamped by Adam Roben.
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index ea32615..25e8d18 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -2077,7 +2077,7 @@ sub GenerateImplementation
             if ($constant->type eq "DOMString") {
                 push(@implContent, "    return jsStringOrNull(exec, String(" . $constant->value . "));\n");
             } else {
-                push(@implContent, "    UNUSED_PARAM(exec);");
+                push(@implContent, "    UNUSED_PARAM(exec);\n");
                 push(@implContent, "    return jsNumber(static_cast<int>(" . $constant->value . "));\n");
             }
             push(@implContent, "}\n\n");
@@ -2376,6 +2376,7 @@ my %nativeType = (
     "boolean" => "bool",
     "double" => "double",
     "float" => "float",
+    "short" => "short",
     "long" => "int",
     "unsigned long" => "unsigned",
     "unsigned short" => "unsigned short",
@@ -2446,7 +2447,7 @@ sub JSValueToNative
     return "$value.toBoolean(exec)" if $type eq "boolean";
     return "$value.toNumber(exec)" if $type eq "double";
     return "$value.toFloat(exec)" if $type eq "float";
-    return "$value.toInt32(exec)" if $type eq "long";
+    return "$value.toInt32(exec)" if $type eq "long" or $type eq "short";
     return "$value.toUInt32(exec)" if $type eq "unsigned long" or $type eq "unsigned short";
     return "static_cast<$type>($value.toInteger(exec))" if $type eq "long long" or $type eq "unsigned long long";
 
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 985ecd2..40d0e92 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -2901,7 +2901,7 @@ sub JSValueToNative
     return "$value->BooleanValue()" if $type eq "boolean";
     return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $type eq "double";
 
-    return "toInt32($value)" if $type eq "long";
+    return "toInt32($value)" if $type eq "long" or $type eq "short";
     return "toUInt32($value)" if $type eq "unsigned long" or $type eq "unsigned short";
     return "toInt64($value)" if $type eq "unsigned long long" or $type eq "long long";
     return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
index 579295f..9a8d909 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
@@ -103,6 +103,38 @@ WebDOMTestObj WebDOMTestObj::readOnlyTestObjAttr() const
     return toWebKit(WTF::getPtr(impl()->readOnlyTestObjAttr()));
 }
 
+short WebDOMTestObj::shortAttr() const
+{
+    if (!impl())
+        return 0;
+
+    return impl()->shortAttr();
+}
+
+void WebDOMTestObj::setShortAttr(short newShortAttr)
+{
+    if (!impl())
+        return;
+
+    impl()->setShortAttr(newShortAttr);
+}
+
+unsigned short WebDOMTestObj::unsignedShortAttr() const
+{
+    if (!impl())
+        return 0;
+
+    return impl()->unsignedShortAttr();
+}
+
+void WebDOMTestObj::setUnsignedShortAttr(unsigned short newUnsignedShortAttr)
+{
+    if (!impl())
+        return;
+
+    impl()->setUnsignedShortAttr(newUnsignedShortAttr);
+}
+
 int WebDOMTestObj::intAttr() const
 {
     if (!impl())
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
index cd6caaa..f29b7dc 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
@@ -60,6 +60,10 @@ public:
     int readOnlyIntAttr() const;
     WebDOMString readOnlyStringAttr() const;
     WebDOMTestObj readOnlyTestObjAttr() const;
+    short shortAttr() const;
+    void setShortAttr(short);
+    unsigned short unsignedShortAttr() const;
+    void setUnsignedShortAttr(unsigned short);
     int intAttr() const;
     void setIntAttr(int);
     long long longLongAttr() const;
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
index fbe538d..19ff166 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
@@ -58,8 +58,8 @@ gpointer kit(WebCore::TestCallback* obj)
 gboolean
 webkit_dom_test_callback_callback_with_class1param(WebKitDOMTestCallback* self, WebKitDOMClass1* class1param)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestCallback * item = WebKit::core(self);
     g_return_val_if_fail(class1param, 0);
     WebCore::Class1 * converted_class1param = NULL;
@@ -74,8 +74,8 @@ webkit_dom_test_callback_callback_with_class1param(WebKitDOMTestCallback* self,
 gboolean
 webkit_dom_test_callback_callback_with_class2param(WebKitDOMTestCallback* self, WebKitDOMClass2* class2param, const gchar* str_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestCallback * item = WebKit::core(self);
     g_return_val_if_fail(class2param, 0);
     g_return_val_if_fail(str_arg, 0);
@@ -92,8 +92,8 @@ webkit_dom_test_callback_callback_with_class2param(WebKitDOMTestCallback* self,
 glong
 webkit_dom_test_callback_callback_with_non_bool_return_type(WebKitDOMTestCallback* self, WebKitDOMClass3* class3param)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestCallback * item = WebKit::core(self);
     g_return_val_if_fail(class3param, 0);
     WebCore::Class3 * converted_class3param = NULL;
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp
index af9300d..7956e30 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp
@@ -52,8 +52,8 @@ gpointer kit(WebCore::TestMediaQueryListListener* obj)
 void
 webkit_dom_test_media_query_list_listener_method(WebKitDOMTestMediaQueryListListener* self, WebKitDOMMediaQueryListListener* listener)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestMediaQueryListListener * item = WebKit::core(self);
     g_return_if_fail(listener);
     WebCore::MediaQueryListListener * converted_listener = NULL;
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
index c9c10d7..1bf9983 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
@@ -55,8 +55,8 @@ gpointer kit(WebCore::TestObj* obj)
 void
 webkit_dom_test_obj_void_method(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->voidMethod();
 }
@@ -64,8 +64,8 @@ webkit_dom_test_obj_void_method(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_void_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(str_arg);
     g_return_if_fail(obj_arg);
@@ -81,8 +81,8 @@ webkit_dom_test_obj_void_method_with_args(WebKitDOMTestObj* self, glong int_arg,
 glong
 webkit_dom_test_obj_int_method(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->intMethod();
     return res;
@@ -91,8 +91,8 @@ webkit_dom_test_obj_int_method(WebKitDOMTestObj* self)
 glong
 webkit_dom_test_obj_int_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_val_if_fail(str_arg, 0);
     g_return_val_if_fail(obj_arg, 0);
@@ -109,8 +109,8 @@ webkit_dom_test_obj_int_method_with_args(WebKitDOMTestObj* self, glong int_arg,
 WebKitDOMTestObj*
 webkit_dom_test_obj_obj_method(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     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()));
@@ -120,8 +120,8 @@ webkit_dom_test_obj_obj_method(WebKitDOMTestObj* self)
 WebKitDOMTestObj*
 webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_val_if_fail(str_arg, 0);
     g_return_val_if_fail(obj_arg, 0);
@@ -139,8 +139,8 @@ webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg,
 WebKitDOMTestObj*
 webkit_dom_test_obj_method_that_requires_all_args(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_val_if_fail(str_arg, 0);
     g_return_val_if_fail(obj_arg, 0);
@@ -158,8 +158,8 @@ webkit_dom_test_obj_method_that_requires_all_args(WebKitDOMTestObj* self, const
 WebKitDOMTestObj*
 webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_val_if_fail(str_arg, 0);
     g_return_val_if_fail(obj_arg, 0);
@@ -183,8 +183,8 @@ webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* s
 void
 webkit_dom_test_obj_serialized_value(WebKitDOMTestObj* self, WebKitDOMSerializedScriptValue* serialized_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(serialized_arg);
     WebCore::SerializedScriptValue * converted_serialized_arg = NULL;
@@ -198,8 +198,8 @@ webkit_dom_test_obj_serialized_value(WebKitDOMTestObj* self, WebKitDOMSerialized
 void
 webkit_dom_test_obj_idb_key(WebKitDOMTestObj* self, WebKitDOMIDBKey* key)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(key);
     WebCore::IDBKey * converted_key = NULL;
@@ -213,8 +213,8 @@ webkit_dom_test_obj_idb_key(WebKitDOMTestObj* self, WebKitDOMIDBKey* key)
 void
 webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     WebCore::ExceptionCode ec = 0;
     item->methodWithException(ec);
@@ -234,8 +234,8 @@ webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error
 void
 webkit_dom_test_obj_with_dynamic_frame(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->withDynamicFrame();
 }
@@ -243,8 +243,8 @@ webkit_dom_test_obj_with_dynamic_frame(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_with_dynamic_frame_and_arg(WebKitDOMTestObj* self, glong int_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->withDynamicFrameAndArg(int_arg);
 }
@@ -252,8 +252,8 @@ webkit_dom_test_obj_with_dynamic_frame_and_arg(WebKitDOMTestObj* self, glong int
 void
 webkit_dom_test_obj_with_dynamic_frame_and_optional_arg(WebKitDOMTestObj* self, glong int_arg, glong optional_arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->withDynamicFrameAndOptionalArg(int_arg, optional_arg);
 }
@@ -261,8 +261,8 @@ webkit_dom_test_obj_with_dynamic_frame_and_optional_arg(WebKitDOMTestObj* self,
 void
 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture(WebKitDOMTestObj* self, glong int_arg, gboolean isUserGesture)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->withDynamicFrameAndUserGesture(int_arg, false);
 }
@@ -270,8 +270,8 @@ webkit_dom_test_obj_with_dynamic_frame_and_user_gesture(WebKitDOMTestObj* self,
 void
 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad(WebKitDOMTestObj* self, glong int_arg, glong optional_arg, gboolean isUserGesture)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->withDynamicFrameAndUserGestureASAD(int_arg, optional_arg, false);
 }
@@ -279,8 +279,8 @@ webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad(WebKitDOMTestObj* s
 void
 webkit_dom_test_obj_with_script_state_void(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->withScriptStateVoid();
 }
@@ -288,8 +288,8 @@ webkit_dom_test_obj_with_script_state_void(WebKitDOMTestObj* self)
 WebKitDOMTestObj*
 webkit_dom_test_obj_with_script_state_obj(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     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()));
@@ -299,8 +299,8 @@ webkit_dom_test_obj_with_script_state_obj(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_with_script_state_void_exception(WebKitDOMTestObj* self, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     WebCore::ExceptionCode ec = 0;
     item->withScriptStateVoidException(ec);
@@ -314,8 +314,8 @@ webkit_dom_test_obj_with_script_state_void_exception(WebKitDOMTestObj* self, GEr
 WebKitDOMTestObj*
 webkit_dom_test_obj_with_script_state_obj_exception(WebKitDOMTestObj* self, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     WebCore::ExceptionCode ec = 0;
     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObjException(ec));
@@ -331,8 +331,8 @@ webkit_dom_test_obj_with_script_state_obj_exception(WebKitDOMTestObj* self, GErr
 void
 webkit_dom_test_obj_with_script_execution_context(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->withScriptExecutionContext();
 }
@@ -340,8 +340,8 @@ webkit_dom_test_obj_with_script_execution_context(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_method_with_optional_arg(WebKitDOMTestObj* self, glong opt)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->methodWithOptionalArg(opt);
 }
@@ -349,8 +349,8 @@ webkit_dom_test_obj_method_with_optional_arg(WebKitDOMTestObj* self, glong opt)
 void
 webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg(WebKitDOMTestObj* self, glong non_opt, glong opt)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->methodWithNonOptionalArgAndOptionalArg(non_opt, opt);
 }
@@ -358,8 +358,8 @@ webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg(WebKitDOMTestO
 void
 webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOMTestObj* self, glong non_opt, glong opt1, glong opt2)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2);
 }
@@ -367,8 +367,8 @@ webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOM
 void
 webkit_dom_test_obj_class_method(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->classMethod();
 }
@@ -376,8 +376,8 @@ webkit_dom_test_obj_class_method(WebKitDOMTestObj* self)
 glong
 webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->classMethodWithOptional(arg);
     return res;
@@ -386,8 +386,8 @@ webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg
 glong
 webkit_dom_test_obj_get_read_only_int_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->readOnlyIntAttr();
     return res;
@@ -396,8 +396,8 @@ webkit_dom_test_obj_get_read_only_int_attr(WebKitDOMTestObj* self)
 gchar*
 webkit_dom_test_obj_get_read_only_string_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->readOnlyStringAttr());
     return res;
@@ -406,19 +406,57 @@ webkit_dom_test_obj_get_read_only_string_attr(WebKitDOMTestObj* self)
 WebKitDOMTestObj*
 webkit_dom_test_obj_get_read_only_test_obj_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     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;
 }
 
+gshort
+webkit_dom_test_obj_get_short_attr(WebKitDOMTestObj* self)
+{
+    g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
+    WebCore::TestObj * item = WebKit::core(self);
+    gshort res = item->shortAttr();
+    return res;
+}
+
+void
+webkit_dom_test_obj_set_short_attr(WebKitDOMTestObj* self, gshort value)
+{
+    g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
+    WebCore::TestObj * item = WebKit::core(self);
+    item->setShortAttr(value);
+}
+
+gushort
+webkit_dom_test_obj_get_unsigned_short_attr(WebKitDOMTestObj* self)
+{
+    g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
+    WebCore::TestObj * item = WebKit::core(self);
+    gushort res = item->unsignedShortAttr();
+    return res;
+}
+
+void
+webkit_dom_test_obj_set_unsigned_short_attr(WebKitDOMTestObj* self, gushort value)
+{
+    g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
+    WebCore::TestObj * item = WebKit::core(self);
+    item->setUnsignedShortAttr(value);
+}
+
 glong
 webkit_dom_test_obj_get_int_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->intAttr();
     return res;
@@ -427,8 +465,8 @@ webkit_dom_test_obj_get_int_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_int_attr(WebKitDOMTestObj* self, glong value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setIntAttr(value);
 }
@@ -436,8 +474,8 @@ webkit_dom_test_obj_set_int_attr(WebKitDOMTestObj* self, glong value)
 gint64
 webkit_dom_test_obj_get_long_long_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gint64 res = item->longLongAttr();
     return res;
@@ -446,8 +484,8 @@ webkit_dom_test_obj_get_long_long_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_long_long_attr(WebKitDOMTestObj* self, gint64 value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setLongLongAttr(value);
 }
@@ -455,8 +493,8 @@ webkit_dom_test_obj_set_long_long_attr(WebKitDOMTestObj* self, gint64 value)
 guint64
 webkit_dom_test_obj_get_unsigned_long_long_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     guint64 res = item->unsignedLongLongAttr();
     return res;
@@ -465,8 +503,8 @@ webkit_dom_test_obj_get_unsigned_long_long_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_unsigned_long_long_attr(WebKitDOMTestObj* self, guint64 value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setUnsignedLongLongAttr(value);
 }
@@ -474,8 +512,8 @@ webkit_dom_test_obj_set_unsigned_long_long_attr(WebKitDOMTestObj* self, guint64
 gchar*
 webkit_dom_test_obj_get_string_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->stringAttr());
     return res;
@@ -484,8 +522,8 @@ webkit_dom_test_obj_get_string_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_string_attr(WebKitDOMTestObj* self, const gchar* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -495,8 +533,8 @@ webkit_dom_test_obj_set_string_attr(WebKitDOMTestObj* self, const gchar* value)
 WebKitDOMTestObj*
 webkit_dom_test_obj_get_test_obj_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     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()));
@@ -506,8 +544,8 @@ webkit_dom_test_obj_get_test_obj_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WebCore::TestObj * converted_value = NULL;
@@ -521,8 +559,8 @@ webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj*
 WebKitDOMTestObj*
 webkit_dom_test_obj_get_xml_obj_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->xmlObjAttr());
     WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj*>(WebKit::kit(g_res.get()));
@@ -532,8 +570,8 @@ webkit_dom_test_obj_get_xml_obj_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_xml_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WebCore::TestObj * converted_value = NULL;
@@ -547,8 +585,8 @@ webkit_dom_test_obj_set_xml_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* v
 gboolean
 webkit_dom_test_obj_get_create(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gboolean res = item->isCreate();
     return res;
@@ -557,8 +595,8 @@ webkit_dom_test_obj_get_create(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_create(WebKitDOMTestObj* self, gboolean value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setCreate(value);
 }
@@ -566,8 +604,8 @@ webkit_dom_test_obj_set_create(WebKitDOMTestObj* self, gboolean value)
 gchar*
 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
     return res;
@@ -576,8 +614,8 @@ webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gchar* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -587,8 +625,8 @@ webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gcha
 glong
 webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
     return res;
@@ -597,8 +635,8 @@ webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value);
 }
@@ -606,8 +644,8 @@ webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong va
 gboolean
 webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gboolean res = item->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
     return res;
@@ -616,8 +654,8 @@ webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_boolean_attr(WebKitDOMTestObj* self, gboolean value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value);
 }
@@ -625,8 +663,8 @@ webkit_dom_test_obj_set_reflected_boolean_attr(WebKitDOMTestObj* self, gboolean
 gchar*
 webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
     return res;
@@ -635,8 +673,8 @@ webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, const gchar* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -646,8 +684,8 @@ webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, const gchar*
 gchar*
 webkit_dom_test_obj_get_reflected_non_empty_url_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->getNonEmptyURLAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr));
     return res;
@@ -656,8 +694,8 @@ webkit_dom_test_obj_get_reflected_non_empty_url_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_non_empty_url_attr(WebKitDOMTestObj* self, const gchar* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -667,8 +705,8 @@ webkit_dom_test_obj_set_reflected_non_empty_url_attr(WebKitDOMTestObj* self, con
 gchar*
 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
     return res;
@@ -677,8 +715,8 @@ webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gchar* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -688,8 +726,8 @@ webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gcha
 glong
 webkit_dom_test_obj_get_reflected_custom_integral_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
     return res;
@@ -698,8 +736,8 @@ webkit_dom_test_obj_get_reflected_custom_integral_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_custom_integral_attr(WebKitDOMTestObj* self, glong value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, value);
 }
@@ -707,8 +745,8 @@ webkit_dom_test_obj_set_reflected_custom_integral_attr(WebKitDOMTestObj* self, g
 gboolean
 webkit_dom_test_obj_get_reflected_custom_boolean_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gboolean res = item->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
     return res;
@@ -717,8 +755,8 @@ webkit_dom_test_obj_get_reflected_custom_boolean_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_custom_boolean_attr(WebKitDOMTestObj* self, gboolean value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value);
 }
@@ -726,8 +764,8 @@ webkit_dom_test_obj_set_reflected_custom_boolean_attr(WebKitDOMTestObj* self, gb
 gchar*
 webkit_dom_test_obj_get_reflected_custom_url_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
     return res;
@@ -736,8 +774,8 @@ webkit_dom_test_obj_get_reflected_custom_url_attr(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_reflected_custom_url_attr(WebKitDOMTestObj* self, const gchar* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -747,8 +785,8 @@ webkit_dom_test_obj_set_reflected_custom_url_attr(WebKitDOMTestObj* self, const
 gchar*
 webkit_dom_test_obj_get_reflected_custom_non_empty_url_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->getNonEmptyURLAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr));
     return res;
@@ -757,8 +795,8 @@ webkit_dom_test_obj_get_reflected_custom_non_empty_url_attr(WebKitDOMTestObj* se
 void
 webkit_dom_test_obj_set_reflected_custom_non_empty_url_attr(WebKitDOMTestObj* self, const gchar* value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -768,8 +806,8 @@ webkit_dom_test_obj_set_reflected_custom_non_empty_url_attr(WebKitDOMTestObj* se
 glong
 webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     WebCore::ExceptionCode ec = 0;
     glong res = item->attrWithGetterException(ec);
@@ -784,8 +822,8 @@ webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GErro
 void
 webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     WebCore::ExceptionCode ec = 0;
     item->setAttrWithGetterException(value, ec);
@@ -799,8 +837,8 @@ webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong
 glong
 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->attrWithSetterException();
     return res;
@@ -809,8 +847,8 @@ webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     WebCore::ExceptionCode ec = 0;
     item->setAttrWithSetterException(value, ec);
@@ -824,8 +862,8 @@ webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong
 gchar*
 webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     WebCore::ExceptionCode ec = 0;
     gchar* res = convertToUTF8String(item->stringAttrWithGetterException(ec));
@@ -835,8 +873,8 @@ webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self
 void
 webkit_dom_test_obj_set_string_attr_with_getter_exception(WebKitDOMTestObj* self, const gchar* value, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -852,8 +890,8 @@ webkit_dom_test_obj_set_string_attr_with_getter_exception(WebKitDOMTestObj* self
 gchar*
 webkit_dom_test_obj_get_string_attr_with_setter_exception(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->stringAttrWithSetterException());
     return res;
@@ -862,8 +900,8 @@ webkit_dom_test_obj_get_string_attr_with_setter_exception(WebKitDOMTestObj* self
 void
 webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self, const gchar* value, GError **error)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(value);
     WTF::String converted_value = WTF::String::fromUTF8(value);
@@ -879,87 +917,93 @@ webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self
 gchar*
 webkit_dom_test_obj_get_script_string_attr(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->scriptStringAttr());
     return res;
 }
 
-#if ENABLE(Condition1)
 glong
 webkit_dom_test_obj_get_conditional_attr1(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1)
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->conditionalAttr1();
     return res;
-}
+#else
+    return static_cast<glong>(0);
 #endif /* ENABLE(Condition1) */
+}
 
-#if ENABLE(Condition1)
 void
 webkit_dom_test_obj_set_conditional_attr1(WebKitDOMTestObj* self, glong value)
 {
-    WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1)
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setConditionalAttr1(value);
-}
 #endif /* ENABLE(Condition1) */
+}
 
-#if ENABLE(Condition1) && ENABLE(Condition2)
 glong
 webkit_dom_test_obj_get_conditional_attr2(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) && ENABLE(Condition2)
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->conditionalAttr2();
     return res;
-}
+#else
+    return static_cast<glong>(0);
 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
+}
 
-#if ENABLE(Condition1) && ENABLE(Condition2)
 void
 webkit_dom_test_obj_set_conditional_attr2(WebKitDOMTestObj* self, glong value)
 {
-    WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) && ENABLE(Condition2)
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setConditionalAttr2(value);
-}
 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
+}
 
-#if ENABLE(Condition1) || ENABLE(Condition2)
 glong
 webkit_dom_test_obj_get_conditional_attr3(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->conditionalAttr3();
     return res;
-}
+#else
+    return static_cast<glong>(0);
 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
+}
 
-#if ENABLE(Condition1) || ENABLE(Condition2)
 void
 webkit_dom_test_obj_set_conditional_attr3(WebKitDOMTestObj* self, glong value)
 {
-    WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setConditionalAttr3(value);
-}
 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
+}
 
 glong
 webkit_dom_test_obj_get_description(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->description();
     return res;
@@ -968,8 +1012,8 @@ webkit_dom_test_obj_get_description(WebKitDOMTestObj* self)
 glong
 webkit_dom_test_obj_get_id(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     glong res = item->id();
     return res;
@@ -978,8 +1022,8 @@ webkit_dom_test_obj_get_id(WebKitDOMTestObj* self)
 void
 webkit_dom_test_obj_set_id(WebKitDOMTestObj* self, glong value)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     item->setId(value);
 }
@@ -987,8 +1031,8 @@ webkit_dom_test_obj_set_id(WebKitDOMTestObj* self, glong value)
 gchar*
 webkit_dom_test_obj_get_hash(WebKitDOMTestObj* self)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     gchar* res = convertToUTF8String(item->hash());
     return res;
@@ -1015,6 +1059,8 @@ enum {
     PROP_READ_ONLY_INT_ATTR,
     PROP_READ_ONLY_STRING_ATTR,
     PROP_READ_ONLY_TEST_OBJ_ATTR,
+    PROP_SHORT_ATTR,
+    PROP_UNSIGNED_SHORT_ATTR,
     PROP_INT_ATTR,
     PROP_LONG_LONG_ATTR,
     PROP_UNSIGNED_LONG_LONG_ATTR,
@@ -1075,6 +1121,11 @@ static void webkit_dom_test_obj_set_property(GObject* object, guint prop_id, con
     WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
     WebCore::TestObj* coreSelf = WebKit::core(self);
     switch (prop_id) {
+    case PROP_UNSIGNED_SHORT_ATTR:
+    {
+        coreSelf->setUnsignedShortAttr((g_value_get_ushort(value)));
+        break;
+    }
     case PROP_INT_ATTR:
     {
         coreSelf->setIntAttr((g_value_get_long(value)));
@@ -1224,6 +1275,16 @@ static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GVa
         g_value_set_object(value, WebKit::kit(ptr.get()));
         break;
     }
+    case PROP_SHORT_ATTR:
+    {
+        g_value_set_int(value, coreSelf->shortAttr());
+        break;
+    }
+    case PROP_UNSIGNED_SHORT_ATTR:
+    {
+        g_value_set_uint(value, coreSelf->unsignedShortAttr());
+        break;
+    }
     case PROP_INT_ATTR:
     {
         g_value_set_long(value, coreSelf->intAttr());
@@ -1420,6 +1481,24 @@ G_MAXLONG, /* max */
                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
                                                            WEBKIT_PARAM_READABLE));
     g_object_class_install_property(gobjectClass,
+                                    PROP_SHORT_ATTR,
+                                    g_param_spec_int("short-attr", /* name */
+                                                           "test_obj_short-attr", /* short description */
+                                                           "read-write  gshort TestObj.short-attr", /* longer - could do with some extra doc stuff here */
+                                                           G_MININT, /* min */
+G_MAXINT, /* max */
+0, /* default */
+                                                           WEBKIT_PARAM_READWRITE));
+    g_object_class_install_property(gobjectClass,
+                                    PROP_UNSIGNED_SHORT_ATTR,
+                                    g_param_spec_uint("unsigned-short-attr", /* name */
+                                                           "test_obj_unsigned-short-attr", /* short description */
+                                                           "read-write  gushort TestObj.unsigned-short-attr", /* longer - could do with some extra doc stuff here */
+                                                           0, /* min */
+G_MAXUINT16, /* max */
+0, /* default */
+                                                           WEBKIT_PARAM_READWRITE));
+    g_object_class_install_property(gobjectClass,
                                     PROP_INT_ATTR,
                                     g_param_spec_long("int-attr", /* name */
                                                            "test_obj_int-attr", /* short description */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
index 8ee8f04..2eebdb1 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
@@ -139,6 +139,18 @@ 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 gshort
+webkit_dom_test_obj_get_short_attr(WebKitDOMTestObj* self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_short_attr(WebKitDOMTestObj* self, gshort value);
+
+WEBKIT_API gushort
+webkit_dom_test_obj_get_unsigned_short_attr(WebKitDOMTestObj* self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_unsigned_short_attr(WebKitDOMTestObj* self, gushort value);
+
 WEBKIT_API glong
 webkit_dom_test_obj_get_int_attr(WebKitDOMTestObj* self);
 
@@ -268,35 +280,23 @@ webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self
 WEBKIT_API gchar*
 webkit_dom_test_obj_get_script_string_attr(WebKitDOMTestObj* self);
 
-#if ENABLE(Condition1)
 WEBKIT_API glong
 webkit_dom_test_obj_get_conditional_attr1(WebKitDOMTestObj* self);
-#endif /* ENABLE(Condition1) */
 
-#if ENABLE(Condition1)
 WEBKIT_API void
 webkit_dom_test_obj_set_conditional_attr1(WebKitDOMTestObj* self, glong value);
-#endif /* ENABLE(Condition1) */
 
-#if ENABLE(Condition1) && ENABLE(Condition2)
 WEBKIT_API glong
 webkit_dom_test_obj_get_conditional_attr2(WebKitDOMTestObj* self);
-#endif /* ENABLE(Condition1) && ENABLE(Condition2) */
 
-#if ENABLE(Condition1) && ENABLE(Condition2)
 WEBKIT_API void
 webkit_dom_test_obj_set_conditional_attr2(WebKitDOMTestObj* self, glong value);
-#endif /* ENABLE(Condition1) && ENABLE(Condition2) */
 
-#if ENABLE(Condition1) || ENABLE(Condition2)
 WEBKIT_API glong
 webkit_dom_test_obj_get_conditional_attr3(WebKitDOMTestObj* self);
-#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
 
-#if ENABLE(Condition1) || ENABLE(Condition2)
 WEBKIT_API void
 webkit_dom_test_obj_set_conditional_attr3(WebKitDOMTestObj* self, glong value);
-#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
 
 WEBKIT_API glong
 webkit_dom_test_obj_get_description(WebKitDOMTestObj* self);
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 7e06068..9820fab 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -54,11 +54,13 @@ ASSERT_CLASS_FITS_IN_CELL(JSTestObj);
 #define THUNK_GENERATOR(generator)
 #endif
 
-static const HashTableValue JSTestObjTableValues[34] =
+static const HashTableValue JSTestObjTableValues[36] =
 {
     { "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) },
+    { "shortAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjShortAttr), (intptr_t)setJSTestObjShortAttr THUNK_GENERATOR(0) },
+    { "unsignedShortAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedShortAttr), (intptr_t)setJSTestObjUnsignedShortAttr 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) },
@@ -99,7 +101,7 @@ static const HashTableValue JSTestObjTableValues[34] =
 };
 
 #undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 132, 127, JSTestObjTableValues, 0 };
+static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 133, 127, JSTestObjTableValues, 0 };
 /* Hash table for constructor */
 #if ENABLE(JIT)
 #define THUNK_GENERATOR(generator) , generator
@@ -282,7 +284,7 @@ JSValue jsTestObjReadOnlyIntAttr(ExecState* exec, JSValue slotBase, const Identi
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->readOnlyIntAttr());
+    JSValue result = jsNumber(imp->readOnlyIntAttr());
     return result;
 }
 
@@ -304,12 +306,30 @@ JSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, JSValue slotBase, const Id
     return result;
 }
 
+JSValue jsTestObjShortAttr(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(imp->shortAttr());
+    return result;
+}
+
+JSValue jsTestObjUnsignedShortAttr(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(imp->unsignedShortAttr());
+    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());
+    JSValue result = jsNumber(imp->intAttr());
     return result;
 }
 
@@ -318,7 +338,7 @@ JSValue jsTestObjLongLongAttr(ExecState* exec, JSValue slotBase, const Identifie
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->longLongAttr());
+    JSValue result = jsNumber(imp->longLongAttr());
     return result;
 }
 
@@ -327,7 +347,7 @@ JSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSValue slotBase, const I
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->unsignedLongLongAttr());
+    JSValue result = jsNumber(imp->unsignedLongLongAttr());
     return result;
 }
 
@@ -381,7 +401,7 @@ JSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSValue slotBase, const
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
+    JSValue result = jsNumber(imp->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
     return result;
 }
 
@@ -426,7 +446,7 @@ JSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, JSValue slotBase,
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
+    JSValue result = jsNumber(imp->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
     return result;
 }
 
@@ -462,7 +482,7 @@ JSValue jsTestObjAttrWithGetterException(ExecState* exec, JSValue slotBase, cons
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     ExceptionCode ec = 0;
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSC::JSValue result = jsNumber(exec, imp->attrWithGetterException(ec));
+    JSC::JSValue result = jsNumber(imp->attrWithGetterException(ec));
     setDOMException(exec, ec);
     return result;
 }
@@ -472,7 +492,7 @@ JSValue jsTestObjAttrWithSetterException(ExecState* exec, JSValue slotBase, cons
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->attrWithSetterException());
+    JSValue result = jsNumber(imp->attrWithSetterException());
     return result;
 }
 
@@ -516,7 +536,7 @@ JSValue jsTestObjConditionalAttr1(ExecState* exec, JSValue slotBase, const Ident
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->conditionalAttr1());
+    JSValue result = jsNumber(imp->conditionalAttr1());
     return result;
 }
 #endif
@@ -527,7 +547,7 @@ JSValue jsTestObjConditionalAttr2(ExecState* exec, JSValue slotBase, const Ident
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->conditionalAttr2());
+    JSValue result = jsNumber(imp->conditionalAttr2());
     return result;
 }
 #endif
@@ -538,7 +558,7 @@ JSValue jsTestObjConditionalAttr3(ExecState* exec, JSValue slotBase, const Ident
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
-    JSValue result = jsNumber(exec, imp->conditionalAttr3());
+    JSValue result = jsNumber(imp->conditionalAttr3());
     return result;
 }
 #endif
@@ -548,7 +568,7 @@ JSValue jsTestObjDescription(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->description());
+    JSValue result = jsNumber(imp->description());
     return result;
 }
 
@@ -557,7 +577,7 @@ JSValue jsTestObjId(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->id());
+    JSValue result = jsNumber(imp->id());
     return result;
 }
 
@@ -580,6 +600,20 @@ void JSTestObj::put(ExecState* exec, const Identifier& propertyName, JSValue val
     lookupPut<JSTestObj, Base>(exec, propertyName, value, &JSTestObjTable, this, slot);
 }
 
+void setJSTestObjShortAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    imp->setShortAttr(value.toInt32(exec));
+}
+
+void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    imp->setUnsignedShortAttr(value.toUInt32(exec));
+}
+
 void setJSTestObjIntAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
@@ -821,7 +855,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethod(ExecState* exec
     TestObj* imp = static_cast<TestObj*>(castedThis->impl());
 
 
-    JSC::JSValue result = jsNumber(exec, imp->intMethod());
+    JSC::JSValue result = jsNumber(imp->intMethod());
     return JSValue::encode(result);
 }
 
@@ -843,7 +877,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethodWithArgs(ExecSta
         return JSValue::encode(jsUndefined());
 
 
-    JSC::JSValue result = jsNumber(exec, imp->intMethodWithArgs(intArg, strArg, objArg));
+    JSC::JSValue result = jsNumber(imp->intMethodWithArgs(intArg, strArg, objArg));
     return JSValue::encode(result);
 }
 
@@ -1476,7 +1510,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithOptional(E
     int argsCount = exec->argumentCount();
     if (argsCount <= 0) {
 
-        JSC::JSValue result = jsNumber(exec, imp->classMethodWithOptional());
+        JSC::JSValue result = jsNumber(imp->classMethodWithOptional());
         return JSValue::encode(result);
     }
 
@@ -1485,7 +1519,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithOptional(E
         return JSValue::encode(jsUndefined());
 
 
-    JSC::JSValue result = jsNumber(exec, imp->classMethodWithOptional(arg));
+    JSC::JSValue result = jsNumber(imp->classMethodWithOptional(arg));
     return JSValue::encode(result);
 }
 
@@ -1493,32 +1527,38 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithOptional(E
 
 JSValue jsTestObjCONST_VALUE_0(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(0));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(0));
 }
 
 JSValue jsTestObjCONST_VALUE_1(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(1));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(1));
 }
 
 JSValue jsTestObjCONST_VALUE_2(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(2));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(2));
 }
 
 JSValue jsTestObjCONST_VALUE_4(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(4));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(4));
 }
 
 JSValue jsTestObjCONST_VALUE_8(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(8));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(8));
 }
 
 JSValue jsTestObjCONST_VALUE_9(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(-1));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(-1));
 }
 
 JSValue jsTestObjCONST_VALUE_10(ExecState* exec, JSValue, const Identifier&)
@@ -1528,22 +1568,26 @@ JSValue jsTestObjCONST_VALUE_10(ExecState* exec, JSValue, const Identifier&)
 
 JSValue jsTestObjCONST_VALUE_11(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(0xffffffff));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(0xffffffff));
 }
 
 JSValue jsTestObjCONST_VALUE_12(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(0x01));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(0x01));
 }
 
 JSValue jsTestObjCONST_VALUE_13(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(0X20));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(0X20));
 }
 
 JSValue jsTestObjCONST_VALUE_14(ExecState* exec, JSValue, const Identifier&)
 {
-    return jsNumber(exec, static_cast<int>(0x1abc));
+    UNUSED_PARAM(exec);
+    return jsNumber(static_cast<int>(0x1abc));
 }
 
 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* object)
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.h b/WebCore/bindings/scripts/test/JS/JSTestObj.h
index 2168b3f..6014f7a 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -126,6 +126,10 @@ JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithOptio
 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 jsTestObjShortAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjUnsignedShortAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 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&);
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
index 1ad29cb..fd40095 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
@@ -52,6 +52,10 @@ enum {
 - (int)readOnlyIntAttr;
 - (NSString *)readOnlyStringAttr;
 - (DOMTestObj *)readOnlyTestObjAttr;
+- (short)shortAttr;
+- (void)setShortAttr:(short)newShortAttr;
+- (unsigned short)unsignedShortAttr;
+- (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr;
 - (int)intAttr;
 - (void)setIntAttr:(int)newIntAttr;
 - (long long)longLongAttr;
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
index 6788075..612597f 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
@@ -92,6 +92,30 @@
     return kit(WTF::getPtr(IMPL->readOnlyTestObjAttr()));
 }
 
+- (short)shortAttr
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->shortAttr();
+}
+
+- (void)setShortAttr:(short)newShortAttr
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->setShortAttr(newShortAttr);
+}
+
+- (unsigned short)unsignedShortAttr
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->unsignedShortAttr();
+}
+
+- (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->setUnsignedShortAttr(newUnsignedShortAttr);
+}
+
 - (int)intAttr
 {
     WebCore::JSMainThreadNullState state;
diff --git a/WebCore/bindings/scripts/test/TestObj.idl b/WebCore/bindings/scripts/test/TestObj.idl
index 22ed680..537534b 100644
--- a/WebCore/bindings/scripts/test/TestObj.idl
+++ b/WebCore/bindings/scripts/test/TestObj.idl
@@ -35,6 +35,8 @@ module test {
         readonly attribute long            readOnlyIntAttr;
         readonly attribute DOMString       readOnlyStringAttr;
         readonly attribute TestObj         readOnlyTestObjAttr;
+        attribute short                    shortAttr;
+        attribute unsigned short           unsignedShortAttr;
         attribute long                     intAttr;
         attribute long long                longLongAttr;
         attribute unsigned long long       unsignedLongLongAttr;
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index 4c921bb..e3d924a 100644
--- a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -79,6 +79,38 @@ static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetter(v8::Local<v8::String>
     return wrapper;
 }
 
+static v8::Handle<v8::Value> shortAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.shortAttr._get");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    return v8::Integer::New(imp->shortAttr());
+}
+
+static void shortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.shortAttr._set");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    int v = toInt32(value);
+    imp->setShortAttr(v);
+    return;
+}
+
+static v8::Handle<v8::Value> unsignedShortAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.unsignedShortAttr._get");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    return v8::Integer::New(imp->unsignedShortAttr());
+}
+
+static void unsignedShortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.unsignedShortAttr._set");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    int v = toUInt32(value);
+    imp->setUnsignedShortAttr(v);
+    return;
+}
+
 static v8::Handle<v8::Value> intAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.TestObj.intAttr._get");
@@ -1094,6 +1126,10 @@ static const BatchedAttribute TestObjAttrs[] = {
     {"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 'shortAttr' (Type: 'attribute' ExtAttr: '')
+    {"shortAttr", TestObjInternal::shortAttrAttrGetter, TestObjInternal::shortAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'unsignedShortAttr' (Type: 'attribute' ExtAttr: '')
+    {"unsignedShortAttr", TestObjInternal::unsignedShortAttrAttrGetter, TestObjInternal::unsignedShortAttrAttrSetter, 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: '')

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list