Diff
Modified: trunk/Source/WebCore/ChangeLog (112652 => 112653)
--- trunk/Source/WebCore/ChangeLog 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/ChangeLog 2012-03-30 11:54:00 UTC (rev 112653)
@@ -1,3 +1,48 @@
+2012-03-30 Vineet Chaudhary <[email protected]>
+
+ 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 <[email protected]>
Web Inspector: editing resets line-ending of the whole file
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm 2012-03-30 11:54:00 UTC (rev 112653)
@@ -187,24 +187,45 @@
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/;
- return 1 if $typeInfo->signature->type =~ /Constructor$/;
-
- return 1 if $codeGenerator->GetArrayType($typeInfo->signature->type);
-
+ 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 $typeInfo->signature->extendedAttributes->{"CallWith"};
+ 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);
+
+ # 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 $attribute->signature->extendedAttributes->{"CallWith"};
+
return 0;
}
@@ -264,6 +285,7 @@
{
my $type = $codeGenerator->StripModule(shift);
+ return if $codeGenerator->GetArrayType($type);
return if $codeGenerator->IsNonPointerType($type);
return if $type =~ /Constructor/;
@@ -415,7 +437,7 @@
# - 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 @@
# - 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 @@
# - 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 @@
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;
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-03-30 11:54:00 UTC (rev 112653)
@@ -236,11 +236,12 @@
# 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;
}
}
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm 2012-03-30 11:54:00 UTC (rev 112653)
@@ -447,6 +447,29 @@
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 @@
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 @@
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 @@
# - 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 @@
# - 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 @@
# - Functions
if ($numFunctions > 0) {
foreach my $function (@{$dataNode->functions}) {
+ next if SkipFunction($function);
AddIncludesForType($function->signature->type);
my $functionName = $function->signature->name;
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-03-30 11:54:00 UTC (rev 112653)
@@ -3601,8 +3601,13 @@
$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 {
Modified: trunk/Source/WebCore/bindings/scripts/IDLStructure.pm (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/IDLStructure.pm 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/IDLStructure.pm 2012-03-30 11:54:00 UTC (rev 112653)
@@ -104,7 +104,7 @@
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 . '*)';
Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp 2012-03-30 11:54:00 UTC (rev 112653)
@@ -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 @@
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())
Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2012-03-30 11:54:00 UTC (rev 112653)
@@ -43,7 +43,6 @@
class WebDOMc;
class WebDOMd;
class WebDOMe;
-class WebDOMsequence;
class WebDOMTestObj : public WebDOMObject {
public:
@@ -150,7 +149,6 @@
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);
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-03-30 11:54:00 UTC (rev 112653)
@@ -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 @@
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)
{
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2012-03-30 11:54:00 UTC (rev 112653)
@@ -116,17 +116,6 @@
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
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2012-03-30 11:54:00 UTC (rev 112653)
@@ -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 @@
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());
}
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h 2012-03-30 11:54:00 UTC (rev 112653)
@@ -43,8 +43,6 @@
@class DOMc;
@class DOMd;
@class DOMe;
-@class DOMsequence;
-@class DOMsequence<ScriptProfile>;
@class NSString;
@protocol DOMEventListener;
@@ -177,8 +175,6 @@
- (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;
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2012-03-30 11:54:00 UTC (rev 112653)
@@ -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)
@@ -206,20 +202,6 @@
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;
@@ -761,18 +743,6 @@
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;
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (112652 => 112653)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2012-03-30 11:36:15 UTC (rev 112652)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2012-03-30 11:54:00 UTC (rev 112653)
@@ -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 @@
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 @@
// 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));