Look into possibilities of typedef in webkit idl files
authoraandrey@chromium.org <aandrey@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 11:53:55 +0000 (11:53 +0000)
committeraandrey@chromium.org <aandrey@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 11:53:55 +0000 (11:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=52340

Reviewed by Kentaro Hara.

Add typedef support for WebKit IDL parser.
Drive by: fixed a bug of generating "unrestrictedfloat" without a space.

Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.

* bindings/scripts/IDLParser.pm:
(assertNoExtendedAttributesInTypedef):
(parseDefinitions):
(applyTypedefs):
(applyTypedefsForSignature):
(parseTypedef):
(parseUnrestrictedFloatType):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
(WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
(WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
(WebDOMTestTypedefs::WebDOMTestTypedefs):
(WebDOMTestTypedefs::operator=):
(WebDOMTestTypedefs::impl):
(WebDOMTestTypedefs::~WebDOMTestTypedefs):
(WebDOMTestTypedefs::unsignedLongLongAttr):
(WebDOMTestTypedefs::setUnsignedLongLongAttr):
(WebDOMTestTypedefs::immutableSerializedScriptValue):
(WebDOMTestTypedefs::setImmutableSerializedScriptValue):
(WebDOMTestTypedefs::func):
(WebDOMTestTypedefs::multiTransferList):
(WebDOMTestTypedefs::setShadow):
(WebDOMTestTypedefs::nullableArrayArg):
(WebDOMTestTypedefs::immutablePointFunction):
(toWebCore):
(toWebKit):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
(WebCore):
(WebDOMTestTypedefs):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
(_WebKitDOMTestTypedefsPrivate):
(WebKit):
(WebKit::kit):
(WebKit::core):
(WebKit::wrapTestTypedefs):
(webkit_dom_test_typedefs_finalize):
(webkit_dom_test_typedefs_set_property):
(webkit_dom_test_typedefs_get_property):
(webkit_dom_test_typedefs_constructor):
(webkit_dom_test_typedefs_class_init):
(webkit_dom_test_typedefs_init):
(webkit_dom_test_typedefs_func):
(webkit_dom_test_typedefs_multi_transfer_list):
(webkit_dom_test_typedefs_set_shadow):
(webkit_dom_test_typedefs_nullable_array_arg):
(webkit_dom_test_typedefs_immutable_point_function):
(webkit_dom_test_typedefs_string_array_function):
(webkit_dom_test_typedefs_get_unsigned_long_long_attr):
(webkit_dom_test_typedefs_set_unsigned_long_long_attr):
(webkit_dom_test_typedefs_get_immutable_serialized_script_value):
(webkit_dom_test_typedefs_set_immutable_serialized_script_value):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
(_WebKitDOMTestTypedefs):
(_WebKitDOMTestTypedefsClass):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
(WebKit):
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
(WebCore):
(WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
(WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
(WebCore::JSTestTypedefsConstructor::finishCreation):
(WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
(WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
(WebCore::JSTestTypedefsConstructor::getConstructData):
(WebCore::JSTestTypedefsPrototype::self):
(WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
(WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
(WebCore::JSTestTypedefs::JSTestTypedefs):
(WebCore::JSTestTypedefs::finishCreation):
(WebCore::JSTestTypedefs::createPrototype):
(WebCore::JSTestTypedefs::destroy):
(WebCore::JSTestTypedefs::~JSTestTypedefs):
(WebCore::JSTestTypedefs::getOwnPropertySlot):
(WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
(WebCore::jsTestTypedefsUnsignedLongLongAttr):
(WebCore::jsTestTypedefsImmutableSerializedScriptValue):
(WebCore::jsTestTypedefsConstructorTestSubObj):
(WebCore::jsTestTypedefsConstructor):
(WebCore::JSTestTypedefs::put):
(WebCore::setJSTestTypedefsUnsignedLongLongAttr):
(WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
(WebCore::JSTestTypedefs::getConstructor):
(WebCore::jsTestTypedefsPrototypeFunctionFunc):
(WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::isObservable):
(WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestTypedefsOwner::finalize):
(WebCore::toJS):
(WebCore::toTestTypedefs):
* bindings/scripts/test/JS/JSTestTypedefs.h: Added.
(WebCore):
(JSTestTypedefs):
(WebCore::JSTestTypedefs::create):
(WebCore::JSTestTypedefs::createStructure):
(WebCore::JSTestTypedefs::impl):
(WebCore::JSTestTypedefs::releaseImpl):
(WebCore::JSTestTypedefs::releaseImplIfNotNull):
(JSTestTypedefsOwner):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(JSTestTypedefsPrototype):
(WebCore::JSTestTypedefsPrototype::create):
(WebCore::JSTestTypedefsPrototype::createStructure):
(WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
(JSTestTypedefsConstructor):
(WebCore::JSTestTypedefsConstructor::create):
(WebCore::JSTestTypedefsConstructor::createStructure):
* bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
(-[DOMTestTypedefs dealloc]):
(-[DOMTestTypedefs finalize]):
(-[DOMTestTypedefs unsignedLongLongAttr]):
(-[DOMTestTypedefs setUnsignedLongLongAttr:]):
(-[DOMTestTypedefs immutableSerializedScriptValue]):
(-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
(-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
(-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
(-[DOMTestTypedefs immutablePointFunction]):
(core):
(kit):
* bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
(WebCore):
* bindings/scripts/test/TestTypedefs.idl: Added.
* bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
(WebCore):
(WebCore::checkTypeOrDieTrying):
(TestTypedefsV8Internal):
(WebCore::TestTypedefsV8Internal::V8_USE):
(WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
(WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
(WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
(WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
(WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
(WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
(WebCore::TestTypedefsV8Internal::funcCallback):
(WebCore::TestTypedefsV8Internal::multiTransferListCallback):
(WebCore::TestTypedefsV8Internal::setShadowCallback):
(WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
(WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
(WebCore::TestTypedefsV8Internal::funcWithClampCallback):
(WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
(WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
(WebCore::V8TestTypedefs::constructorCallback):
(WebCore::ConfigureV8TestTypedefsTemplate):
(WebCore::V8TestTypedefs::GetRawTemplate):
(WebCore::V8TestTypedefs::GetTemplate):
(WebCore::V8TestTypedefs::HasInstance):
(WebCore::V8TestTypedefs::createWrapper):
(WebCore::V8TestTypedefs::derefObject):
* bindings/scripts/test/V8/V8TestTypedefs.h: Added.
(WebCore):
(V8TestTypedefs):
(WebCore::V8TestTypedefs::toNative):
(WebCore::V8TestTypedefs::installPerContextProperties):
(WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
(WebCore::wrap):
(WebCore::toV8):
(WebCore::toV8Fast):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142865 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/IDLParser.pm
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/TestTypedefs.idl [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.h [new file with mode: 0644]

index 16beb13..3001a59 100644 (file)
@@ -1,3 +1,179 @@
+2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
+
+        Look into possibilities of typedef in webkit idl files
+        https://bugs.webkit.org/show_bug.cgi?id=52340
+
+        Reviewed by Kentaro Hara.
+
+        Add typedef support for WebKit IDL parser.
+        Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
+
+        Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
+
+        * bindings/scripts/IDLParser.pm:
+        (assertNoExtendedAttributesInTypedef):
+        (parseDefinitions):
+        (applyTypedefs):
+        (applyTypedefsForSignature):
+        (parseTypedef):
+        (parseUnrestrictedFloatType):
+        * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
+        (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
+        (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
+        (WebDOMTestTypedefs::WebDOMTestTypedefs):
+        (WebDOMTestTypedefs::operator=):
+        (WebDOMTestTypedefs::impl):
+        (WebDOMTestTypedefs::~WebDOMTestTypedefs):
+        (WebDOMTestTypedefs::unsignedLongLongAttr):
+        (WebDOMTestTypedefs::setUnsignedLongLongAttr):
+        (WebDOMTestTypedefs::immutableSerializedScriptValue):
+        (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
+        (WebDOMTestTypedefs::func):
+        (WebDOMTestTypedefs::multiTransferList):
+        (WebDOMTestTypedefs::setShadow):
+        (WebDOMTestTypedefs::nullableArrayArg):
+        (WebDOMTestTypedefs::immutablePointFunction):
+        (toWebCore):
+        (toWebKit):
+        * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
+        (WebCore):
+        (WebDOMTestTypedefs):
+        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
+        (_WebKitDOMTestTypedefsPrivate):
+        (WebKit):
+        (WebKit::kit):
+        (WebKit::core):
+        (WebKit::wrapTestTypedefs):
+        (webkit_dom_test_typedefs_finalize):
+        (webkit_dom_test_typedefs_set_property):
+        (webkit_dom_test_typedefs_get_property):
+        (webkit_dom_test_typedefs_constructor):
+        (webkit_dom_test_typedefs_class_init):
+        (webkit_dom_test_typedefs_init):
+        (webkit_dom_test_typedefs_func):
+        (webkit_dom_test_typedefs_multi_transfer_list):
+        (webkit_dom_test_typedefs_set_shadow):
+        (webkit_dom_test_typedefs_nullable_array_arg):
+        (webkit_dom_test_typedefs_immutable_point_function):
+        (webkit_dom_test_typedefs_string_array_function):
+        (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
+        (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
+        (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
+        (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
+        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
+        (_WebKitDOMTestTypedefs):
+        (_WebKitDOMTestTypedefsClass):
+        * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
+        (WebKit):
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
+        (WebCore):
+        (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
+        (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
+        (WebCore::JSTestTypedefsConstructor::finishCreation):
+        (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
+        (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
+        (WebCore::JSTestTypedefsConstructor::getConstructData):
+        (WebCore::JSTestTypedefsPrototype::self):
+        (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
+        (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
+        (WebCore::JSTestTypedefs::JSTestTypedefs):
+        (WebCore::JSTestTypedefs::finishCreation):
+        (WebCore::JSTestTypedefs::createPrototype):
+        (WebCore::JSTestTypedefs::destroy):
+        (WebCore::JSTestTypedefs::~JSTestTypedefs):
+        (WebCore::JSTestTypedefs::getOwnPropertySlot):
+        (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
+        (WebCore::jsTestTypedefsUnsignedLongLongAttr):
+        (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
+        (WebCore::jsTestTypedefsConstructorTestSubObj):
+        (WebCore::jsTestTypedefsConstructor):
+        (WebCore::JSTestTypedefs::put):
+        (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
+        (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
+        (WebCore::JSTestTypedefs::getConstructor):
+        (WebCore::jsTestTypedefsPrototypeFunctionFunc):
+        (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
+        (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
+        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
+        (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
+        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
+        (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
+        (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
+        (WebCore::isObservable):
+        (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
+        (WebCore::JSTestTypedefsOwner::finalize):
+        (WebCore::toJS):
+        (WebCore::toTestTypedefs):
+        * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
+        (WebCore):
+        (JSTestTypedefs):
+        (WebCore::JSTestTypedefs::create):
+        (WebCore::JSTestTypedefs::createStructure):
+        (WebCore::JSTestTypedefs::impl):
+        (WebCore::JSTestTypedefs::releaseImpl):
+        (WebCore::JSTestTypedefs::releaseImplIfNotNull):
+        (JSTestTypedefsOwner):
+        (WebCore::wrapperOwner):
+        (WebCore::wrapperContext):
+        (JSTestTypedefsPrototype):
+        (WebCore::JSTestTypedefsPrototype::create):
+        (WebCore::JSTestTypedefsPrototype::createStructure):
+        (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
+        (JSTestTypedefsConstructor):
+        (WebCore::JSTestTypedefsConstructor::create):
+        (WebCore::JSTestTypedefsConstructor::createStructure):
+        * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
+        * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
+        (-[DOMTestTypedefs dealloc]):
+        (-[DOMTestTypedefs finalize]):
+        (-[DOMTestTypedefs unsignedLongLongAttr]):
+        (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
+        (-[DOMTestTypedefs immutableSerializedScriptValue]):
+        (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
+        (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
+        (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
+        (-[DOMTestTypedefs immutablePointFunction]):
+        (core):
+        (kit):
+        * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
+        (WebCore):
+        * bindings/scripts/test/TestTypedefs.idl: Added.
+        * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
+        (WebCore):
+        (WebCore::checkTypeOrDieTrying):
+        (TestTypedefsV8Internal):
+        (WebCore::TestTypedefsV8Internal::V8_USE):
+        (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
+        (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
+        (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
+        (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
+        (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
+        (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
+        (WebCore::TestTypedefsV8Internal::funcCallback):
+        (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
+        (WebCore::TestTypedefsV8Internal::setShadowCallback):
+        (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
+        (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
+        (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
+        (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
+        (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
+        (WebCore::V8TestTypedefs::constructorCallback):
+        (WebCore::ConfigureV8TestTypedefsTemplate):
+        (WebCore::V8TestTypedefs::GetRawTemplate):
+        (WebCore::V8TestTypedefs::GetTemplate):
+        (WebCore::V8TestTypedefs::HasInstance):
+        (WebCore::V8TestTypedefs::createWrapper):
+        (WebCore::V8TestTypedefs::derefObject):
+        * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
+        (WebCore):
+        (V8TestTypedefs):
+        (WebCore::V8TestTypedefs::toNative):
+        (WebCore::V8TestTypedefs::installPerContextProperties):
+        (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
+        (WebCore::wrap):
+        (WebCore::toV8):
+        (WebCore::toV8Fast):
+
 2013-02-13  Kentaro Hara  <haraken@chromium.org>
 
         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
index 6ae8b9e..7f583a4 100644 (file)
@@ -48,7 +48,7 @@ struct( domInterface => {
     functions => '@',    # List of 'domFunction'
     attributes => '@',    # List of 'domAttribute'    
     extendedAttributes => '$', # Extended attributes
-    constructors => '@', # Constructor
+    constructors => '@', # Constructors, list of 'domFunction'
     isException => '$', # Used for exception interfaces
 });
 
@@ -98,6 +98,14 @@ struct( Token => {
     value => '$' # value of token
 });
 
+struct( Typedef => {
+    extendedAttributes => '$', # Extended attributes
+    type => '$', # Type of data
+});
+
+# Maps 'typedef name' -> Typedef
+my %typedefs = ();
+
 sub new {
     my $class = shift;
 
@@ -149,6 +157,19 @@ sub assertUnexpectedToken
     die $msg;
 }
 
+sub assertNoExtendedAttributesInTypedef
+{
+    my $self = shift;
+    my $name = shift;
+    my $line = shift;
+    my $typedef = $typedefs{$name};
+    my $msg = "Unexpected extendedAttributeList in typedef \"$name\" at " . $self->{Line};
+    if (defined ($line)) {
+        $msg .= " IDLParser.pm:" . $line;
+    }
+    die $msg if %{$typedef->extendedAttributes};
+}
+
 sub Parse
 {
     my $self = shift;
@@ -322,9 +343,73 @@ sub parseDefinitions
             push(@definitions, $definition);
         }
     }
+    $self->applyTypedefs(\@definitions);
     return \@definitions;
 }
 
+sub applyTypedefs
+{
+    my $self = shift;
+    my $definitions = shift;
+   
+    if (!%typedefs) {
+        return;
+    }
+    foreach my $definition (@$definitions) {
+        if (ref($definition) eq "domInterface") {
+            foreach my $constant (@{$definition->constants}) {
+                if (exists $typedefs{$constant->type}) {
+                    my $typedef = $typedefs{$constant->type};
+                    $self->assertNoExtendedAttributesInTypedef($constant->type, __LINE__);
+                    $constant->type($typedef->type);
+                }
+            }
+            foreach my $attribute (@{$definition->attributes}) {
+                $self->applyTypedefsForSignature($attribute->signature);
+            }
+            foreach my $function (@{$definition->functions}, @{$definition->constructors}) {
+                $self->applyTypedefsForSignature($function->signature);
+                foreach my $signature (@{$function->parameters}) {
+                    $self->applyTypedefsForSignature($signature);
+                }
+            }
+        }
+    }
+}
+
+sub applyTypedefsForSignature
+{
+    my $self = shift;
+    my $signature = shift;
+
+    if (!defined ($signature->type)) {
+        return;
+    }
+
+    my $type = $signature->type;
+    $type =~ s/[\?\[\]]+$//g;
+    my $typeSuffix = $signature->type;
+    $typeSuffix =~ s/^[^\?\[\]]+//g;
+    if (exists $typedefs{$type}) {
+        my $typedef = $typedefs{$type};
+        $signature->type($typedef->type . $typeSuffix);
+        copyExtendedAttributes($signature->extendedAttributes, $typedef->extendedAttributes);
+    }
+
+    # Handle union types, sequences and etc.
+    foreach my $name (%typedefs) {
+        if (!exists $typedefs{$name}) {
+            next;
+        }
+        my $typedef = $typedefs{$name};
+        my $regex = '\\b' . $name . '\\b';
+        my $replacement = $typedef->type;
+        my $type = $signature->type;
+        $type =~ s/($regex)/$replacement/g;
+        $signature->type($type);
+    }
+}
+
 sub parseDefinition
 {
     my $self = shift;
@@ -726,14 +811,20 @@ sub parseTypedef
 {
     my $self = shift;
     my $extendedAttributeList = shift;
+    die "Extended attributes are not applicable to typedefs themselves: " . $self->{Line} if %{$extendedAttributeList};
 
     my $next = $self->nextToken();
     if ($next->value() eq "typedef") {
         $self->assertTokenValue($self->getToken(), "typedef", __LINE__);
-        $self->parseExtendedAttributeList();
-        $self->parseType();
-        $self->assertTokenType($self->getToken(), IdentifierToken);
+        my $typedef = Typedef->new();
+        $typedef->extendedAttributes($self->parseExtendedAttributeListAllowEmpty());
+        $typedef->type($self->parseType());
+        my $nameToken = $self->getToken();
+        $self->assertTokenType($nameToken, IdentifierToken);
         $self->assertTokenValue($self->getToken(), ";", __LINE__);
+        my $name = $nameToken->value();
+        die "typedef redefinition for " . $name . " at " . $self->{Line} if exists $typedefs{$name};
+        $typedefs{$name} = $typedef;
         return;
     }
     $self->assertUnexpectedToken($next->value(), __LINE__);
@@ -1803,7 +1894,7 @@ sub parseUnrestrictedFloatType
     my $next = $self->nextToken();
     if ($next->value() eq "unrestricted") {
         $self->assertTokenValue($self->getToken(), "unrestricted", __LINE__);
-        return "unrestricted" . $self->parseFloatType();
+        return "unrestricted " . $self->parseFloatType();
     }
     if ($next->value() =~ /$nextUnrestrictedFloatType_1/) {
         return $self->parseFloatType();
diff --git a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp
new file mode 100644 (file)
index 0000000..d016a34
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * 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 "WebDOMTestTypedefs.h"
+
+#include "Array.h"
+#include "KURL.h"
+#include "SVGPoint.h"
+#include "SerializedScriptValue.h"
+#include "WebDOMArray.h"
+#include "WebDOMSVGPoint.h"
+#include "WebDOMString.h"
+#include "WebExceptionHandler.h"
+#include "wtf/text/AtomicString.h"
+#include <wtf/GetPtr.h>
+#include <wtf/RefPtr.h>
+
+struct WebDOMTestTypedefs::WebDOMTestTypedefsPrivate {
+    WebDOMTestTypedefsPrivate(WebCore::TestTypedefs* object = 0)
+        : impl(object)
+    {
+    }
+
+    RefPtr<WebCore::TestTypedefs> impl;
+};
+
+WebDOMTestTypedefs::WebDOMTestTypedefs()
+    : WebDOMObject()
+    , m_impl(0)
+{
+}
+
+WebDOMTestTypedefs::WebDOMTestTypedefs(WebCore::TestTypedefs* impl)
+    : WebDOMObject()
+    , m_impl(new WebDOMTestTypedefsPrivate(impl))
+{
+}
+
+WebDOMTestTypedefs::WebDOMTestTypedefs(const WebDOMTestTypedefs& copy)
+    : WebDOMObject()
+{
+    m_impl = copy.impl() ? new WebDOMTestTypedefsPrivate(copy.impl()) : 0;
+}
+
+WebDOMTestTypedefs& WebDOMTestTypedefs::operator=(const WebDOMTestTypedefs& copy)
+{
+    delete m_impl;
+    m_impl = copy.impl() ? new WebDOMTestTypedefsPrivate(copy.impl()) : 0;
+    return *this;
+}
+
+WebCore::TestTypedefs* WebDOMTestTypedefs::impl() const
+{
+    return m_impl ? WTF::getPtr(m_impl->impl) : 0;
+}
+
+WebDOMTestTypedefs::~WebDOMTestTypedefs()
+{
+    delete m_impl;
+    m_impl = 0;
+}
+
+unsigned long long WebDOMTestTypedefs::unsignedLongLongAttr() const
+{
+    if (!impl())
+        return 0;
+
+    return impl()->unsignedLongLongAttr();
+}
+
+void WebDOMTestTypedefs::setUnsignedLongLongAttr(unsigned long long newUnsignedLongLongAttr)
+{
+    if (!impl())
+        return;
+
+    impl()->setUnsignedLongLongAttr(newUnsignedLongLongAttr);
+}
+
+WebDOMString WebDOMTestTypedefs::immutableSerializedScriptValue() const
+{
+    if (!impl())
+        return WebDOMString();
+
+    return impl()->immutableSerializedScriptValue()->toString();
+}
+
+void WebDOMTestTypedefs::setImmutableSerializedScriptValue(const WebDOMString& newImmutableSerializedScriptValue)
+{
+    if (!impl())
+        return;
+
+    impl()->setImmutableSerializedScriptValue(WebCore::SerializedScriptValue::create(WTF::String(newImmutableSerializedScriptValue)));
+}
+
+int WebDOMTestTypedefs::attrWithGetterException() const
+{
+    if (!impl())
+        return 0;
+
+    WebCore::ExceptionCode ec = 0;
+    int result = impl()->attrWithGetterException(ec);
+    webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
+    return result;
+}
+
+void WebDOMTestTypedefs::setAttrWithGetterException(int newAttrWithGetterException)
+{
+    if (!impl())
+        return;
+
+    impl()->setAttrWithGetterException(newAttrWithGetterException);
+}
+
+int WebDOMTestTypedefs::attrWithSetterException() const
+{
+    if (!impl())
+        return 0;
+
+    return impl()->attrWithSetterException();
+}
+
+void WebDOMTestTypedefs::setAttrWithSetterException(int newAttrWithSetterException)
+{
+    if (!impl())
+        return;
+
+    WebCore::ExceptionCode ec = 0;
+    impl()->setAttrWithSetterException(newAttrWithSetterException, ec);
+    webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
+}
+
+WebDOMString WebDOMTestTypedefs::stringAttrWithGetterException() const
+{
+    if (!impl())
+        return WebDOMString();
+
+    WebCore::ExceptionCode ec = 0;
+    WebDOMString result = impl()->stringAttrWithGetterException(ec);
+    webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
+    return static_cast<const WTF::String&>(result);
+}
+
+void WebDOMTestTypedefs::setStringAttrWithGetterException(const WebDOMString& newStringAttrWithGetterException)
+{
+    if (!impl())
+        return;
+
+    impl()->setStringAttrWithGetterException(newStringAttrWithGetterException);
+}
+
+WebDOMString WebDOMTestTypedefs::stringAttrWithSetterException() const
+{
+    if (!impl())
+        return WebDOMString();
+
+    return static_cast<const WTF::String&>(impl()->stringAttrWithSetterException());
+}
+
+void WebDOMTestTypedefs::setStringAttrWithSetterException(const WebDOMString& newStringAttrWithSetterException)
+{
+    if (!impl())
+        return;
+
+    WebCore::ExceptionCode ec = 0;
+    impl()->setStringAttrWithSetterException(newStringAttrWithSetterException, ec);
+    webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
+}
+
+void WebDOMTestTypedefs::func(const WebDOMlong[]& x)
+{
+    if (!impl())
+        return;
+
+    impl()->func(toWebCore(x));
+}
+
+void WebDOMTestTypedefs::multiTransferList(const WebDOMString& first, const WebDOMArray& tx, const WebDOMString& second, const WebDOMArray& txx)
+{
+    if (!impl())
+        return;
+
+    impl()->multiTransferList(WebCore::SerializedScriptValue::create(WTF::String(first)), toWebCore(tx), WebCore::SerializedScriptValue::create(WTF::String(second)), toWebCore(txx));
+}
+
+void WebDOMTestTypedefs::setShadow(float width, float height, float blur, const WebDOMString& color, float alpha)
+{
+    if (!impl())
+        return;
+
+    impl()->setShadow(width, height, blur, color, alpha);
+}
+
+void WebDOMTestTypedefs::nullableArrayArg(const WebDOMDOMString[]& arrayArg)
+{
+    if (!impl())
+        return;
+
+    impl()->nullableArrayArg(toWebCore(arrayArg));
+}
+
+WebDOMSVGPoint WebDOMTestTypedefs::immutablePointFunction()
+{
+    if (!impl())
+        return WebDOMSVGPoint();
+
+    return toWebKit(WTF::getPtr(impl()->immutablePointFunction()));
+}
+
+void WebDOMTestTypedefs::methodWithException()
+{
+    if (!impl())
+        return;
+
+    WebCore::ExceptionCode ec = 0;
+    impl()->methodWithException(ec);
+    webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
+}
+
+WebCore::TestTypedefs* toWebCore(const WebDOMTestTypedefs& wrapper)
+{
+    return wrapper.impl();
+}
+
+WebDOMTestTypedefs toWebKit(WebCore::TestTypedefs* value)
+{
+    return WebDOMTestTypedefs(value);
+}
diff --git a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.h b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.h
new file mode 100644 (file)
index 0000000..7dc1925
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * 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 WebDOMTestTypedefs_h
+#define WebDOMTestTypedefs_h
+
+#include <WebDOMObject.h>
+#include <WebDOMString.h>
+
+namespace WebCore {
+class TestTypedefs;
+};
+
+class WebDOMArray;
+class WebDOMDOMString[];
+class WebDOMSVGPoint;
+class WebDOMString;
+class WebDOMlong[];
+
+class WebDOMTestTypedefs : public WebDOMObject {
+public:
+    WebDOMTestTypedefs();
+    explicit WebDOMTestTypedefs(WebCore::TestTypedefs*);
+    WebDOMTestTypedefs(const WebDOMTestTypedefs&);
+    WebDOMTestTypedefs& operator=(const WebDOMTestTypedefs&);
+    virtual ~WebDOMTestTypedefs();
+
+    unsigned long long unsignedLongLongAttr() const;
+    void setUnsignedLongLongAttr(unsigned long long);
+    WebDOMString immutableSerializedScriptValue() const;
+    void setImmutableSerializedScriptValue(const WebDOMString&);
+    int attrWithGetterException() const;
+    void setAttrWithGetterException(int);
+    int attrWithSetterException() const;
+    void setAttrWithSetterException(int);
+    WebDOMString stringAttrWithGetterException() const;
+    void setStringAttrWithGetterException(const WebDOMString&);
+    WebDOMString stringAttrWithSetterException() const;
+    void setStringAttrWithSetterException(const WebDOMString&);
+
+    void func(const WebDOMlong[]& x);
+    void multiTransferList(const WebDOMString& first, const WebDOMArray& tx, const WebDOMString& second, const WebDOMArray& txx);
+    void setShadow(float width, float height, float blur, const WebDOMString& color, float alpha);
+    void nullableArrayArg(const WebDOMDOMString[]& arrayArg);
+    WebDOMSVGPoint immutablePointFunction();
+    void methodWithException();
+
+    WebCore::TestTypedefs* impl() const;
+
+protected:
+    struct WebDOMTestTypedefsPrivate;
+    WebDOMTestTypedefsPrivate* m_impl;
+};
+
+WebCore::TestTypedefs* toWebCore(const WebDOMTestTypedefs&);
+WebDOMTestTypedefs toWebKit(WebCore::TestTypedefs*);
+
+#endif
diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp
new file mode 100644 (file)
index 0000000..b9459a0
--- /dev/null
@@ -0,0 +1,495 @@
+/*
+    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 "WebKitDOMTestTypedefs.h"
+
+#include "DOMObjectCache.h"
+#include "ExceptionCode.h"
+#include "JSMainThreadExecState.h"
+#include "WebKitDOMArrayPrivate.h"
+#include "WebKitDOMBinding.h"
+#include "WebKitDOMDOMString[]Private.h"
+#include "WebKitDOMSVGPointPrivate.h"
+#include "WebKitDOMSerializedScriptValuePrivate.h"
+#include "WebKitDOMTestTypedefsPrivate.h"
+#include "WebKitDOMlong[]Private.h"
+#include "gobject/ConvertToUTF8String.h"
+#include <wtf/GetPtr.h>
+#include <wtf/RefPtr.h>
+
+#define WEBKIT_DOM_TEST_TYPEDEFS_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_TYPE_DOM_TEST_TYPEDEFS, WebKitDOMTestTypedefsPrivate)
+
+typedef struct _WebKitDOMTestTypedefsPrivate {
+    RefPtr<WebCore::TestTypedefs> coreObject;
+} WebKitDOMTestTypedefsPrivate;
+
+namespace WebKit {
+
+WebKitDOMTestTypedefs* kit(WebCore::TestTypedefs* obj)
+{
+    if (!obj)
+        return 0;
+
+    if (gpointer ret = DOMObjectCache::get(obj))
+        return WEBKIT_DOM_TEST_TYPEDEFS(ret);
+
+    return wrapTestTypedefs(obj);
+}
+
+WebCore::TestTypedefs* core(WebKitDOMTestTypedefs* request)
+{
+    return request ? static_cast<WebCore::TestTypedefs*>(WEBKIT_DOM_OBJECT(request)->coreObject) : 0;
+}
+
+WebKitDOMTestTypedefs* wrapTestTypedefs(WebCore::TestTypedefs* coreObject)
+{
+    ASSERT(coreObject);
+    return WEBKIT_DOM_TEST_TYPEDEFS(g_object_new(WEBKIT_TYPE_DOM_TEST_TYPEDEFS, "core-object", coreObject, NULL));
+}
+
+} // namespace WebKit
+
+G_DEFINE_TYPE(WebKitDOMTestTypedefs, webkit_dom_test_typedefs, WEBKIT_TYPE_DOM_OBJECT)
+
+enum {
+    PROP_0,
+    PROP_UNSIGNED_LONG_LONG_ATTR,
+    PROP_IMMUTABLE_SERIALIZED_SCRIPT_VALUE,
+    PROP_ATTR_WITH_GETTER_EXCEPTION,
+    PROP_ATTR_WITH_SETTER_EXCEPTION,
+    PROP_STRING_ATTR_WITH_GETTER_EXCEPTION,
+    PROP_STRING_ATTR_WITH_SETTER_EXCEPTION,
+};
+
+static void webkit_dom_test_typedefs_finalize(GObject* object)
+{
+    WebKitDOMTestTypedefsPrivate* priv = WEBKIT_DOM_TEST_TYPEDEFS_GET_PRIVATE(object);
+
+    WebKit::DOMObjectCache::forget(priv->coreObject.get());
+
+    priv->~WebKitDOMTestTypedefsPrivate();
+    G_OBJECT_CLASS(webkit_dom_test_typedefs_parent_class)->finalize(object);
+}
+
+static void webkit_dom_test_typedefs_set_property(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec)
+{
+    WebCore::JSMainThreadNullState state;
+
+    WebKitDOMTestTypedefs* self = WEBKIT_DOM_TEST_TYPEDEFS(object);
+    WebCore::TestTypedefs* coreSelf = WebKit::core(self);
+
+    switch (propertyId) {
+    case PROP_UNSIGNED_LONG_LONG_ATTR: {
+        coreSelf->setUnsignedLongLongAttr((g_value_get_uint64(value)));
+        break;
+    }
+    case PROP_ATTR_WITH_GETTER_EXCEPTION: {
+        coreSelf->setAttrWithGetterException((g_value_get_long(value)));
+        break;
+    }
+    case PROP_ATTR_WITH_SETTER_EXCEPTION: {
+        WebCore::ExceptionCode ec = 0;
+        coreSelf->setAttrWithSetterException((g_value_get_long(value)), ec);
+        break;
+    }
+    case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION: {
+        coreSelf->setStringAttrWithGetterException(WTF::String::fromUTF8(g_value_get_string(value)));
+        break;
+    }
+    case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION: {
+        WebCore::ExceptionCode ec = 0;
+        coreSelf->setStringAttrWithSetterException(WTF::String::fromUTF8(g_value_get_string(value)), ec);
+        break;
+    }
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+        break;
+    }
+}
+
+static void webkit_dom_test_typedefs_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
+{
+    WebCore::JSMainThreadNullState state;
+
+    WebKitDOMTestTypedefs* self = WEBKIT_DOM_TEST_TYPEDEFS(object);
+    WebCore::TestTypedefs* coreSelf = WebKit::core(self);
+
+    switch (propertyId) {
+    case PROP_UNSIGNED_LONG_LONG_ATTR: {
+        g_value_set_uint64(value, coreSelf->unsignedLongLongAttr());
+        break;
+    }
+    case PROP_IMMUTABLE_SERIALIZED_SCRIPT_VALUE: {
+        RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->immutableSerializedScriptValue();
+        g_value_set_object(value, WebKit::kit(ptr.get()));
+        break;
+    }
+    case PROP_ATTR_WITH_GETTER_EXCEPTION: {
+        WebCore::ExceptionCode ec = 0;
+        g_value_set_long(value, coreSelf->attrWithGetterException(ec));
+        break;
+    }
+    case PROP_ATTR_WITH_SETTER_EXCEPTION: {
+        g_value_set_long(value, coreSelf->attrWithSetterException());
+        break;
+    }
+    case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION: {
+        WebCore::ExceptionCode ec = 0;
+        g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithGetterException(ec)));
+        break;
+    }
+    case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION: {
+        g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithSetterException()));
+        break;
+    }
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+        break;
+    }
+}
+
+static GObject* webkit_dom_test_typedefs_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
+{
+    GObject* object = G_OBJECT_CLASS(webkit_dom_test_typedefs_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
+
+    WebKitDOMTestTypedefsPrivate* priv = WEBKIT_DOM_TEST_TYPEDEFS_GET_PRIVATE(object);
+    priv->coreObject = static_cast<WebCore::TestTypedefs*>(WEBKIT_DOM_OBJECT(object)->coreObject);
+    WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
+
+    return object;
+}
+
+static void webkit_dom_test_typedefs_class_init(WebKitDOMTestTypedefsClass* requestClass)
+{
+    GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass);
+    g_type_class_add_private(gobjectClass, sizeof(WebKitDOMTestTypedefsPrivate));
+    gobjectClass->constructor = webkit_dom_test_typedefs_constructor;
+    gobjectClass->finalize = webkit_dom_test_typedefs_finalize;
+    gobjectClass->set_property = webkit_dom_test_typedefs_set_property;
+    gobjectClass->get_property = webkit_dom_test_typedefs_get_property;
+
+    g_object_class_install_property(gobjectClass,
+                                    PROP_UNSIGNED_LONG_LONG_ATTR,
+                                    g_param_spec_uint64("unsigned-long-long-attr", /* name */
+                                                           "test_typedefs_unsigned-long-long-attr", /* short description */
+                                                           "read-write  guint64 TestTypedefs.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_IMMUTABLE_SERIALIZED_SCRIPT_VALUE,
+                                    g_param_spec_object("immutable-serialized-script-value", /* name */
+                                                           "test_typedefs_immutable-serialized-script-value", /* short description */
+                                                           "read-write  WebKitDOMSerializedScriptValue* TestTypedefs.immutable-serialized-script-value", /* longer - could do with some extra doc stuff here */
+                                                           WEBKIT_TYPE_DOM_SERIALIZED_SCRIPT_VALUE, /* gobject type */
+                                                           WEBKIT_PARAM_READWRITE));
+    g_object_class_install_property(gobjectClass,
+                                    PROP_ATTR_WITH_GETTER_EXCEPTION,
+                                    g_param_spec_long("attr-with-getter-exception", /* name */
+                                                           "test_typedefs_attr-with-getter-exception", /* short description */
+                                                           "read-write  glong TestTypedefs.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_ATTR_WITH_SETTER_EXCEPTION,
+                                    g_param_spec_long("attr-with-setter-exception", /* name */
+                                                           "test_typedefs_attr-with-setter-exception", /* short description */
+                                                           "read-write  glong TestTypedefs.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_STRING_ATTR_WITH_GETTER_EXCEPTION,
+                                    g_param_spec_string("string-attr-with-getter-exception", /* name */
+                                                           "test_typedefs_string-attr-with-getter-exception", /* short description */
+                                                           "read-write  gchar* TestTypedefs.string-attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
+                                                           "", /* default */
+                                                           WEBKIT_PARAM_READWRITE));
+    g_object_class_install_property(gobjectClass,
+                                    PROP_STRING_ATTR_WITH_SETTER_EXCEPTION,
+                                    g_param_spec_string("string-attr-with-setter-exception", /* name */
+                                                           "test_typedefs_string-attr-with-setter-exception", /* short description */
+                                                           "read-write  gchar* TestTypedefs.string-attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
+                                                           "", /* default */
+                                                           WEBKIT_PARAM_READWRITE));
+}
+
+static void webkit_dom_test_typedefs_init(WebKitDOMTestTypedefs* request)
+{
+    WebKitDOMTestTypedefsPrivate* priv = WEBKIT_DOM_TEST_TYPEDEFS_GET_PRIVATE(request);
+    new (priv) WebKitDOMTestTypedefsPrivate();
+}
+
+void
+webkit_dom_test_typedefs_func(WebKitDOMTestTypedefs* self, WebKitDOMlong[]* x)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(WEBKIT_DOM_IS_LONG[](x));
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::long[]* convertedX = WebKit::core(x);
+    item->func(convertedX);
+}
+
+void
+webkit_dom_test_typedefs_multi_transfer_list(WebKitDOMTestTypedefs* self, WebKitDOMSerializedScriptValue* first, WebKitDOMArray* tx, WebKitDOMSerializedScriptValue* second, WebKitDOMArray* txx)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(WEBKIT_DOM_IS_SERIALIZED_SCRIPT_VALUE(first));
+    g_return_if_fail(WEBKIT_DOM_IS_ARRAY(tx));
+    g_return_if_fail(WEBKIT_DOM_IS_SERIALIZED_SCRIPT_VALUE(second));
+    g_return_if_fail(WEBKIT_DOM_IS_ARRAY(txx));
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::SerializedScriptValue* convertedFirst = WebKit::core(first);
+    WebCore::Array* convertedTx = WebKit::core(tx);
+    WebCore::SerializedScriptValue* convertedSecond = WebKit::core(second);
+    WebCore::Array* convertedTxx = WebKit::core(txx);
+    item->multiTransferList(convertedFirst, convertedTx, convertedSecond, convertedTxx);
+}
+
+void
+webkit_dom_test_typedefs_set_shadow(WebKitDOMTestTypedefs* self, gfloat width, gfloat height, gfloat blur, const gchar* color, gfloat alpha)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(color);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WTF::String convertedColor = WTF::String::fromUTF8(color);
+    item->setShadow(width, height, blur, convertedColor, alpha);
+}
+
+void
+webkit_dom_test_typedefs_nullable_array_arg(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* arrayArg)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(WEBKIT_DOM_IS_DOM_STRING[](arrayArg));
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::DOMString[]* convertedArrayArg = WebKit::core(arrayArg);
+    item->nullableArrayArg(convertedArrayArg);
+}
+
+WebKitDOMSVGPoint*
+webkit_dom_test_typedefs_immutable_point_function(WebKitDOMTestTypedefs* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    RefPtr<WebCore::SVGPoint> gobjectResult = WTF::getPtr(item->immutablePointFunction());
+    return WebKit::kit(gobjectResult.get());
+}
+
+WebKitDOMDOMString[]*
+webkit_dom_test_typedefs_string_array_function(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* values, GError** error)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    g_return_val_if_fail(WEBKIT_DOM_IS_DOM_STRING[](values), 0);
+    g_return_val_if_fail(!error || !*error, 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::DOMString[]* convertedValues = WebKit::core(values);
+    WebCore::ExceptionCode ec = 0;
+    RefPtr<WebCore::DOMString[]> gobjectResult = WTF::getPtr(item->stringArrayFunction(convertedValues, ec));
+    if (ec) {
+        WebCore::ExceptionCodeDescription ecdesc(ec);
+        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+    }
+    return WebKit::kit(gobjectResult.get());
+}
+
+WebKitDOMDOMString[]*
+webkit_dom_test_typedefs_string_array_function2(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* values, GError** error)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    g_return_val_if_fail(WEBKIT_DOM_IS_DOM_STRING[](values), 0);
+    g_return_val_if_fail(!error || !*error, 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::DOMString[]* convertedValues = WebKit::core(values);
+    WebCore::ExceptionCode ec = 0;
+    RefPtr<WebCore::DOMString[]> gobjectResult = WTF::getPtr(item->stringArrayFunction2(convertedValues, ec));
+    if (ec) {
+        WebCore::ExceptionCodeDescription ecdesc(ec);
+        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+    }
+    return WebKit::kit(gobjectResult.get());
+}
+
+void
+webkit_dom_test_typedefs_method_with_exception(WebKitDOMTestTypedefs* self, GError** error)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(!error || !*error);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::ExceptionCode ec = 0;
+    item->methodWithException(ec);
+    if (ec) {
+        WebCore::ExceptionCodeDescription ecdesc(ec);
+        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+    }
+}
+
+guint64
+webkit_dom_test_typedefs_get_unsigned_long_long_attr(WebKitDOMTestTypedefs* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    guint64 result = item->unsignedLongLongAttr();
+    return result;
+}
+
+void
+webkit_dom_test_typedefs_set_unsigned_long_long_attr(WebKitDOMTestTypedefs* self, guint64 value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    item->setUnsignedLongLongAttr(value);
+}
+
+WebKitDOMSerializedScriptValue*
+webkit_dom_test_typedefs_get_immutable_serialized_script_value(WebKitDOMTestTypedefs* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    RefPtr<WebCore::SerializedScriptValue> gobjectResult = WTF::getPtr(item->immutableSerializedScriptValue());
+    return WebKit::kit(gobjectResult.get());
+}
+
+void
+webkit_dom_test_typedefs_set_immutable_serialized_script_value(WebKitDOMTestTypedefs* self, WebKitDOMSerializedScriptValue* value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(WEBKIT_DOM_IS_SERIALIZED_SCRIPT_VALUE(value));
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::SerializedScriptValue* convertedValue = WebKit::core(value);
+    item->setImmutableSerializedScriptValue(convertedValue);
+}
+
+glong
+webkit_dom_test_typedefs_get_attr_with_getter_exception(WebKitDOMTestTypedefs* self, GError** error)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    g_return_val_if_fail(!error || !*error, 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::ExceptionCode ec = 0;
+    glong result = item->attrWithGetterException(ec);
+    if (ec) {
+        WebCore::ExceptionCodeDescription ecdesc(ec);
+        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+    }
+    return result;
+}
+
+void
+webkit_dom_test_typedefs_set_attr_with_getter_exception(WebKitDOMTestTypedefs* self, glong value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    item->setAttrWithGetterException(value);
+}
+
+glong
+webkit_dom_test_typedefs_get_attr_with_setter_exception(WebKitDOMTestTypedefs* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    glong result = item->attrWithSetterException();
+    return result;
+}
+
+void
+webkit_dom_test_typedefs_set_attr_with_setter_exception(WebKitDOMTestTypedefs* self, glong value, GError** error)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(!error || !*error);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::ExceptionCode ec = 0;
+    item->setAttrWithSetterException(value, ec);
+    if (ec) {
+        WebCore::ExceptionCodeDescription ecdesc(ec);
+        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+    }
+}
+
+gchar*
+webkit_dom_test_typedefs_get_string_attr_with_getter_exception(WebKitDOMTestTypedefs* self, GError** error)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    g_return_val_if_fail(!error || !*error, 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WebCore::ExceptionCode ec = 0;
+    gchar* result = convertToUTF8String(item->stringAttrWithGetterException(ec));
+    return result;
+}
+
+void
+webkit_dom_test_typedefs_set_string_attr_with_getter_exception(WebKitDOMTestTypedefs* self, const gchar* value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(value);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WTF::String convertedValue = WTF::String::fromUTF8(value);
+    item->setStringAttrWithGetterException(convertedValue);
+}
+
+gchar*
+webkit_dom_test_typedefs_get_string_attr_with_setter_exception(WebKitDOMTestTypedefs* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self), 0);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    gchar* result = convertToUTF8String(item->stringAttrWithSetterException());
+    return result;
+}
+
+void
+webkit_dom_test_typedefs_set_string_attr_with_setter_exception(WebKitDOMTestTypedefs* self, const gchar* value, GError** error)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_TYPEDEFS(self));
+    g_return_if_fail(value);
+    g_return_if_fail(!error || !*error);
+    WebCore::TestTypedefs* item = WebKit::core(self);
+    WTF::String convertedValue = WTF::String::fromUTF8(value);
+    WebCore::ExceptionCode ec = 0;
+    item->setStringAttrWithSetterException(convertedValue, ec);
+    if (ec) {
+        WebCore::ExceptionCodeDescription ecdesc(ec);
+        g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
+    }
+}
+
diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h
new file mode 100644 (file)
index 0000000..01677ad
--- /dev/null
@@ -0,0 +1,276 @@
+/*
+    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 WebKitDOMTestTypedefs_h
+#define WebKitDOMTestTypedefs_h
+
+#include <glib-object.h>
+#include <webkitdom/WebKitDOMObject.h>
+#include <webkitdom/webkitdomdefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_DOM_TEST_TYPEDEFS            (webkit_dom_test_typedefs_get_type())
+#define WEBKIT_DOM_TEST_TYPEDEFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOM_TEST_TYPEDEFS, WebKitDOMTestTypedefs))
+#define WEBKIT_DOM_TEST_TYPEDEFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_DOM_TEST_TYPEDEFS, WebKitDOMTestTypedefsClass)
+#define WEBKIT_DOM_IS_TEST_TYPEDEFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOM_TEST_TYPEDEFS))
+#define WEBKIT_DOM_IS_TEST_TYPEDEFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_DOM_TEST_TYPEDEFS))
+#define WEBKIT_DOM_TEST_TYPEDEFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_DOM_TEST_TYPEDEFS, WebKitDOMTestTypedefsClass))
+
+struct _WebKitDOMTestTypedefs {
+    WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMTestTypedefsClass {
+    WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_test_typedefs_get_type (void);
+
+/**
+ * webkit_dom_test_typedefs_func:
+ * @self: A #WebKitDOMTestTypedefs
+ * @x: A #WebKitDOMlong[]
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_func(WebKitDOMTestTypedefs* self, WebKitDOMlong[]* x);
+
+/**
+ * webkit_dom_test_typedefs_multi_transfer_list:
+ * @self: A #WebKitDOMTestTypedefs
+ * @first: A #WebKitDOMSerializedScriptValue
+ * @tx: A #WebKitDOMArray
+ * @second: A #WebKitDOMSerializedScriptValue
+ * @txx: A #WebKitDOMArray
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_multi_transfer_list(WebKitDOMTestTypedefs* self, WebKitDOMSerializedScriptValue* first, WebKitDOMArray* tx, WebKitDOMSerializedScriptValue* second, WebKitDOMArray* txx);
+
+/**
+ * webkit_dom_test_typedefs_set_shadow:
+ * @self: A #WebKitDOMTestTypedefs
+ * @width: A #gfloat
+ * @height: A #gfloat
+ * @blur: A #gfloat
+ * @color: A #gchar
+ * @alpha: A #gfloat
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_set_shadow(WebKitDOMTestTypedefs* self, gfloat width, gfloat height, gfloat blur, const gchar* color, gfloat alpha);
+
+/**
+ * webkit_dom_test_typedefs_nullable_array_arg:
+ * @self: A #WebKitDOMTestTypedefs
+ * @arrayArg: A #WebKitDOMDOMString[]
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_nullable_array_arg(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* arrayArg);
+
+/**
+ * webkit_dom_test_typedefs_immutable_point_function:
+ * @self: A #WebKitDOMTestTypedefs
+ *
+ * Returns: (transfer none):
+ *
+**/
+WEBKIT_API WebKitDOMSVGPoint*
+webkit_dom_test_typedefs_immutable_point_function(WebKitDOMTestTypedefs* self);
+
+/**
+ * webkit_dom_test_typedefs_string_array_function:
+ * @self: A #WebKitDOMTestTypedefs
+ * @values: A #WebKitDOMDOMString[]
+ * @error: #GError
+ *
+ * Returns: (transfer none):
+ *
+**/
+WEBKIT_API WebKitDOMDOMString[]*
+webkit_dom_test_typedefs_string_array_function(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* values, GError** error);
+
+/**
+ * webkit_dom_test_typedefs_string_array_function2:
+ * @self: A #WebKitDOMTestTypedefs
+ * @values: A #WebKitDOMDOMString[]
+ * @error: #GError
+ *
+ * Returns: (transfer none):
+ *
+**/
+WEBKIT_API WebKitDOMDOMString[]*
+webkit_dom_test_typedefs_string_array_function2(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* values, GError** error);
+
+/**
+ * webkit_dom_test_typedefs_method_with_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ * @error: #GError
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_method_with_exception(WebKitDOMTestTypedefs* self, GError** error);
+
+/**
+ * webkit_dom_test_typedefs_get_unsigned_long_long_attr:
+ * @self: A #WebKitDOMTestTypedefs
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API guint64
+webkit_dom_test_typedefs_get_unsigned_long_long_attr(WebKitDOMTestTypedefs* self);
+
+/**
+ * webkit_dom_test_typedefs_set_unsigned_long_long_attr:
+ * @self: A #WebKitDOMTestTypedefs
+ * @value: A #guint64
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_set_unsigned_long_long_attr(WebKitDOMTestTypedefs* self, guint64 value);
+
+/**
+ * webkit_dom_test_typedefs_get_immutable_serialized_script_value:
+ * @self: A #WebKitDOMTestTypedefs
+ *
+ * Returns: (transfer none):
+ *
+**/
+WEBKIT_API WebKitDOMSerializedScriptValue*
+webkit_dom_test_typedefs_get_immutable_serialized_script_value(WebKitDOMTestTypedefs* self);
+
+/**
+ * webkit_dom_test_typedefs_set_immutable_serialized_script_value:
+ * @self: A #WebKitDOMTestTypedefs
+ * @value: A #WebKitDOMSerializedScriptValue
+ *
+ * Returns: (transfer none):
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_set_immutable_serialized_script_value(WebKitDOMTestTypedefs* self, WebKitDOMSerializedScriptValue* value);
+
+/**
+ * webkit_dom_test_typedefs_get_attr_with_getter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ * @error: #GError
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API glong
+webkit_dom_test_typedefs_get_attr_with_getter_exception(WebKitDOMTestTypedefs* self, GError** error);
+
+/**
+ * webkit_dom_test_typedefs_set_attr_with_getter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ * @value: A #glong
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_set_attr_with_getter_exception(WebKitDOMTestTypedefs* self, glong value);
+
+/**
+ * webkit_dom_test_typedefs_get_attr_with_setter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API glong
+webkit_dom_test_typedefs_get_attr_with_setter_exception(WebKitDOMTestTypedefs* self);
+
+/**
+ * webkit_dom_test_typedefs_set_attr_with_setter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ * @value: A #glong
+ * @error: #GError
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_set_attr_with_setter_exception(WebKitDOMTestTypedefs* self, glong value, GError** error);
+
+/**
+ * webkit_dom_test_typedefs_get_string_attr_with_getter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ * @error: #GError
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API gchar*
+webkit_dom_test_typedefs_get_string_attr_with_getter_exception(WebKitDOMTestTypedefs* self, GError** error);
+
+/**
+ * webkit_dom_test_typedefs_set_string_attr_with_getter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ * @value: A #gchar
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_set_string_attr_with_getter_exception(WebKitDOMTestTypedefs* self, const gchar* value);
+
+/**
+ * webkit_dom_test_typedefs_get_string_attr_with_setter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API gchar*
+webkit_dom_test_typedefs_get_string_attr_with_setter_exception(WebKitDOMTestTypedefs* self);
+
+/**
+ * webkit_dom_test_typedefs_set_string_attr_with_setter_exception:
+ * @self: A #WebKitDOMTestTypedefs
+ * @value: A #gchar
+ * @error: #GError
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_typedefs_set_string_attr_with_setter_exception(WebKitDOMTestTypedefs* self, const gchar* value, GError** error);
+
+G_END_DECLS
+
+#endif /* WebKitDOMTestTypedefs_h */
diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h
new file mode 100644 (file)
index 0000000..3b890be
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+    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 WebKitDOMTestTypedefsPrivate_h
+#define WebKitDOMTestTypedefsPrivate_h
+
+#include "TestTypedefs.h"
+#include <webkitdom/WebKitDOMTestTypedefs.h>
+
+namespace WebKit {
+WebKitDOMTestTypedefs* wrapTestTypedefs(WebCore::TestTypedefs*);
+WebCore::TestTypedefs* core(WebKitDOMTestTypedefs* request);
+WebKitDOMTestTypedefs* kit(WebCore::TestTypedefs* node);
+} // namespace WebKit
+
+#endif /* WebKitDOMTestTypedefsPrivate_h */
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
new file mode 100644 (file)
index 0000000..eb79041
--- /dev/null
@@ -0,0 +1,622 @@
+/*
+    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 "JSTestTypedefs.h"
+
+#include "DOMStringList.h"
+#include "ExceptionCode.h"
+#include "JSArray.h"
+#include "JSDOMBinding.h"
+#include "JSDOMStringList.h"
+#include "JSSVGPoint.h"
+#include "JSSerializedScriptValue.h"
+#include "JSTestCallback.h"
+#include "JSTestSubObj.h"
+#include "KURL.h"
+#include "SerializedScriptValue.h"
+#include "TestTypedefs.h"
+#include <runtime/Error.h>
+#include <runtime/JSArray.h>
+#include <runtime/JSString.h>
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+/* Hash table */
+
+static const HashTableValue JSTestTypedefsTableValues[] =
+{
+    { "unsignedLongLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsUnsignedLongLongAttr), (intptr_t)setJSTestTypedefsUnsignedLongLongAttr, NoIntrinsic },
+    { "immutableSerializedScriptValue", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsImmutableSerializedScriptValue), (intptr_t)setJSTestTypedefsImmutableSerializedScriptValue, NoIntrinsic },
+    { "attrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttrWithGetterException), (intptr_t)setJSTestTypedefsAttrWithGetterException, NoIntrinsic },
+    { "attrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttrWithSetterException), (intptr_t)setJSTestTypedefsAttrWithSetterException, NoIntrinsic },
+    { "stringAttrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsStringAttrWithGetterException), (intptr_t)setJSTestTypedefsStringAttrWithGetterException, NoIntrinsic },
+    { "stringAttrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsStringAttrWithSetterException), (intptr_t)setJSTestTypedefsStringAttrWithSetterException, NoIntrinsic },
+    { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructor), (intptr_t)0, NoIntrinsic },
+    { 0, 0, 0, 0, NoIntrinsic }
+};
+
+static const HashTable JSTestTypedefsTable = { 18, 15, JSTestTypedefsTableValues, 0 };
+/* Hash table for constructor */
+
+static const HashTableValue JSTestTypedefsConstructorTableValues[] =
+{
+    { "TestSubObj", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructorTestSubObj), (intptr_t)0, NoIntrinsic },
+    { 0, 0, 0, 0, NoIntrinsic }
+};
+
+static const HashTable JSTestTypedefsConstructorTable = { 1, 0, JSTestTypedefsConstructorTableValues, 0 };
+EncodedJSValue JSC_HOST_CALL JSTestTypedefsConstructor::constructJSTestTypedefs(ExecState* exec)
+{
+    JSTestTypedefsConstructor* castedThis = jsCast<JSTestTypedefsConstructor*>(exec->callee());
+    if (exec->argumentCount() < 2)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    const String& hello(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).isEmpty() ? String() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toString(exec)->value(exec));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    if (exec->argumentCount() <= 1 || !exec->argument(1).isFunction())
+        return throwVMTypeError(exec);
+    RefPtr<TestCallback> testCallback = JSTestCallback::create(asObject(exec->argument(1)), castedThis->globalObject());
+    RefPtr<TestTypedefs> object = TestTypedefs::create(hello, testCallback);
+    return JSValue::encode(asObject(toJS(exec, castedThis->globalObject(), object.get())));
+}
+
+const ClassInfo JSTestTypedefsConstructor::s_info = { "TestTypedefsConstructor", &Base::s_info, &JSTestTypedefsConstructorTable, 0, CREATE_METHOD_TABLE(JSTestTypedefsConstructor) };
+
+JSTestTypedefsConstructor::JSTestTypedefsConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
+    : DOMConstructorObject(structure, globalObject)
+{
+}
+
+void JSTestTypedefsConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
+{
+    Base::finishCreation(exec->globalData());
+    ASSERT(inherits(&s_info));
+    putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestTypedefsPrototype::self(exec, globalObject), DontDelete | ReadOnly);
+    putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
+}
+
+bool JSTestTypedefsConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
+{
+    return getStaticValueSlot<JSTestTypedefsConstructor, JSDOMWrapper>(exec, &JSTestTypedefsConstructorTable, jsCast<JSTestTypedefsConstructor*>(cell), propertyName, slot);
+}
+
+bool JSTestTypedefsConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
+{
+    return getStaticValueDescriptor<JSTestTypedefsConstructor, JSDOMWrapper>(exec, &JSTestTypedefsConstructorTable, jsCast<JSTestTypedefsConstructor*>(object), propertyName, descriptor);
+}
+
+ConstructType JSTestTypedefsConstructor::getConstructData(JSCell*, ConstructData& constructData)
+{
+    constructData.native.function = constructJSTestTypedefs;
+    return ConstructTypeHost;
+}
+
+/* Hash table for prototype */
+
+static const HashTableValue JSTestTypedefsPrototypeTableValues[] =
+{
+    { "func", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFunc), (intptr_t)1, NoIntrinsic },
+    { "multiTransferList", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionMultiTransferList), (intptr_t)4, NoIntrinsic },
+    { "setShadow", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionSetShadow), (intptr_t)5, NoIntrinsic },
+    { "methodWithSequenceArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionMethodWithSequenceArg), (intptr_t)1, NoIntrinsic },
+    { "nullableArrayArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableArrayArg), (intptr_t)1, NoIntrinsic },
+    { "funcWithClamp", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFuncWithClamp), (intptr_t)2, NoIntrinsic },
+    { "immutablePointFunction", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionImmutablePointFunction), (intptr_t)0, NoIntrinsic },
+    { "stringArrayFunction", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringArrayFunction), (intptr_t)1, NoIntrinsic },
+    { "stringArrayFunction2", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringArrayFunction2), (intptr_t)1, NoIntrinsic },
+    { "methodWithException", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionMethodWithException), (intptr_t)0, NoIntrinsic },
+    { 0, 0, 0, 0, NoIntrinsic }
+};
+
+static const HashTable JSTestTypedefsPrototypeTable = { 34, 31, JSTestTypedefsPrototypeTableValues, 0 };
+const ClassInfo JSTestTypedefsPrototype::s_info = { "TestTypedefsPrototype", &Base::s_info, &JSTestTypedefsPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestTypedefsPrototype) };
+
+JSObject* JSTestTypedefsPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
+{
+    return getDOMPrototype<JSTestTypedefs>(exec, globalObject);
+}
+
+bool JSTestTypedefsPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
+{
+    JSTestTypedefsPrototype* thisObject = jsCast<JSTestTypedefsPrototype*>(cell);
+    return getStaticFunctionSlot<JSObject>(exec, &JSTestTypedefsPrototypeTable, thisObject, propertyName, slot);
+}
+
+bool JSTestTypedefsPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
+{
+    JSTestTypedefsPrototype* thisObject = jsCast<JSTestTypedefsPrototype*>(object);
+    return getStaticFunctionDescriptor<JSObject>(exec, &JSTestTypedefsPrototypeTable, thisObject, propertyName, descriptor);
+}
+
+const ClassInfo JSTestTypedefs::s_info = { "TestTypedefs", &Base::s_info, &JSTestTypedefsTable, 0 , CREATE_METHOD_TABLE(JSTestTypedefs) };
+
+JSTestTypedefs::JSTestTypedefs(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestTypedefs> impl)
+    : JSDOMWrapper(structure, globalObject)
+    , m_impl(impl.leakRef())
+{
+}
+
+void JSTestTypedefs::finishCreation(JSGlobalData& globalData)
+{
+    Base::finishCreation(globalData);
+    ASSERT(inherits(&s_info));
+}
+
+JSObject* JSTestTypedefs::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
+{
+    return JSTestTypedefsPrototype::create(exec->globalData(), globalObject, JSTestTypedefsPrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype()));
+}
+
+void JSTestTypedefs::destroy(JSC::JSCell* cell)
+{
+    JSTestTypedefs* thisObject = static_cast<JSTestTypedefs*>(cell);
+    thisObject->JSTestTypedefs::~JSTestTypedefs();
+}
+
+JSTestTypedefs::~JSTestTypedefs()
+{
+    releaseImplIfNotNull();
+}
+
+bool JSTestTypedefs::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
+{
+    JSTestTypedefs* thisObject = jsCast<JSTestTypedefs*>(cell);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
+    return getStaticValueSlot<JSTestTypedefs, Base>(exec, &JSTestTypedefsTable, thisObject, propertyName, slot);
+}
+
+bool JSTestTypedefs::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
+{
+    JSTestTypedefs* thisObject = jsCast<JSTestTypedefs*>(object);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
+    return getStaticValueDescriptor<JSTestTypedefs, Base>(exec, &JSTestTypedefsTable, thisObject, propertyName, descriptor);
+}
+
+JSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    JSValue result = jsNumber(impl->unsignedLongLongAttr());
+    return result;
+}
+
+
+JSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    JSValue result = impl->immutableSerializedScriptValue() ? impl->immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
+    return result;
+}
+
+
+JSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    return JSTestSubObj::getConstructor(exec, castedThis->globalObject());
+}
+
+
+JSValue jsTestTypedefsAttrWithGetterException(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    ExceptionCode ec = 0;
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec));
+    setDOMException(exec, ec);
+    return result;
+}
+
+
+JSValue jsTestTypedefsAttrWithSetterException(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    JSValue result = jsNumber(impl->attrWithSetterException());
+    return result;
+}
+
+
+JSValue jsTestTypedefsStringAttrWithGetterException(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    ExceptionCode ec = 0;
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    JSC::JSValue result = jsStringWithCache(exec, impl->stringAttrWithGetterException(ec));
+    setDOMException(exec, ec);
+    return result;
+}
+
+
+JSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    JSValue result = jsStringWithCache(exec, impl->stringAttrWithSetterException());
+    return result;
+}
+
+
+JSValue jsTestTypedefsConstructor(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestTypedefs* domObject = jsCast<JSTestTypedefs*>(asObject(slotBase));
+    return JSTestTypedefs::getConstructor(exec, domObject->globalObject());
+}
+
+void JSTestTypedefs::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
+{
+    JSTestTypedefs* thisObject = jsCast<JSTestTypedefs*>(cell);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
+    lookupPut<JSTestTypedefs, Base>(exec, propertyName, value, &JSTestTypedefsTable, thisObject, slot);
+}
+
+void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    UNUSED_PARAM(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    impl->setUnsignedLongLongAttr(static_cast<unsigned long long>(value.toInteger(exec)));
+}
+
+
+void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    UNUSED_PARAM(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    impl->setImmutableSerializedScriptValue(SerializedScriptValue::create(exec, value, 0, 0));
+}
+
+
+void setJSTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    UNUSED_PARAM(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    impl->setAttrWithGetterException(value.toInt32(exec));
+}
+
+
+void setJSTestTypedefsAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    UNUSED_PARAM(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    ExceptionCode ec = 0;
+    impl->setAttrWithSetterException(value.toInt32(exec), ec);
+    setDOMException(exec, ec);
+}
+
+
+void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    UNUSED_PARAM(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    impl->setStringAttrWithGetterException(value.isEmpty() ? String() : value.toString(exec)->value(exec));
+}
+
+
+void setJSTestTypedefsStringAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    UNUSED_PARAM(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    ExceptionCode ec = 0;
+    impl->setStringAttrWithSetterException(value.isEmpty() ? String() : value.toString(exec)->value(exec), ec);
+    setDOMException(exec, ec);
+}
+
+
+JSValue JSTestTypedefs::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
+{
+    return getDOMConstructor<JSTestTypedefsConstructor>(exec, jsCast<JSDOMGlobalObject*>(globalObject));
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+
+    size_t argsCount = exec->argumentCount();
+    if (argsCount <= 0) {
+        impl->func();
+        return JSValue::encode(jsUndefined());
+    }
+
+    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSlong[]::s_info))
+        return throwVMTypeError(exec);
+    Vector<int> x(toNativeArray<int>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    impl->func(x);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMultiTransferList(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    if (exec->argumentCount() < 1)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    RefPtr<SerializedScriptValue> first(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined), 0, 0));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+
+    size_t argsCount = exec->argumentCount();
+    if (argsCount <= 1) {
+        impl->multiTransferList(first);
+        return JSValue::encode(jsUndefined());
+    }
+
+    Array* tx(toArray(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined)));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    if (argsCount <= 2) {
+        impl->multiTransferList(first, tx);
+        return JSValue::encode(jsUndefined());
+    }
+
+    RefPtr<SerializedScriptValue> second(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 2, DefaultIsUndefined), 0, 0));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    if (argsCount <= 3) {
+        impl->multiTransferList(first, tx, second);
+        return JSValue::encode(jsUndefined());
+    }
+
+    Array* txx(toArray(MAYBE_MISSING_PARAMETER(exec, 3, DefaultIsUndefined)));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    impl->multiTransferList(first, tx, second, txx);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    if (exec->argumentCount() < 3)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    float width(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toFloat(exec));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    float height(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toFloat(exec));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    float blur(MAYBE_MISSING_PARAMETER(exec, 2, DefaultIsUndefined).toFloat(exec));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+
+    size_t argsCount = exec->argumentCount();
+    if (argsCount <= 3) {
+        impl->setShadow(width, height, blur);
+        return JSValue::encode(jsUndefined());
+    }
+
+    const String& color(MAYBE_MISSING_PARAMETER(exec, 3, DefaultIsUndefined).isEmpty() ? String() : MAYBE_MISSING_PARAMETER(exec, 3, DefaultIsUndefined).toString(exec)->value(exec));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    if (argsCount <= 4) {
+        impl->setShadow(width, height, blur, color);
+        return JSValue::encode(jsUndefined());
+    }
+
+    float alpha(MAYBE_MISSING_PARAMETER(exec, 4, DefaultIsUndefined).toFloat(exec));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    impl->setShadow(width, height, blur, color, alpha);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    if (exec->argumentCount() < 1)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    Vector<RefPtr<SerializedScriptValue>> sequenceArg((toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined), &toSerializedScriptValue)));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+
+    JSC::JSValue result = jsNumber(impl->methodWithSequenceArg(sequenceArg));
+    return JSValue::encode(result);
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    if (exec->argumentCount() < 1)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    Vector<String> arrayArg(toNativeArray<String>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    impl->nullableArrayArg(arrayArg);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    if (exec->argumentCount() < 1)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    unsigned long long arg1 = 0;
+    double arg1NativeValue = exec->argument(0).toNumber(exec);
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+
+    if (!isnan(arg1NativeValue))
+        arg1 = clampTo<unsigned long long>(arg1NativeValue);
+
+
+    size_t argsCount = exec->argumentCount();
+    if (argsCount <= 1) {
+        impl->funcWithClamp(arg1);
+        return JSValue::encode(jsUndefined());
+    }
+
+    unsigned long long arg2 = 0;
+    double arg2NativeValue = exec->argument(1).toNumber(exec);
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+
+    if (!isnan(arg2NativeValue))
+        arg2 = clampTo<unsigned long long>(arg2NativeValue);
+
+    impl->funcWithClamp(arg1, arg2);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+
+    JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->immutablePointFunction())));
+    return JSValue::encode(result);
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    if (exec->argumentCount() < 1)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    ExceptionCode ec = 0;
+    Vector<String> values(toNativeArray<String>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+
+    JSC::JSValue result = jsArray(exec, castedThis->globalObject(), impl->stringArrayFunction(values, ec));
+    setDOMException(exec, ec);
+    return JSValue::encode(result);
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    if (exec->argumentCount() < 1)
+        return throwVMError(exec, createNotEnoughArgumentsError(exec));
+    ExceptionCode ec = 0;
+    Vector<String> values(toNativeArray<String>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+
+    JSC::JSValue result = jsArray(exec, castedThis->globalObject(), impl->stringArrayFunction2(values, ec));
+    setDOMException(exec, ec);
+    return JSValue::encode(result);
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(ExecState* exec)
+{
+    JSValue thisValue = exec->hostThisValue();
+    if (!thisValue.inherits(&JSTestTypedefs::s_info))
+        return throwVMTypeError(exec);
+    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
+    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    ExceptionCode ec = 0;
+    impl->methodWithException(ec);
+    setDOMException(exec, ec);
+    return JSValue::encode(jsUndefined());
+}
+
+static inline bool isObservable(JSTestTypedefs* jsTestTypedefs)
+{
+    if (jsTestTypedefs->hasCustomProperties())
+        return true;
+    return false;
+}
+
+bool JSTestTypedefsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+    JSTestTypedefs* jsTestTypedefs = jsCast<JSTestTypedefs*>(handle.get().asCell());
+    if (!isObservable(jsTestTypedefs))
+        return false;
+    UNUSED_PARAM(visitor);
+    return false;
+}
+
+void JSTestTypedefsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+    JSTestTypedefs* jsTestTypedefs = jsCast<JSTestTypedefs*>(handle.get().asCell());
+    DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
+    uncacheWrapper(world, jsTestTypedefs->impl(), jsTestTypedefs);
+    jsTestTypedefs->releaseImpl();
+}
+
+JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestTypedefs* impl)
+{
+    return wrap<JSTestTypedefs>(exec, globalObject, impl);
+}
+
+TestTypedefs* toTestTypedefs(JSC::JSValue value)
+{
+    return value.inherits(&JSTestTypedefs::s_info) ? jsCast<JSTestTypedefs*>(asObject(value))->impl() : 0;
+}
+
+}
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
new file mode 100644 (file)
index 0000000..41f0807
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+    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 JSTestTypedefs_h
+#define JSTestTypedefs_h
+
+#include "JSDOMBinding.h"
+#include "TestTypedefs.h"
+#include <runtime/JSGlobalObject.h>
+#include <runtime/JSObject.h>
+#include <runtime/ObjectPrototype.h>
+
+namespace WebCore {
+
+class JSTestTypedefs : public JSDOMWrapper {
+public:
+    typedef JSDOMWrapper Base;
+    static JSTestTypedefs* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestTypedefs> impl)
+    {
+        JSTestTypedefs* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefs>(globalObject->globalData().heap)) JSTestTypedefs(structure, globalObject, impl);
+        ptr->finishCreation(globalObject->globalData());
+        return ptr;
+    }
+
+    static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
+    static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
+    static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&);
+    static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
+    static void destroy(JSC::JSCell*);
+    ~JSTestTypedefs();
+    static const JSC::ClassInfo s_info;
+
+    static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
+    }
+
+    static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
+    TestTypedefs* impl() const { return m_impl; }
+    void releaseImpl() { m_impl->deref(); m_impl = 0; }
+
+    void releaseImplIfNotNull() { if (m_impl) { m_impl->deref(); m_impl = 0; } }
+
+private:
+    TestTypedefs* m_impl;
+protected:
+    JSTestTypedefs(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestTypedefs>);
+    void finishCreation(JSC::JSGlobalData&);
+    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Base::StructureFlags;
+};
+
+class JSTestTypedefsOwner : public JSC::WeakHandleOwner {
+public:
+    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
+    virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestTypedefs*)
+{
+    DEFINE_STATIC_LOCAL(JSTestTypedefsOwner, jsTestTypedefsOwner, ());
+    return &jsTestTypedefsOwner;
+}
+
+inline void* wrapperContext(DOMWrapperWorld* world, TestTypedefs*)
+{
+    return world;
+}
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
+TestTypedefs* toTestTypedefs(JSC::JSValue);
+
+class JSTestTypedefsPrototype : public JSC::JSNonFinalObject {
+public:
+    typedef JSC::JSNonFinalObject Base;
+    static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
+    static JSTestTypedefsPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+    {
+        JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(globalData.heap)) JSTestTypedefsPrototype(globalData, globalObject, structure);
+        ptr->finishCreation(globalData);
+        return ptr;
+    }
+
+    static const JSC::ClassInfo s_info;
+    static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
+    static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&);
+    static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
+    }
+
+private:
+    JSTestTypedefsPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
+protected:
+    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+};
+
+class JSTestTypedefsConstructor : public DOMConstructorObject {
+private:
+    JSTestTypedefsConstructor(JSC::Structure*, JSDOMGlobalObject*);
+    void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
+
+public:
+    typedef DOMConstructorObject Base;
+    static JSTestTypedefsConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+    {
+        JSTestTypedefsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsConstructor>(*exec->heap())) JSTestTypedefsConstructor(structure, globalObject);
+        ptr->finishCreation(exec, globalObject);
+        return ptr;
+    }
+
+    static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
+    static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&);
+    static const JSC::ClassInfo s_info;
+    static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
+    }
+protected:
+    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
+    static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestTypedefs(JSC::ExecState*);
+    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+};
+
+// Functions
+
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMultiTransferList(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(JSC::ExecState*);
+// Attributes
+
+JSC::JSValue jsTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+void setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+void setJSTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestTypedefsConstructorTestSubObj(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+JSC::JSValue jsTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+void setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+void setJSTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+void setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+void setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestTypedefsConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.h b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.h
new file mode 100644 (file)
index 0000000..4ffd7f3
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * 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 DOMArray;
+@class DOMSVGPoint;
+@class NSString;
+
+@interface DOMTestTypedefs : DOMObject
+@property unsigned long long unsignedLongLongAttr;
+@property(retain) NSString *immutableSerializedScriptValue;
+@property int attrWithGetterException;
+@property int attrWithSetterException;
+@property(copy) NSString *stringAttrWithGetterException;
+@property(copy) NSString *stringAttrWithSetterException;
+
+- (void)multiTransferList:(NSString *)first tx:(DOMArray *)tx second:(NSString *)second txx:(DOMArray *)txx;
+- (void)setShadow:(float)width height:(float)height blur:(float)blur color:(NSString *)color alpha:(float)alpha;
+- (DOMSVGPoint *)immutablePointFunction;
+- (void)methodWithException;
+@end
+
+#endif
diff --git a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm
new file mode 100644 (file)
index 0000000..eb02a02
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * 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 "DOMTestTypedefs.h"
+
+#import "Array.h"
+#import "DOMArrayInternal.h"
+#import "DOMBlobInternal.h"
+#import "DOMCSSRuleInternal.h"
+#import "DOMCSSValueInternal.h"
+#import "DOMEventInternal.h"
+#import "DOMNodeInternal.h"
+#import "DOMSVGPointInternal.h"
+#import "DOMStyleSheetInternal.h"
+#import "DOMTestTypedefsInternal.h"
+#import "ExceptionHandlers.h"
+#import "JSMainThreadExecState.h"
+#import "KURL.h"
+#import "SerializedScriptValue.h"
+#import "TestTypedefs.h"
+#import "ThreadCheck.h"
+#import "WebCoreObjCExtras.h"
+#import "WebScriptObjectPrivate.h"
+#import <wtf/GetPtr.h>
+
+#define IMPL reinterpret_cast<WebCore::TestTypedefs*>(_internal)
+
+@implementation DOMTestTypedefs
+
+- (void)dealloc
+{
+    if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestTypedefs class], self))
+        return;
+
+    if (_internal)
+        IMPL->deref();
+    [super dealloc];
+}
+
+- (void)finalize
+{
+    if (_internal)
+        IMPL->deref();
+    [super finalize];
+}
+
+- (unsigned long long)unsignedLongLongAttr
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->unsignedLongLongAttr();
+}
+
+- (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->setUnsignedLongLongAttr(newUnsignedLongLongAttr);
+}
+
+- (NSString *)immutableSerializedScriptValue
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->immutableSerializedScriptValue()->toString();
+}
+
+- (void)setImmutableSerializedScriptValue:(NSString *)newImmutableSerializedScriptValue
+{
+    WebCore::JSMainThreadNullState state;
+    ASSERT(newImmutableSerializedScriptValue);
+
+    IMPL->setImmutableSerializedScriptValue(WebCore::SerializedScriptValue::create(WTF::String(newImmutableSerializedScriptValue)));
+}
+
+- (int)attrWithGetterException
+{
+    WebCore::JSMainThreadNullState state;
+    WebCore::ExceptionCode ec = 0;
+    int result = IMPL->attrWithGetterException(ec);
+    WebCore::raiseOnDOMError(ec);
+    return result;
+}
+
+- (void)setAttrWithGetterException:(int)newAttrWithGetterException
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->setAttrWithGetterException(newAttrWithGetterException);
+}
+
+- (int)attrWithSetterException
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->attrWithSetterException();
+}
+
+- (void)setAttrWithSetterException:(int)newAttrWithSetterException
+{
+    WebCore::JSMainThreadNullState state;
+    WebCore::ExceptionCode ec = 0;
+    IMPL->setAttrWithSetterException(newAttrWithSetterException, ec);
+    WebCore::raiseOnDOMError(ec);
+}
+
+- (NSString *)stringAttrWithGetterException
+{
+    WebCore::JSMainThreadNullState state;
+    WebCore::ExceptionCode ec = 0;
+    NSString *result = IMPL->stringAttrWithGetterException(ec);
+    WebCore::raiseOnDOMError(ec);
+    return result;
+}
+
+- (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->setStringAttrWithGetterException(newStringAttrWithGetterException);
+}
+
+- (NSString *)stringAttrWithSetterException
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->stringAttrWithSetterException();
+}
+
+- (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException
+{
+    WebCore::JSMainThreadNullState state;
+    WebCore::ExceptionCode ec = 0;
+    IMPL->setStringAttrWithSetterException(newStringAttrWithSetterException, ec);
+    WebCore::raiseOnDOMError(ec);
+}
+
+- (void)multiTransferList:(NSString *)first tx:(DOMArray *)tx second:(NSString *)second txx:(DOMArray *)txx
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->multiTransferList(WebCore::SerializedScriptValue::create(WTF::String(first)), core(tx), WebCore::SerializedScriptValue::create(WTF::String(second)), core(txx));
+}
+
+- (void)setShadow:(float)width height:(float)height blur:(float)blur color:(NSString *)color alpha:(float)alpha
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->setShadow(width, height, blur, color, alpha);
+}
+
+- (DOMSVGPoint *)immutablePointFunction
+{
+    WebCore::JSMainThreadNullState state;
+    return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::FloatPoint>::create(IMPL->immutablePointFunction())));
+}
+
+- (void)methodWithException
+{
+    WebCore::JSMainThreadNullState state;
+    WebCore::ExceptionCode ec = 0;
+    IMPL->methodWithException(ec);
+    WebCore::raiseOnDOMError(ec);
+}
+
+@end
+
+WebCore::TestTypedefs* core(DOMTestTypedefs *wrapper)
+{
+    return wrapper ? reinterpret_cast<WebCore::TestTypedefs*>(wrapper->_internal) : 0;
+}
+
+DOMTestTypedefs *kit(WebCore::TestTypedefs* value)
+{
+    { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
+    if (!value)
+        return nil;
+    if (DOMTestTypedefs *wrapper = getDOMWrapper(value))
+        return [[wrapper retain] autorelease];
+    DOMTestTypedefs *wrapper = [[DOMTestTypedefs alloc] _init];
+    wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(value);
+    value->ref();
+    addDOMWrapper(wrapper, value);
+    return [wrapper autorelease];
+}
diff --git a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h
new file mode 100644 (file)
index 0000000..eda8bc3
--- /dev/null
@@ -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/DOMTestTypedefs.h>
+
+#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+
+namespace WebCore {
+    class TestTypedefs;
+}
+
+WebCore::TestTypedefs* core(DOMTestTypedefs *);
+DOMTestTypedefs *kit(WebCore::TestTypedefs*);
+
+#endif
diff --git a/Source/WebCore/bindings/scripts/test/TestTypedefs.idl b/Source/WebCore/bindings/scripts/test/TestTypedefs.idl
new file mode 100644 (file)
index 0000000..7851089
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 THE COPYRIGHT
+ * OWNER 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.
+ */
+
+// This IDL file is for testing the bindings code generator and for tracking
+// changes in its ouput.
+
+[
+    Constructor(in STRING hello, in TEST_CALLBACK testCallback),
+] interface TestTypedefs {
+    attribute ULONGLONG unsignedLongLongAttr;
+
+    [Immutable] attribute SCRIPT_VALUE immutableSerializedScriptValue;
+    
+    static readonly attribute T TestSubObj;
+
+    [StrictTypeChecking] void func(in [Optional] ARRAY_OF_LONGS x);
+
+    void multiTransferList(in [TransferList=tx] SCRIPT_VALUE first, in [Optional] ARRAY tx, in [Optional] TRANSFER_TXX_SCRIPT_VALUE second, in [Optional] ARRAY txx);
+
+    void setShadow(in DOUBLE width, in DOUBLE height, in float blur, in [StrictTypeChecking] OPTIONAL_STRING color, in [Optional] DOUBLE alpha);
+
+    ULONGLONG methodWithSequenceArg(in sequence<SCRIPT_VALUE> sequenceArg);
+
+    void nullableArrayArg(in ARRAY_OF_STRINGS? arrayArg);
+
+    void funcWithClamp(in ULONGLONG_CLAMP arg1, in [Optional] ULONGLONG_CLAMP arg2);
+
+    [Immutable] SVGPOINT immutablePointFunction();
+
+    ARRAY_OF_STRINGS stringArrayFunction(in ARRAY_OF_STRINGS values) raises(E);
+    STRING[] stringArrayFunction2(in STRING[] values) raises(E);
+
+    // Exceptions
+    void methodWithException() raises(E);
+    attribute long attrWithGetterException getter raises(E);
+    attribute long attrWithSetterException setter raises(E);
+    attribute DOMString stringAttrWithGetterException getter raises(E);
+    attribute DOMString stringAttrWithSetterException setter raises(E);
+};
+
+typedef float                      DOUBLE;
+typedef unsigned long long         ULONGLONG;
+typedef [Clamp] unsigned long long ULONGLONG_CLAMP;
+typedef SerializedScriptValue      SCRIPT_VALUE;
+typedef long[]                     ARRAY_OF_LONGS;
+typedef SVGPoint                   SVGPOINT;
+typedef DOMString                  STRING;
+typedef [Optional] DOMString       OPTIONAL_STRING;
+typedef DOMString[]                ARRAY_OF_STRINGS;
+typedef [Callback] TestCallback    TEST_CALLBACK;
+typedef TestSubObjConstructor      T;
+typedef Array                      ARRAY;
+typedef DOMException               E;
+typedef [TransferList=txx] SerializedScriptValue TRANSFER_TXX_SCRIPT_VALUE;
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp
new file mode 100644 (file)
index 0000000..f1b0524
--- /dev/null
@@ -0,0 +1,507 @@
+/*
+    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 "V8TestTypedefs.h"
+
+#include "BindingState.h"
+#include "ContextFeatures.h"
+#include "DOMStringList.h"
+#include "ExceptionCode.h"
+#include "Frame.h"
+#include "MessagePort.h"
+#include "RuntimeEnabledFeatures.h"
+#include "SVGPropertyTearOff.h"
+#include "SerializedScriptValue.h"
+#include "V8Binding.h"
+#include "V8DOMStringList.h"
+#include "V8DOMWrapper.h"
+#include "V8SVGPoint.h"
+#include "V8SerializedScriptValue.h"
+#include "V8TestCallback.h"
+#include "V8TestSubObj.h"
+#include <wtf/ArrayBuffer.h>
+#include <wtf/UnusedParam.h>
+
+#if ENABLE(BINDING_INTEGRITY)
+#if defined(OS_WIN)
+#pragma warning(disable: 4483)
+extern "C" { extern void (*const __identifier("??_7TestTypedefs@WebCore@@6B@")[])(); }
+#else
+extern "C" { extern void* _ZTVN7WebCore12TestTypedefsE[]; }
+#endif
+#endif // ENABLE(BINDING_INTEGRITY)
+
+namespace WebCore {
+
+#if ENABLE(BINDING_INTEGRITY)
+inline void checkTypeOrDieTrying(TestTypedefs* object)
+{
+    void* actualVTablePointer = *(reinterpret_cast<void**>(object));
+#if defined(OS_WIN)
+    void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestTypedefs@WebCore@@6B@"));
+#else
+    void* expectedVTablePointer = &_ZTVN7WebCore12TestTypedefsE[2];
+#endif
+    if (actualVTablePointer != expectedVTablePointer)
+        CRASH();
+}
+#endif // ENABLE(BINDING_INTEGRITY)
+
+WrapperTypeInfo V8TestTypedefs::info = { V8TestTypedefs::GetTemplate, V8TestTypedefs::derefObject, 0, 0, 0, V8TestTypedefs::installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype };
+
+namespace TestTypedefsV8Internal {
+
+template <typename T> void V8_USE(T) { }
+
+static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::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)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    unsigned long long v = toInt64(value);
+    imp->setUnsignedLongLongAttr(v);
+    return;
+}
+
+static v8::Handle<v8::Value> immutableSerializedScriptValueAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    return imp->immutableSerializedScriptValue() ? imp->immutableSerializedScriptValue()->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
+}
+
+static void immutableSerializedScriptValueAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    RefPtr<SerializedScriptValue> v = SerializedScriptValue::create(value, info.GetIsolate());
+    imp->setImmutableSerializedScriptValue(WTF::getPtr(v));
+    return;
+}
+
+static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    ExceptionCode ec = 0;
+    int v = imp->attrWithGetterException(ec);
+    if (UNLIKELY(ec))
+        return setDOMException(ec, info.GetIsolate());
+    return v8Integer(v, info.GetIsolate());
+}
+
+static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    int v = toInt32(value);
+    imp->setAttrWithGetterException(v);
+    return;
+}
+
+static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    return v8Integer(imp->attrWithSetterException(), info.GetIsolate());
+}
+
+static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    int v = toInt32(value);
+    ExceptionCode ec = 0;
+    imp->setAttrWithSetterException(v, ec);
+    if (UNLIKELY(ec))
+        setDOMException(ec, info.GetIsolate());
+    return;
+}
+
+static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    ExceptionCode ec = 0;
+    String v = imp->stringAttrWithGetterException(ec);
+    if (UNLIKELY(ec))
+        return setDOMException(ec, info.GetIsolate());
+    return v8String(v, info.GetIsolate(), ReturnUnsafeHandle);
+}
+
+static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
+    imp->setStringAttrWithGetterException(v);
+    return;
+}
+
+static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    return v8String(imp->stringAttrWithSetterException(), info.GetIsolate(), ReturnUnsafeHandle);
+}
+
+static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
+    V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
+    ExceptionCode ec = 0;
+    imp->setStringAttrWithSetterException(v, ec);
+    if (UNLIKELY(ec))
+        setDOMException(ec, info.GetIsolate());
+    return;
+}
+
+static v8::Handle<v8::Value> TestTypedefsConstructorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    v8::Handle<v8::Value> data = info.Data();
+    ASSERT(data->IsExternal());
+    V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
+    if (!perContextData)
+        return v8Undefined();
+    return perContextData->constructorForType(WrapperTypeInfo::unwrap(data));
+}
+static void TestTypedefsReplaceableAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    info.This()->ForceSet(name, value);
+}
+
+static v8::Handle<v8::Value> funcCallback(const v8::Arguments& args)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    if (args.Length() <= 0) {
+        imp->func();
+        return v8Undefined();
+    }
+    if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8long[]::HasInstance(args[0], args.GetIsolate()))
+        return throwTypeError(0, args.GetIsolate());
+    V8TRYCATCH(Vector<int>, x, toNativeArray<int>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
+    imp->func(x);
+    return v8Undefined();
+}
+
+static v8::Handle<v8::Value> multiTransferListCallback(const v8::Arguments& args)
+{
+    if (args.Length() < 1)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    MessagePortArray messagePortArrayTx;
+    ArrayBufferArray arrayBufferArrayTx;
+    if (args.Length() > 1) {
+        if (!extractTransferables(args[1], messagePortArrayTx, arrayBufferArrayTx, args.GetIsolate()))
+            return throwTypeError("Could not extract transferables", args.GetIsolate());
+    }
+    bool firstDidThrow = false;
+    RefPtr<SerializedScriptValue> first = SerializedScriptValue::create(args[0], &messagePortArrayTx, &arrayBufferArrayTx, firstDidThrow, args.GetIsolate());
+    if (firstDidThrow)
+        return v8Undefined();
+    if (args.Length() <= 1) {
+        imp->multiTransferList(first);
+        return v8Undefined();
+    }
+    if (args.Length() <= 2) {
+        imp->multiTransferList(first, messagePortArrayTx);
+        return v8Undefined();
+    }
+    MessagePortArray messagePortArrayTxx;
+    ArrayBufferArray arrayBufferArrayTxx;
+    if (args.Length() > 3) {
+        if (!extractTransferables(args[3], messagePortArrayTxx, arrayBufferArrayTxx, args.GetIsolate()))
+            return throwTypeError("Could not extract transferables", args.GetIsolate());
+    }
+    bool secondDidThrow = false;
+    RefPtr<SerializedScriptValue> second = SerializedScriptValue::create(args[2], &messagePortArrayTxx, &arrayBufferArrayTxx, secondDidThrow, args.GetIsolate());
+    if (secondDidThrow)
+        return v8Undefined();
+    if (args.Length() <= 3) {
+        imp->multiTransferList(first, messagePortArrayTx, second);
+        return v8Undefined();
+    }
+    imp->multiTransferList(first, messagePortArrayTx, second, messagePortArrayTxx);
+    return v8Undefined();
+}
+
+static v8::Handle<v8::Value> setShadowCallback(const v8::Arguments& args)
+{
+    if (args.Length() < 3)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    V8TRYCATCH(float, width, static_cast<float>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)->NumberValue()));
+    V8TRYCATCH(float, height, static_cast<float>(MAYBE_MISSING_PARAMETER(args, 1, DefaultIsUndefined)->NumberValue()));
+    V8TRYCATCH(float, blur, static_cast<float>(MAYBE_MISSING_PARAMETER(args, 2, DefaultIsUndefined)->NumberValue()));
+    if (args.Length() <= 3) {
+        imp->setShadow(width, height, blur);
+        return v8Undefined();
+    }
+    V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, color, MAYBE_MISSING_PARAMETER(args, 3, DefaultIsUndefined));
+    if (args.Length() <= 4) {
+        imp->setShadow(width, height, blur, color);
+        return v8Undefined();
+    }
+    V8TRYCATCH(float, alpha, static_cast<float>(MAYBE_MISSING_PARAMETER(args, 4, DefaultIsUndefined)->NumberValue()));
+    imp->setShadow(width, height, blur, color, alpha);
+    return v8Undefined();
+}
+
+static v8::Handle<v8::Value> methodWithSequenceArgCallback(const v8::Arguments& args)
+{
+    if (args.Length() < 1)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    V8TRYCATCH(Vector<RefPtr<SerializedScriptValue> >, sequenceArg, (toRefPtrNativeArray<SerializedScriptValue, V8SerializedScriptValue>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined), args.GetIsolate())));
+    return v8::Number::New(static_cast<double>(imp->methodWithSequenceArg(sequenceArg)));
+}
+
+static v8::Handle<v8::Value> nullableArrayArgCallback(const v8::Arguments& args)
+{
+    if (args.Length() < 1)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
+    imp->nullableArrayArg(arrayArg);
+    return v8Undefined();
+}
+
+static v8::Handle<v8::Value> funcWithClampCallback(const v8::Arguments& args)
+{
+    if (args.Length() < 1)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    unsigned long long arg1 = 0;
+    V8TRYCATCH(double, arg1NativeValue, args[0]->NumberValue());
+    if (!isnan(arg1NativeValue))
+        arg1 = clampTo<unsigned long long>(arg1NativeValue);
+    if (args.Length() <= 1) {
+        imp->funcWithClamp(arg1);
+        return v8Undefined();
+    }
+    unsigned long long arg2 = 0;
+    V8TRYCATCH(double, arg2NativeValue, args[1]->NumberValue());
+    if (!isnan(arg2NativeValue))
+        arg2 = clampTo<unsigned long long>(arg2NativeValue);
+    imp->funcWithClamp(arg1, arg2);
+    return v8Undefined();
+}
+
+static v8::Handle<v8::Value> immutablePointFunctionCallback(const v8::Arguments& args)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    return toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutablePointFunction())), args.Holder(), args.GetIsolate());
+}
+
+static v8::Handle<v8::Value> stringArrayFunctionCallback(const v8::Arguments& args)
+{
+    if (args.Length() < 1)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    ExceptionCode ec = 0;
+    {
+    V8TRYCATCH(Vector<String>, values, toNativeArray<String>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
+    Vector<String> result = imp->stringArrayFunction(values, ec);
+    if (UNLIKELY(ec))
+        goto fail;
+    return v8Array(result, args.GetIsolate());
+    }
+    fail:
+    return setDOMException(ec, args.GetIsolate());
+}
+
+static v8::Handle<v8::Value> stringArrayFunction2Callback(const v8::Arguments& args)
+{
+    if (args.Length() < 1)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    ExceptionCode ec = 0;
+    {
+    V8TRYCATCH(Vector<String>, values, toNativeArray<String>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
+    Vector<String> result = imp->stringArrayFunction2(values, ec);
+    if (UNLIKELY(ec))
+        goto fail;
+    return v8Array(result, args.GetIsolate());
+    }
+    fail:
+    return setDOMException(ec, args.GetIsolate());
+}
+
+static v8::Handle<v8::Value> methodWithExceptionCallback(const v8::Arguments& args)
+{
+    TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
+    ExceptionCode ec = 0;
+    {
+    imp->methodWithException(ec);
+    if (UNLIKELY(ec))
+        goto fail;
+    return v8Undefined();
+    }
+    fail:
+    return setDOMException(ec, args.GetIsolate());
+}
+
+} // namespace TestTypedefsV8Internal
+
+static const V8DOMConfiguration::BatchedAttribute V8TestTypedefsAttrs[] = {
+    // Attribute 'unsignedLongLongAttr' (Type: 'attribute' ExtAttr: '')
+    {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter, TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'immutableSerializedScriptValue' (Type: 'attribute' ExtAttr: 'Immutable')
+    {"immutableSerializedScriptValue", TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter, TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'TestSubObj' (Type: 'readonly attribute' ExtAttr: '')
+    {"TestSubObj", TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, &V8TestSubObj::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'attrWithGetterException' (Type: 'attribute' ExtAttr: '')
+    {"attrWithGetterException", TestTypedefsV8Internal::attrWithGetterExceptionAttrGetter, TestTypedefsV8Internal::attrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'attrWithSetterException' (Type: 'attribute' ExtAttr: '')
+    {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionAttrGetter, TestTypedefsV8Internal::attrWithSetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'stringAttrWithGetterException' (Type: 'attribute' ExtAttr: '')
+    {"stringAttrWithGetterException", TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrGetter, TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'stringAttrWithSetterException' (Type: 'attribute' ExtAttr: '')
+    {"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetter, TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+};
+
+static const V8DOMConfiguration::BatchedCallback V8TestTypedefsCallbacks[] = {
+    {"func", TestTypedefsV8Internal::funcCallback},
+    {"multiTransferList", TestTypedefsV8Internal::multiTransferListCallback},
+    {"setShadow", TestTypedefsV8Internal::setShadowCallback},
+    {"funcWithClamp", TestTypedefsV8Internal::funcWithClampCallback},
+    {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionCallback},
+    {"methodWithException", TestTypedefsV8Internal::methodWithExceptionCallback},
+};
+
+v8::Handle<v8::Value> V8TestTypedefs::constructorCallback(const v8::Arguments& args)
+{
+    
+    if (!args.IsConstructCall())
+        return throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
+
+    if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
+        return args.Holder();
+    if (args.Length() < 2)
+        return throwNotEnoughArgumentsError(args.GetIsolate());
+    V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, hello, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
+    if (args.Length() <= 1 || !args[1]->IsFunction())
+        return throwTypeError(0, args.GetIsolate());
+    RefPtr<TestCallback> testCallback = V8TestCallback::create(args[1], getScriptExecutionContext());
+
+    RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback);
+    v8::Handle<v8::Object> wrapper = args.Holder();
+
+    V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
+    return wrapper;
+}
+
+static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestTypedefsTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate)
+{
+    desc->ReadOnlyPrototype();
+
+    v8::Local<v8::Signature> defaultSignature;
+    defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestTypedefs", v8::Persistent<v8::FunctionTemplate>(), V8TestTypedefs::internalFieldCount,
+        V8TestTypedefsAttrs, WTF_ARRAY_LENGTH(V8TestTypedefsAttrs),
+        V8TestTypedefsCallbacks, WTF_ARRAY_LENGTH(V8TestTypedefsCallbacks), isolate);
+    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
+    desc->SetCallHandler(V8TestTypedefs::constructorCallback);
+    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
+    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
+    UNUSED_PARAM(instance); // In some cases, it will not be used.
+    UNUSED_PARAM(proto); // In some cases, it will not be used.
+    
+
+    // Custom Signature 'methodWithSequenceArg'
+    const int methodWithSequenceArgArgc = 1;
+    v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8sequence<SerializedScriptValue>::GetRawTemplate(isolate) };
+    v8::Handle<v8::Signature> methodWithSequenceArgSignature = v8::Signature::New(desc, methodWithSequenceArgArgc, methodWithSequenceArgArgv);
+    proto->Set(v8::String::NewSymbol("methodWithSequenceArg"), v8::FunctionTemplate::New(TestTypedefsV8Internal::methodWithSequenceArgCallback, v8Undefined(), methodWithSequenceArgSignature));
+
+    // Custom Signature 'nullableArrayArg'
+    const int nullableArrayArgArgc = 1;
+    v8::Handle<v8::FunctionTemplate> nullableArrayArgArgv[nullableArrayArgArgc] = { V8DOMString[]::GetRawTemplate(isolate) };
+    v8::Handle<v8::Signature> nullableArrayArgSignature = v8::Signature::New(desc, nullableArrayArgArgc, nullableArrayArgArgv);
+    proto->Set(v8::String::NewSymbol("nullableArrayArg"), v8::FunctionTemplate::New(TestTypedefsV8Internal::nullableArrayArgCallback, v8Undefined(), nullableArrayArgSignature));
+
+    // Custom Signature 'stringArrayFunction'
+    const int stringArrayFunctionArgc = 1;
+    v8::Handle<v8::FunctionTemplate> stringArrayFunctionArgv[stringArrayFunctionArgc] = { V8DOMString[]::GetRawTemplate(isolate) };
+    v8::Handle<v8::Signature> stringArrayFunctionSignature = v8::Signature::New(desc, stringArrayFunctionArgc, stringArrayFunctionArgv);
+    proto->Set(v8::String::NewSymbol("stringArrayFunction"), v8::FunctionTemplate::New(TestTypedefsV8Internal::stringArrayFunctionCallback, v8Undefined(), stringArrayFunctionSignature));
+
+    // Custom Signature 'stringArrayFunction2'
+    const int stringArrayFunction2Argc = 1;
+    v8::Handle<v8::FunctionTemplate> stringArrayFunction2Argv[stringArrayFunction2Argc] = { V8DOMString[]::GetRawTemplate(isolate) };
+    v8::Handle<v8::Signature> stringArrayFunction2Signature = v8::Signature::New(desc, stringArrayFunction2Argc, stringArrayFunction2Argv);
+    proto->Set(v8::String::NewSymbol("stringArrayFunction2"), v8::FunctionTemplate::New(TestTypedefsV8Internal::stringArrayFunction2Callback, v8Undefined(), stringArrayFunction2Signature));
+
+    // Custom toString template
+    desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
+    return desc;
+}
+
+v8::Persistent<v8::FunctionTemplate> V8TestTypedefs::GetRawTemplate(v8::Isolate* isolate)
+{
+    V8PerIsolateData* data = V8PerIsolateData::from(isolate);
+    V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info);
+    if (result != data->rawTemplateMap().end())
+        return result->value;
+
+    v8::HandleScope handleScope;
+    v8::Persistent<v8::FunctionTemplate> templ = createRawTemplate(isolate);
+    data->rawTemplateMap().add(&info, templ);
+    return templ;
+}
+
+v8::Persistent<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* isolate)
+{
+    V8PerIsolateData* data = V8PerIsolateData::from(isolate);
+    V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info);
+    if (result != data->templateMap().end())
+        return result->value;
+
+    v8::HandleScope handleScope;
+    v8::Persistent<v8::FunctionTemplate> templ =
+        ConfigureV8TestTypedefsTemplate(GetRawTemplate(isolate), isolate);
+    data->templateMap().add(&info, templ);
+    return templ;
+}
+
+bool V8TestTypedefs::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate)
+{
+    return GetRawTemplate(isolate)->HasInstance(value);
+}
+
+
+v8::Handle<v8::Object> V8TestTypedefs::createWrapper(PassRefPtr<TestTypedefs> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+    ASSERT(impl.get());
+    ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty());
+
+#if ENABLE(BINDING_INTEGRITY)
+    checkTypeOrDieTrying(impl.get());
+#endif
+
+    v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, impl.get(), isolate);
+    if (UNLIKELY(wrapper.IsEmpty()))
+        return wrapper;
+
+    installPerContextProperties(wrapper, impl.get(), isolate);
+    V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasDependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Independent);
+    return wrapper;
+}
+void V8TestTypedefs::derefObject(void* object)
+{
+    static_cast<TestTypedefs*>(object)->deref();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.h b/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.h
new file mode 100644 (file)
index 0000000..c1e6f29
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+    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 V8TestTypedefs_h
+#define V8TestTypedefs_h
+
+#include "TestTypedefs.h"
+#include "V8Binding.h"
+#include "V8DOMWrapper.h"
+#include "WrapperTypeInfo.h"
+#include <v8.h>
+#include <wtf/HashMap.h>
+#include <wtf/text/StringHash.h>
+
+namespace WebCore {
+
+class V8TestTypedefs {
+public:
+    static const bool hasDependentLifetime = false;
+    static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*);
+    static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(v8::Isolate*);
+    static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*);
+    static TestTypedefs* toNative(v8::Handle<v8::Object> object)
+    {
+        return reinterpret_cast<TestTypedefs*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
+    }
+    static void derefObject(void*);
+    static WrapperTypeInfo info;
+    static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
+    static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
+    static void installPerContextProperties(v8::Handle<v8::Object>, TestTypedefs*, v8::Isolate*) { }
+    static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
+private:
+    friend v8::Handle<v8::Object> wrap(TestTypedefs*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+    static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestTypedefs>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
+};
+
+
+inline v8::Handle<v8::Object> wrap(TestTypedefs* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+    ASSERT(impl);
+    ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
+    return V8TestTypedefs::createWrapper(impl, creationContext, isolate);
+}
+
+inline v8::Handle<v8::Value> toV8(TestTypedefs* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+    if (UNLIKELY(!impl))
+        return v8NullWithCheck(isolate);
+    v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
+    if (!wrapper.IsEmpty())
+        return wrapper;
+    return wrap(impl, creationContext, isolate);
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8Fast(TestTypedefs* impl, const HolderContainer& container, Wrappable* wrappable)
+{
+    if (UNLIKELY(!impl))
+        return v8Null(container.GetIsolate());
+    v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
+    if (!wrapper.IsEmpty())
+        return wrapper;
+    return wrap(impl, container.Holder(), container.GetIsolate());
+}
+
+template<class HolderContainer, class Wrappable>
+inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestTypedefs > impl, const HolderContainer& container, Wrappable* wrappable)
+{
+    return toV8Fast(impl.get(), container, wrappable);
+}
+
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestTypedefs > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+    return toV8(impl.get(), creationContext, isolate);
+}
+
+}
+
+#endif // V8TestTypedefs_h