IDLParser.pm should be able to parse sequence<T> as method argument.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2012 11:54:00 +0000 (11:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2012 11:54:00 +0000 (11:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82599

Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-03-30
Reviewed by Kentaro Hara.

With this patch IDL parser should support sequence<T> as method argument.
Current behaviour is argument name is not parsed hence shows empty spaces instead.

Tests: bindings/scripts/test/TestObj.idl

* bindings/scripts/CodeGeneratorCPP.pm:
(SkipFunction): Skip functions for specific type.
(SkipAttribute): Skip functions for specific type.
(AddIncludesForType): Skip header for sequence<T> type.
(GenerateHeader): Skip header and declaration for sequence<T> type.
(GenerateImplementation): Skip header and implementation for sequence<T> type.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Skip functions for sequence<T> type.
* bindings/scripts/CodeGeneratorObjC.pm:
(SkipFunction): Skip functions for specific type.
(SkipAttribute): Skip functions for specific type.
(AddForwardDeclarationsForType): Skip header for sequence<T> type.
(AddIncludesForType): Skip header for sequence<T> type.
(GenerateHeader):Skip header and declaration for sequence<T> type.
(GenerateImplementation): Skip header and implementation for sequence<T> type.
* bindings/scripts/CodeGeneratorV8.pm:
(CreateCustomSignature): Add appropriate headers.
* bindings/scripts/IDLStructure.pm: Add support to parse sequence<T>.
* bindings/scripts/test/CPP/WebDOMTestObj.cpp: Modified results from run-binding-tests.
(WebDOMTestObj::objMethodWithArgs):
* bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
(webkit_dom_test_obj_obj_method_with_args):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
* bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
(-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
* bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
(WebCore::TestObjInternal::methodWithSequenceArgCallback):
(WebCore::ConfigureV8TestObjTemplate):

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

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/IDLStructure.pm
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

index bb04126..7e3e4df 100644 (file)
@@ -1,3 +1,48 @@
+2012-03-30  Vineet Chaudhary  <rgf748@motorola.com>
+
+        IDLParser.pm should be able to parse sequence<T> as method argument.
+        https://bugs.webkit.org/show_bug.cgi?id=82599
+
+        Reviewed by Kentaro Hara.
+
+        With this patch IDL parser should support sequence<T> as method argument.
+        Current behaviour is argument name is not parsed hence shows empty spaces instead.
+
+        Tests: bindings/scripts/test/TestObj.idl
+
+        * bindings/scripts/CodeGeneratorCPP.pm:
+        (SkipFunction): Skip functions for specific type.
+        (SkipAttribute): Skip functions for specific type.
+        (AddIncludesForType): Skip header for sequence<T> type.
+        (GenerateHeader): Skip header and declaration for sequence<T> type.
+        (GenerateImplementation): Skip header and implementation for sequence<T> type.
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (SkipFunction): Skip functions for sequence<T> type.
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        (SkipFunction): Skip functions for specific type.
+        (SkipAttribute): Skip functions for specific type.
+        (AddForwardDeclarationsForType): Skip header for sequence<T> type.
+        (AddIncludesForType): Skip header for sequence<T> type.
+        (GenerateHeader):Skip header and declaration for sequence<T> type.
+        (GenerateImplementation): Skip header and implementation for sequence<T> type.
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (CreateCustomSignature): Add appropriate headers.
+        * bindings/scripts/IDLStructure.pm: Add support to parse sequence<T>.
+        * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Modified results from run-binding-tests.
+        (WebDOMTestObj::objMethodWithArgs):
+        * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
+        (webkit_dom_test_obj_obj_method_with_args):
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
+        * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
+        (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
+        * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
+        * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
+        (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
+        * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
+        (WebCore::TestObjInternal::methodWithSequenceArgCallback):
+        (WebCore::ConfigureV8TestObjTemplate):
+
 2012-03-30  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: editing resets line-ending of the whole file
index ea25206..a365c68 100644 (file)
@@ -187,24 +187,45 @@ sub GetParent
     return $parent;
 }
 
-sub ShouldSkipType
+sub SkipFunction
 {
-    my $typeInfo = shift;
+    my $function = shift;
 
-    return 1 if $typeInfo->signature->extendedAttributes->{"Custom"}
-                or $typeInfo->signature->extendedAttributes->{"CustomGetter"};
+    return 1 if $function->signature->extendedAttributes->{"Custom"};
 
     # FIXME: We don't generate bindings for SVG related interfaces yet
-    return 1 if $typeInfo->signature->name =~ /getSVGDocument/;
+    return 1 if $function->signature->name =~ /getSVGDocument/;
+
+    if ($codeGenerator->GetArrayType($function->signature->type)) {
+        return 1;
+    }
+
+    foreach my $param (@{$function->parameters}) {
+        return 1 if $codeGenerator->GetArrayType($param->type);
+    }
+
+    # FIXME: This is typically used to add script execution state arguments to the method.
+    # These functions will not compile with the C++ bindings as is, so disable them
+    # to restore compilation until a proper implementation can be developed.
+    return 1 if $function->signature->extendedAttributes->{"CallWith"};
+}
+
+sub SkipAttribute
+{
+    my $attribute = shift;
+
+    return 1 if $attribute->signature->extendedAttributes->{"Custom"}
+                or $attribute->signature->extendedAttributes->{"CustomGetter"};
+
+    return 1 if $attribute->signature->type =~ /Constructor$/;
+
+    return 1 if $codeGenerator->GetArrayType($attribute->signature->type);
 
-    return 1 if $typeInfo->signature->type =~ /Constructor$/;
-    
-    return 1 if $codeGenerator->GetArrayType($typeInfo->signature->type);
-    
     # FIXME: This is typically used to add script execution state arguments to the method.
     # These functions will not compile with the C++ bindings as is, so disable them
     # to restore compilation until a proper implementation can be developed.
-    return 1 if $typeInfo->signature->extendedAttributes->{"CallWith"};
+    return 1 if $attribute->signature->extendedAttributes->{"CallWith"};
+
     return 0;
 }
 
@@ -264,6 +285,7 @@ sub AddIncludesForType
 {
     my $type = $codeGenerator->StripModule(shift);
 
+    return if $codeGenerator->GetArrayType($type);
     return if $codeGenerator->IsNonPointerType($type);
     return if $type =~ /Constructor/;
 
@@ -415,7 +437,7 @@ sub GenerateHeader
     # - Add attribute getters/setters.
     if ($numAttributes > 0) {
         foreach my $attribute (@{$dataNode->attributes}) {
-            next if ShouldSkipType($attribute);
+            next if SkipAttribute($attribute);
 
             my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
             my $attributeName = $attribute->signature->name;
@@ -454,7 +476,7 @@ sub GenerateHeader
     # - Add functions.
     if ($numFunctions > 0) {
         foreach my $function (@{$dataNode->functions}) {
-            next if ShouldSkipType($function);
+            next if SkipFunction($function);
             my $functionName = $function->signature->extendedAttributes->{"ImplementedAs"} || $function->signature->name;
 
             my $returnType = GetCPPType($function->signature->type, 0);
@@ -669,7 +691,7 @@ sub GenerateImplementation
     # - Attributes
     if ($numAttributes > 0) {
         foreach my $attribute (@{$dataNode->attributes}) {
-            next if ShouldSkipType($attribute);
+            next if SkipAttribute($attribute);
             AddIncludesForType($attribute->signature->type);
 
             my $idlType = $codeGenerator->StripModule($attribute->signature->type);
@@ -775,7 +797,7 @@ sub GenerateImplementation
     if ($numFunctions > 0) {
         foreach my $function (@{$dataNode->functions}) {
             # Treat CPPPureInterface as Custom as well, since the WebCore versions will take a script context as well
-            next if ShouldSkipType($function) || $dataNode->extendedAttributes->{"CPPPureInterface"};
+            next if SkipFunction($function) || $dataNode->extendedAttributes->{"CPPPureInterface"};
             AddIncludesForType($function->signature->type);
 
             my $functionName = $function->signature->name;
index dca1b7a..b48f23e 100644 (file)
@@ -236,11 +236,12 @@ sub SkipFunction {
 
     # Skip functions that have ["Callback"] parameters, because this
     # code generator doesn't know how to auto-generate callbacks.
-    # Skip functions that have "MediaQueryListListener" parameters, because this
-    # code generator doesn't know how to auto-generate MediaQueryListListener.
+    # Skip functions that have "MediaQueryListListener" or sequence<T> parameters, because this
+    # code generator doesn't know how to auto-generate MediaQueryListListener or sequence<T>.
     foreach my $param (@{$function->parameters}) {
         if ($param->extendedAttributes->{"Callback"} ||
-            $param->type eq "MediaQueryListListener") {
+            $param->type eq "MediaQueryListListener" ||
+            $codeGenerator->GetArrayType($param->type)) {
             return 1;
         }
     }
index f01404e..5691d03 100644 (file)
@@ -447,6 +447,29 @@ sub IsNativeObjCType
     return 0;
 }
 
+sub SkipFunction
+{
+    my $function = shift;
+
+    return 1 if $codeGenerator->GetArrayType($function->signature->type);
+
+    foreach my $param (@{$function->parameters}) {
+        return 1 if $codeGenerator->GetArrayType($param->type);
+    }
+
+    return 0;
+}
+
+sub SkipAttribute
+{
+    my $attribute = shift;
+
+    return 1 if $codeGenerator->GetArrayType($attribute->signature->type);
+
+    return 0;
+}
+
+
 sub GetObjCType
 {
     my $type = shift;
@@ -511,7 +534,8 @@ sub AddForwardDeclarationsForType
     my $type = $codeGenerator->StripModule(shift);
     my $public = shift;
 
-    return if $codeGenerator->IsNonPointerType($type) ;
+    return if $codeGenerator->IsNonPointerType($type);
+    return if $codeGenerator->GetArrayType($type);
 
     my $class = GetClassName($type);
 
@@ -533,6 +557,7 @@ sub AddIncludesForType
     my $type = $codeGenerator->StripModule(shift);
 
     return if $codeGenerator->IsNonPointerType($type);
+    return if $codeGenerator->GetArrayType($type);
 
     if (IsNativeObjCType($type)) {
         if ($type eq "Color") {
@@ -843,6 +868,7 @@ sub GenerateHeader
     # - Add functions.
     if ($numFunctions > 0) {
         foreach my $function (@{$dataNode->functions}) {
+            next if SkipFunction($function);
             my $functionName = $function->signature->name;
 
             my $returnType = GetObjCType($function->signature->type);
@@ -1165,6 +1191,7 @@ sub GenerateImplementation
     # - Attributes
     if ($numAttributes > 0) {
         foreach my $attribute (@{$dataNode->attributes}) {
+            next if SkipAttribute($attribute);
             AddIncludesForType($attribute->signature->type);
 
             my $idlType = $codeGenerator->StripModule($attribute->signature->type);
@@ -1461,6 +1488,7 @@ sub GenerateImplementation
     # - Functions
     if ($numFunctions > 0) {
         foreach my $function (@{$dataNode->functions}) {
+            next if SkipFunction($function);
             AddIncludesForType($function->signature->type);
 
             my $functionName = $function->signature->name;
index 84c6873..c94f8d4 100644 (file)
@@ -3601,8 +3601,13 @@ sub CreateCustomSignature
                 $result .= "v8::Handle<v8::FunctionTemplate>()";
             } else {
                 my $type = $parameter->type;
-                my $header = GetV8HeaderName($type);
-                AddToImplIncludes($header);
+                my $arrayType = $codeGenerator->GetArrayType($type);
+                if ($arrayType) {
+                    AddToImplIncludes("$arrayType.h");
+                } else {
+                    my $header = GetV8HeaderName($type);
+                    AddToImplIncludes($header);
+                }
                 $result .= "V8${type}::GetRawTemplate()";
             }
         } else {
index 775d975..90e0e2d 100644 (file)
@@ -104,7 +104,7 @@ our $setterRaisesSelector = '\bsetter\s+raises\s*\((' . $idlIdNsList . '*)\s*\)'
 our $typeNamespaceSelector = '((?:' . $idlId . '*::)*)\s*(' . $idlDataType . '*)';
 
 our $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]<>&\|]*)';
-our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)(static\s+)?' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
+our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)(static\s+)?' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]<>]*)';
 our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
 
 our $interfaceAttributeSelector = '\s*(readonly attribute|attribute)\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)';
index 8071df8..cb61197 100644 (file)
@@ -40,7 +40,6 @@
 #include "WebDOMc.h"
 #include "WebDOMd.h"
 #include "WebDOMe.h"
-#include "WebDOMsequence.h"
 #include "WebExceptionHandler.h"
 #include "WebNativeEventListener.h"
 #include "a.h"
@@ -49,7 +48,6 @@
 #include "c.h"
 #include "d.h"
 #include "e.h"
-#include "sequence.h"
 #include "wtf/text/AtomicString.h"
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
@@ -695,14 +693,6 @@ WebDOMTestObj WebDOMTestObj::objMethodWithArgs(int intArg, const WebDOMString& s
     return toWebKit(WTF::getPtr(impl()->objMethodWithArgs(intArg, strArg, toWebCore(objArg))));
 }
 
-void WebDOMTestObj::methodWithSequenceArg(const WebDOMsequence& )
-{
-    if (!impl())
-        return;
-
-    impl()->methodWithSequenceArg(toWebCore());
-}
-
 WebDOMTestObj WebDOMTestObj::methodThatRequiresAllArgsAndThrows(const WebDOMString& strArg, const WebDOMTestObj& objArg)
 {
     if (!impl())
index e7ecc3f..a5cf99e 100644 (file)
@@ -43,7 +43,6 @@ class WebDOMbool;
 class WebDOMc;
 class WebDOMd;
 class WebDOMe;
-class WebDOMsequence;
 
 class WebDOMTestObj : public WebDOMObject {
 public:
@@ -150,7 +149,6 @@ public:
     int intMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg);
     WebDOMTestObj objMethod();
     WebDOMTestObj objMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg);
-    void methodWithSequenceArg(const WebDOMsequence& );
     WebDOMTestObj methodThatRequiresAllArgsAndThrows(const WebDOMString& strArg, const WebDOMTestObj& objArg);
     void serializedValue(const WebDOMString& serializedArg);
     void idbKey(const WebDOMIDBKey& key);
index f73b58b..ca42d38 100644 (file)
@@ -57,8 +57,6 @@
 #include "webkit/WebKitDOMdPrivate.h"
 #include "webkit/WebKitDOMe.h"
 #include "webkit/WebKitDOMePrivate.h"
-#include "webkit/WebKitDOMsequence.h"
-#include "webkit/WebKitDOMsequencePrivate.h"
 #include "webkitdefines.h"
 #include "webkitglobalsprivate.h"
 #include "webkitmarshal.h"
@@ -1034,21 +1032,6 @@ webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg,
     return res;
 }
 
-void
-webkit_dom_test_obj_method_with_sequence_arg(WebKitDOMTestObj* self, WebKitDOMsequence* )
-{
-    g_return_if_fail(self);
-    WebCore::JSMainThreadNullState state;
-    WebCore::TestObj * item = WebKit::core(self);
-    g_return_if_fail();
-    WebCore::sequence * converted_ = NULL;
-    if ( != NULL) {
-        converted_ = WebKit::core();
-        g_return_if_fail(converted_);
-    }
-    item->methodWithSequenceArg(converted_);
-}
-
 WebKitDOMTestObj*
 webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg, GError **error)
 {
index cfa0248..11faba7 100644 (file)
@@ -116,17 +116,6 @@ WEBKIT_API WebKitDOMTestObj*
 webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg);
 
 /**
- * webkit_dom_test_obj_method_with_sequence_arg:
- * @self: A #WebKitDOMTestObj
- * @: A #WebKitDOMsequence
- *
- * Returns:
- *
-**/
-WEBKIT_API void
-webkit_dom_test_obj_method_with_sequence_arg(WebKitDOMTestObj* self, WebKitDOMsequence* );
-
-/**
  * webkit_dom_test_obj_method_that_requires_all_args_and_throws:
  * @self: A #WebKitDOMTestObj
  * @str_arg: A #gchar
index 3182b5e..2ddf757 100644 (file)
@@ -43,7 +43,6 @@
 #include "JSd.h"
 #include "JSe.h"
 #include "JSint.h"
-#include "JSsequence.h"
 #include "KURL.h"
 #include "SVGDocument.h"
 #include "SVGStaticPropertyTearOff.h"
@@ -1429,10 +1428,10 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(Exe
     TestObj* impl = static_cast<TestObj*>(castedThis->impl());
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
-    sequence* (tosequence(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
+    sequence<ScriptProfile>* sequenceArg(toNativeArray<ScriptProfile>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
-    impl->methodWithSequenceArg();
+    impl->methodWithSequenceArg(sequenceArg);
     return JSValue::encode(jsUndefined());
 }
 
index 03267f1..e32d3f4 100644 (file)
@@ -43,8 +43,6 @@
 @class DOMc;
 @class DOMd;
 @class DOMe;
-@class DOMsequence;
-@class DOMsequence<ScriptProfile>;
 @class NSString;
 @protocol DOMEventListener;
 
@@ -177,8 +175,6 @@ enum {
 - (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
 - (DOMTestObj *)objMethod;
 - (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
-- (void)methodWithSequenceArg:(DOMsequence *);
-- (DOMsequence<ScriptProfile> *)methodReturningSequence:(int)intArg;
 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg;
 - (void)serializedValue:(NSString *)serializedArg;
 - (void)idbKey:(DOMIDBKey *)key;
index 7daa0a1..53e4596 100644 (file)
@@ -50,8 +50,6 @@
 #import "DOMcInternal.h"
 #import "DOMdInternal.h"
 #import "DOMeInternal.h"
-#import "DOMsequence<ScriptProfile>Internal.h"
-#import "DOMsequenceInternal.h"
 #import "Dictionary.h"
 #import "Document.h"
 #import "EventListener.h"
@@ -77,8 +75,6 @@
 #import "c.h"
 #import "d.h"
 #import "e.h"
-#import "sequence.h"
-#import "sequence<ScriptProfile>.h"
 #import <wtf/GetPtr.h>
 
 #define IMPL reinterpret_cast<WebCore::TestObj*>(_internal)
     IMPL->setTestObjAttr(core(newTestObjAttr));
 }
 
-- (DOMsequence<ScriptProfile> *)sequenceAttr
-{
-    WebCore::JSMainThreadNullState state;
-    return kit(WTF::getPtr(IMPL->sequenceAttr()));
-}
-
-- (void)setSequenceAttr:(DOMsequence<ScriptProfile> *)newSequenceAttr
-{
-    WebCore::JSMainThreadNullState state;
-    ASSERT(newSequenceAttr);
-
-    IMPL->setSequenceAttr(core(newSequenceAttr));
-}
-
 - (DOMTestObj *)XMLObjAttr
 {
     WebCore::JSMainThreadNullState state;
     return kit(WTF::getPtr(IMPL->objMethodWithArgs(intArg, strArg, core(objArg))));
 }
 
-- (void)methodWithSequenceArg:(DOMsequence *)
-{
-    WebCore::JSMainThreadNullState state;
-    IMPL->methodWithSequenceArg(core());
-}
-
-- (DOMsequence<ScriptProfile> *)methodReturningSequence:(int)intArg
-{
-    WebCore::JSMainThreadNullState state;
-    return kit(WTF::getPtr(IMPL->methodReturningSequence(intArg)));
-}
-
 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg
 {
     WebCore::JSMainThreadNullState state;
index 99654f5..8aafa8f 100644 (file)
@@ -53,7 +53,6 @@
 #include "V8d.h"
 #include "V8e.h"
 #include "V8int.h"
-#include "V8sequence.h"
 #include <wtf/GetPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -1076,8 +1075,8 @@ static v8::Handle<v8::Value> methodWithSequenceArgCallback(const v8::Arguments&
     if (args.Length() < 1)
         return throwError("Not enough arguments", V8Proxy::TypeError);
     TestObj* imp = V8TestObj::toNative(args.Holder());
-    EXCEPTION_BLOCK(sequence*, , V8sequence::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)) ? V8sequence::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined))) : 0);
-    imp->methodWithSequenceArg();
+    EXCEPTION_BLOCK(sequence<ScriptProfile>*, sequenceArg, toNativeArray<ScriptProfile>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
+    imp->methodWithSequenceArg(sequenceArg);
     return v8::Handle<v8::Value>();
 }
 
@@ -2071,7 +2070,7 @@ static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
 
     // Custom Signature 'methodWithSequenceArg'
     const int methodWithSequenceArgArgc = 1;
-    v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8sequence::GetRawTemplate() };
+    v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8sequence<ScriptProfile>::GetRawTemplate() };
     v8::Handle<v8::Signature> methodWithSequenceArgSignature = v8::Signature::New(desc, methodWithSequenceArgArgc, methodWithSequenceArgArgv);
     proto->Set(v8::String::New("methodWithSequenceArg"), v8::FunctionTemplate::New(TestObjInternal::methodWithSequenceArgCallback, v8::Handle<v8::Value>(), methodWithSequenceArgSignature));