Source/WebCore/ChangeLog

 12012-06-13 Vineet Chaudhary <vineet.chaudhary@motorola.com>
 2
 3 REGRESSION:Bindings sequence<T> in Console.idl, Internals.idl and ScriptProfileNode.idl should be T[]
 4 https://bugs.webkit.org/show_bug.cgi?id=84863
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 With reference to http://www.w3.org/TR/WebIDL/#idl-sequence
 9 "Sequences must not be used as the type of an attribute, constant or exception field."
 10 So we should use T[] instead of sequence<T>.
 11
 12 Tests: bindings/scripts/test/TestObj.idl
 13 fast/harness/user-preferred-language.html
 14 inspector/profiler/cpu-profiler-profiling-without-inspector.html
 15 media/track/track-language-preference.html
 16
 17 * bindings/scripts/CodeGenerator.pm:
 18 (GetSequenceType): Getter for getting sequence type.
 19 (GetArrayType): Getter for getting array type.
 20 (AssertNotSequenceType): Check sequences must not be used as the type of an attribute,
 21 constant or exception field.
 22 * bindings/scripts/CodeGeneratorCPP.pm:
 23 (SkipFunction): Exclude bindings code for type sequence.
 24 (SkipAttribute): Check for sequences must not be used as the type of an attribute,
 25 constant or exception field.
 26 (AddIncludesForType): Exclude header inclusion code for type array/sequence.
 27 * bindings/scripts/CodeGeneratorGObject.pm:
 28 (SkipAttribute): Check for sequences must not be used as the type of an attribute,
 29 constant or exception field.
 30 (SkipFunction): Exclude bindings code for type sequence.
 31 * bindings/scripts/CodeGeneratorJS.pm:
 32 (AddIncludesForType): Exclude header inclusion code for type array/sequence.
 33 (GenerateImplementation): Check for sequences must not be used as the type of an attribute,
 34 constant or exception field.
 35 (GetNativeType):
 36 (JSValueToNative):
 37 (NativeToJSValue):
 38 * bindings/scripts/CodeGeneratorObjC.pm:
 39 (SkipFunction): Exclude bindings code for type sequence.
 40 (SkipAttribute): Exclude bindings code for type array.
 41 (AddForwardDeclarationsForType):
 42 (AddIncludesForType):
 43 * bindings/scripts/CodeGeneratorV8.pm:
 44 (GenerateNormalAttrGetter):
 45 (GetNativeType):
 46 (JSValueToNative):
 47 (CreateCustomSignature):
 48 (NativeToJSValue):
 49 * bindings/scripts/test/JS/JSTestObj.cpp: Updated code from run-bindings-tests.
 50 (WebCore):
 51 (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
 52 * bindings/scripts/test/JS/JSTestObj.h: Updated code from run-bindings-tests.
 53 (WebCore):
 54 * bindings/scripts/test/TestObj.idl: Tests.
 55 * bindings/scripts/test/V8/V8TestObj.cpp: Updated code from run-bindings-tests.
 56 (TestObjV8Internal):
 57 (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
 58 (WebCore):
 59 * inspector/ScriptProfileNode.idl: Using sequence<T> for children().
 60 * page/Console.idl: Using Array[T] for profiles attribute.
 61 * testing/Internals.idl: Using sequence<T> for userPreferredLanguages().
 62
1632012-06-11 Kinuko Yasuda <kinuko@chromium.org>
264
365 Unprefix Blob.webkitSlice
120167

Source/WebCore/bindings/scripts/CodeGenerator.pm

@@sub IsSVGAnimatedType
449449 return 0;
450450}
451451
452 sub GetArrayType
 452sub GetSequenceType
453453{
454454 my $object = shift;
455455 my $type = shift;

@@sub GetArrayType
458458 return "";
459459}
460460
 461sub GetArrayType
 462{
 463 my $object = shift;
 464 my $type = shift;
 465
 466 return $1 if $type =~ /^([\w\d_\s]+)\[\]/;
 467 return "";
 468}
 469
 470sub AssertNotSequenceType
 471{
 472 my $object = shift;
 473 my $type = shift;
 474 die "Sequences must not be used as the type of an attribute, constant or exception field." if $object->GetSequenceType($type);
 475}
 476
461477# Uppercase the first letter while respecting WebKit style guidelines.
462478# E.g., xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang.
463479sub WK_ucfirst
120165

Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm

@@sub SkipFunction
200200 return 1;
201201 }
202202
 203 if ($codeGenerator->GetSequenceType($function->signature->type)) {
 204 return 1;
 205 }
 206
203207 foreach my $param (@{$function->parameters}) {
204  return 1 if $codeGenerator->GetArrayType($param->type);
 208 return 1 if $codeGenerator->GetSequenceType($param->type);
205209 }
206210
207211 # FIXME: This is typically used to add script execution state arguments to the method.

@@sub SkipAttribute
219223
220224 return 1 if $attribute->signature->type =~ /Constructor$/;
221225
222  return 1 if $codeGenerator->GetArrayType($attribute->signature->type);
 226 $codeGenerator->AssertNotSequenceType($attribute->signature->type);
223227
224228 # FIXME: This is typically used to add script execution state arguments to the method.
225229 # These functions will not compile with the C++ bindings as is, so disable them

@@sub AddIncludesForType
285289{
286290 my $type = $codeGenerator->StripModule(shift);
287291
 292 return if $codeGenerator->GetSequenceType($type);
288293 return if $codeGenerator->GetArrayType($type);
289294 return if $codeGenerator->IsNonPointerType($type);
290295 return if $type =~ /Constructor/;
120165

Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

@@sub SkipAttribute {
179179 return 1;
180180 }
181181
 182 $codeGenerator->AssertNotSequenceType($propType);
 183
182184 if ($codeGenerator->GetArrayType($propType)) {
183185 return 1;
184186 }

@@sub SkipFunction {
235237 return 1;
236238 }
237239
238  if ($codeGenerator->GetArrayType($functionReturnType)) {
 240 if ($codeGenerator->GetSequenceType($functionReturnType)) {
239241 return 1;
240242 }
241243

@@sub SkipFunction {
246248 foreach my $param (@{$function->parameters}) {
247249 if ($param->extendedAttributes->{"Callback"} ||
248250 $param->type eq "MediaQueryListListener" ||
249  $codeGenerator->GetArrayType($param->type)) {
 251 $codeGenerator->GetSequenceType($param->type)) {
250252 return 1;
251253 }
252254 }
120165

Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

@@sub AddIncludesForType
268268 $includesRef->{"JS${type}.h"} = 1;
269269 } elsif (IsTypedArrayType($type)) {
270270 $includesRef->{"<wtf/${type}.h>"} = 1;
271  } elsif ($codeGenerator->GetArrayType($type)) {
 271 } elsif ($codeGenerator->GetSequenceType($type)) {
272272 } else {
273273 # default, include the same named file
274274 $includesRef->{"${type}.h"} = 1;

@@sub GenerateImplementation
16901690 if ($numAttributes > 0) {
16911691 foreach my $attribute (@{$dataNode->attributes}) {
16921692 my $name = $attribute->signature->name;
1693  my $type = $codeGenerator->StripModule($attribute->signature->type);
 1693 my $type = $codeGenerator->StripModule($attribute->signature->type);
 1694 $codeGenerator->AssertNotSequenceType($type);
16941695 my $getFunctionName = "js" . $interfaceName . $codeGenerator->WK_ucfirst($attribute->signature->name) . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "");
16951696 my $implGetterFunctionName = $codeGenerator->WK_lcfirst($name);
16961697

@@sub GetNativeType
28532854 return "${svgNativeType}*" if $svgNativeType;
28542855 return $nativeType{$type} if exists $nativeType{$type};
28552856
 2857 my $sequenceType = $codeGenerator->GetSequenceType($type);
 2858 return "Vector<${sequenceType}>" if $sequenceType;
 2859
28562860 # For all other types, the native type is a pointer with same type name as the IDL type.
28572861 return "${type}*";
28582862}

@@sub JSValueToNative
29983002 return "toNativeArray<$arrayType>(exec, $value)";
29993003 }
30003004
 3005 my $sequenceType = $codeGenerator->GetSequenceType($type);
 3006 if ($sequenceType) {
 3007 return "toNativeArray<$sequenceType>(exec, $value)";
 3008 }
 3009
30013010 # Default, assume autogenerated type conversion routines
30023011 AddToImplIncludes("JS$type.h", $conditional);
30033012 return "to$type($value)";

@@sub NativeToJSValue
30673076 return "jsArray(exec, $thisValue->globalObject(), $value)";
30683077 }
30693078
 3079 my $sequenceType = $codeGenerator->GetSequenceType($type);
 3080 if ($sequenceType) {
 3081 if (!$codeGenerator->SkipIncludeHeader($sequenceType)) {
 3082 AddToImplIncludes("JS$sequenceType.h", $conditional);
 3083 AddToImplIncludes("$sequenceType.h", $conditional);
 3084 }
 3085 AddToImplIncludes("<runtime/JSArray.h>", $conditional);
 3086 return "jsArray(exec, $thisValue->globalObject(), $value)";
 3087 }
 3088
30703089 if ($type eq "DOMObject") {
30713090 if ($implClassName eq "Document") {
30723091 AddToImplIncludes("JSCanvasRenderingContext2D.h", $conditional);
120165

Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm

@@sub SkipFunction
451451{
452452 my $function = shift;
453453
 454 return 1 if $codeGenerator->GetSequenceType($function->signature->type);
454455 return 1 if $codeGenerator->GetArrayType($function->signature->type);
455456
456457 foreach my $param (@{$function->parameters}) {
 458 return 1 if $codeGenerator->GetSequenceType($param->type);
457459 return 1 if $codeGenerator->GetArrayType($param->type);
458460 }
459461

@@sub SkipAttribute
464466{
465467 my $attribute = shift;
466468
 469 $codeGenerator->AssertNotSequenceType($attribute->signature->type);
467470 return 1 if $codeGenerator->GetArrayType($attribute->signature->type);
468471
469472 # This is for DynamicsCompressorNode.idl

@@sub AddForwardDeclarationsForType
540543 my $public = shift;
541544
542545 return if $codeGenerator->IsNonPointerType($type);
 546 return if $codeGenerator->GetSequenceType($type);
543547 return if $codeGenerator->GetArrayType($type);
544548
545549 my $class = GetClassName($type);

@@sub AddIncludesForType
562566 my $type = $codeGenerator->StripModule(shift);
563567
564568 return if $codeGenerator->IsNonPointerType($type);
 569 return if $codeGenerator->GetSequenceType($type);
565570 return if $codeGenerator->GetArrayType($type);
566571
567572 if (IsNativeObjCType($type)) {
120165

Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

@@sub GenerateNormalAttrGetter
768768 my $attrExt = $attribute->signature->extendedAttributes;
769769 my $attrName = $attribute->signature->name;
770770 my $attrType = GetTypeFromSignature($attribute->signature);
 771 $codeGenerator->AssertNotSequenceType($attrType);
771772 my $nativeType = GetNativeTypeFromSignature($attribute->signature, -1);
772773
773774 my $getterStringUsesImp = $implClassName ne "SVGNumber";

@@sub GetNativeType
34693470 }
34703471 }
34713472
 3473 my $sequenceType = $codeGenerator->GetSequenceType($type);
 3474 return "Vector<${sequenceType}>" if $sequenceType;
 3475
34723476 if ($type eq "float" or $type eq "double") {
34733477 return $type;
34743478 }

@@sub JSValueToNative
36283632 return "toNativeArray<$arrayType>($value)";
36293633 }
36303634
 3635 my $sequenceType = $codeGenerator->GetSequenceType($type);
 3636 if ($sequenceType) {
 3637 return "toNativeArray<$sequenceType>($value)";
 3638 }
 3639
36313640 AddIncludesForType($type);
36323641
36333642 if (IsDOMNodeType($type)) {

@@sub CreateCustomSignature
36753684 $result .= "v8::Handle<v8::FunctionTemplate>()";
36763685 } else {
36773686 my $type = $parameter->type;
3678  my $arrayType = $codeGenerator->GetArrayType($type);
3679  if ($arrayType) {
3680  AddToImplIncludes("$arrayType.h");
 3687 my $sequenceType = $codeGenerator->GetSequenceType($type);
 3688 if ($sequenceType) {
 3689 if ($codeGenerator->SkipIncludeHeader($sequenceType)) {
 3690 $result .= "v8::Handle<v8::FunctionTemplate>()";
 3691 next;
 3692 }
 3693 AddToImplIncludes("$sequenceType.h");
36813694 } else {
36823695 my $header = GetV8HeaderName($type);
36833696 AddToImplIncludes($header);

@@sub NativeToJSValue
38583871 return "v8Array($value$getIsolateArg)";
38593872 }
38603873
 3874 my $sequenceType = $codeGenerator->GetSequenceType($type);
 3875 if ($sequenceType) {
 3876 if (!$codeGenerator->SkipIncludeHeader($sequenceType)) {
 3877 AddToImplIncludes("V8$sequenceType.h");
 3878 AddToImplIncludes("$sequenceType.h");
 3879 }
 3880 return "v8Array($value, $getIsolate)";
 3881 }
 3882
38613883 AddIncludesForType($type);
38623884
38633885 # special case for non-DOM node interfaces
120165

Source/WebCore/bindings/scripts/test/TestObj.idl

@@module test {
4646 attribute DOMString stringAttr;
4747 attribute TestObj testObjAttr;
4848
49  // Sequence Attributes
50  attribute sequence<ScriptProfile> sequenceAttr;
51  attribute sequence<int> intSequenceAttr;
52  attribute sequence<short> shortSequenceAttr;
53  attribute sequence<long> longSequenceAttr;
54  attribute sequence<long long> longLongSequenceAttr;
55  attribute sequence<unsigned int> unsignedIntSequenceAttr;
56  attribute sequence<unsigned short> unsignedShortSequenceAttr;
57  attribute sequence<unsigned long> unsignedLongSequenceAttr;
58  attribute sequence<unsigned long long> unsignedLongLongSequenceAttr;
59  attribute sequence<float> floatSequenceAttr;
60  attribute sequence<double> doubleSequenceAttr;
61  attribute sequence<boolean> booleanSequenceAttr;
62  attribute sequence<void> voidSequenceAttr;
63  attribute sequence<Date> dateSequenceAttr;
64 
6549 JS, V8
6650 // WK_ucfirst, WK_lcfirst exceptional cases.
6751 attribute TestObj XMLObjAttr;
120165

Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

@@static const HashTableValue JSTestObjTab
8989 { "unsignedLongLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t)setJSTestObjUnsignedLongLongAttr, NoIntrinsic },
9090 { "stringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t)setJSTestObjStringAttr, NoIntrinsic },
9191 { "testObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t)setJSTestObjTestObjAttr, NoIntrinsic },
92  { "sequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjSequenceAttr), (intptr_t)setJSTestObjSequenceAttr, NoIntrinsic },
93  { "intSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjIntSequenceAttr), (intptr_t)setJSTestObjIntSequenceAttr, NoIntrinsic },
94  { "shortSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjShortSequenceAttr), (intptr_t)setJSTestObjShortSequenceAttr, NoIntrinsic },
95  { "longSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongSequenceAttr), (intptr_t)setJSTestObjLongSequenceAttr, NoIntrinsic },
96  { "longLongSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongSequenceAttr), (intptr_t)setJSTestObjLongLongSequenceAttr, NoIntrinsic },
97  { "unsignedIntSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedIntSequenceAttr), (intptr_t)setJSTestObjUnsignedIntSequenceAttr, NoIntrinsic },
98  { "unsignedShortSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedShortSequenceAttr), (intptr_t)setJSTestObjUnsignedShortSequenceAttr, NoIntrinsic },
99  { "unsignedLongSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongSequenceAttr), (intptr_t)setJSTestObjUnsignedLongSequenceAttr, NoIntrinsic },
100  { "unsignedLongLongSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongSequenceAttr), (intptr_t)setJSTestObjUnsignedLongLongSequenceAttr, NoIntrinsic },
101  { "floatSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjFloatSequenceAttr), (intptr_t)setJSTestObjFloatSequenceAttr, NoIntrinsic },
102  { "doubleSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDoubleSequenceAttr), (intptr_t)setJSTestObjDoubleSequenceAttr, NoIntrinsic },
103  { "booleanSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjBooleanSequenceAttr), (intptr_t)setJSTestObjBooleanSequenceAttr, NoIntrinsic },
104  { "voidSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjVoidSequenceAttr), (intptr_t)setJSTestObjVoidSequenceAttr, NoIntrinsic },
105  { "dateSequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDateSequenceAttr), (intptr_t)setJSTestObjDateSequenceAttr, NoIntrinsic },
10692 { "XMLObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t)setJSTestObjXMLObjAttr, NoIntrinsic },
10793 { "create", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t)setJSTestObjCreate, NoIntrinsic },
10894 { "reflectedStringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t)setJSTestObjReflectedStringAttr, NoIntrinsic },

@@static const HashTableValue JSTestObjTab
159145 { 0, 0, 0, 0, NoIntrinsic }
160146};
161147
162 static const HashTable JSTestObjTable = { 265, 255, JSTestObjTableValues, 0 };
 148static const HashTable JSTestObjTable = { 138, 127, JSTestObjTableValues, 0 };
163149/* Hash table for constructor */
164150
165151static const HashTableValue JSTestObjConstructorTableValues[] =

@@JSValue jsTestObjTestObjAttr(ExecState*
493479}
494480
495481
496 JSValue jsTestObjSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
497 {
498  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
499  UNUSED_PARAM(exec);
500  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
501  JSValue result = jsArray(exec, castedThis->globalObject(), impl->sequenceAttr());
502  return result;
503 }
504 
505 
506 JSValue jsTestObjIntSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
507 {
508  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
509  UNUSED_PARAM(exec);
510  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
511  JSValue result = jsArray(exec, castedThis->globalObject(), impl->intSequenceAttr());
512  return result;
513 }
514 
515 
516 JSValue jsTestObjShortSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
517 {
518  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
519  UNUSED_PARAM(exec);
520  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
521  JSValue result = jsArray(exec, castedThis->globalObject(), impl->shortSequenceAttr());
522  return result;
523 }
524 
525 
526 JSValue jsTestObjLongSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
527 {
528  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
529  UNUSED_PARAM(exec);
530  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
531  JSValue result = jsArray(exec, castedThis->globalObject(), impl->longSequenceAttr());
532  return result;
533 }
534 
535 
536 JSValue jsTestObjLongLongSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
537 {
538  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
539  UNUSED_PARAM(exec);
540  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
541  JSValue result = jsArray(exec, castedThis->globalObject(), impl->longLongSequenceAttr());
542  return result;
543 }
544 
545 
546 JSValue jsTestObjUnsignedIntSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
547 {
548  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
549  UNUSED_PARAM(exec);
550  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
551  JSValue result = jsArray(exec, castedThis->globalObject(), impl->unsignedIntSequenceAttr());
552  return result;
553 }
554 
555 
556 JSValue jsTestObjUnsignedShortSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
557 {
558  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
559  UNUSED_PARAM(exec);
560  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
561  JSValue result = jsArray(exec, castedThis->globalObject(), impl->unsignedShortSequenceAttr());
562  return result;
563 }
564 
565 
566 JSValue jsTestObjUnsignedLongSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
567 {
568  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
569  UNUSED_PARAM(exec);
570  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
571  JSValue result = jsArray(exec, castedThis->globalObject(), impl->unsignedLongSequenceAttr());
572  return result;
573 }
574 
575 
576 JSValue jsTestObjUnsignedLongLongSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
577 {
578  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
579  UNUSED_PARAM(exec);
580  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
581  JSValue result = jsArray(exec, castedThis->globalObject(), impl->unsignedLongLongSequenceAttr());
582  return result;
583 }
584 
585 
586 JSValue jsTestObjFloatSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
587 {
588  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
589  UNUSED_PARAM(exec);
590  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
591  JSValue result = jsArray(exec, castedThis->globalObject(), impl->floatSequenceAttr());
592  return result;
593 }
594 
595 
596 JSValue jsTestObjDoubleSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
597 {
598  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
599  UNUSED_PARAM(exec);
600  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
601  JSValue result = jsArray(exec, castedThis->globalObject(), impl->doubleSequenceAttr());
602  return result;
603 }
604 
605 
606 JSValue jsTestObjBooleanSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
607 {
608  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
609  UNUSED_PARAM(exec);
610  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
611  JSValue result = jsArray(exec, castedThis->globalObject(), impl->booleanSequenceAttr());
612  return result;
613 }
614 
615 
616 JSValue jsTestObjVoidSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
617 {
618  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
619  UNUSED_PARAM(exec);
620  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
621  JSValue result = jsArray(exec, castedThis->globalObject(), impl->voidSequenceAttr());
622  return result;
623 }
624 
625 
626 JSValue jsTestObjDateSequenceAttr(ExecState* exec, JSValue slotBase, PropertyName)
627 {
628  JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
629  UNUSED_PARAM(exec);
630  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
631  JSValue result = jsArray(exec, castedThis->globalObject(), impl->dateSequenceAttr());
632  return result;
633 }
634 
635 
636482JSValue jsTestObjXMLObjAttr(ExecState* exec, JSValue slotBase, PropertyName)
637483{
638484 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));

@@void setJSTestObjTestObjAttr(ExecState*
1129975}
1130976
1131977
1132 void setJSTestObjSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1133 {
1134  UNUSED_PARAM(exec);
1135  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1136  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1137  impl->setSequenceAttr(toNativeArray<ScriptProfile>(exec, value));
1138 }
1139 
1140 
1141 void setJSTestObjIntSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1142 {
1143  UNUSED_PARAM(exec);
1144  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1145  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1146  impl->setIntSequenceAttr(toNativeArray<int>(exec, value));
1147 }
1148 
1149 
1150 void setJSTestObjShortSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1151 {
1152  UNUSED_PARAM(exec);
1153  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1154  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1155  impl->setShortSequenceAttr(toNativeArray<short>(exec, value));
1156 }
1157 
1158 
1159 void setJSTestObjLongSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1160 {
1161  UNUSED_PARAM(exec);
1162  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1163  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1164  impl->setLongSequenceAttr(toNativeArray<long>(exec, value));
1165 }
1166 
1167 
1168 void setJSTestObjLongLongSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1169 {
1170  UNUSED_PARAM(exec);
1171  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1172  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1173  impl->setLongLongSequenceAttr(toNativeArray<long long>(exec, value));
1174 }
1175 
1176 
1177 void setJSTestObjUnsignedIntSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1178 {
1179  UNUSED_PARAM(exec);
1180  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1181  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1182  impl->setUnsignedIntSequenceAttr(toNativeArray<unsigned int>(exec, value));
1183 }
1184 
1185 
1186 void setJSTestObjUnsignedShortSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1187 {
1188  UNUSED_PARAM(exec);
1189  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1190  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1191  impl->setUnsignedShortSequenceAttr(toNativeArray<unsigned short>(exec, value));
1192 }
1193 
1194 
1195 void setJSTestObjUnsignedLongSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1196 {
1197  UNUSED_PARAM(exec);
1198  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1199  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1200  impl->setUnsignedLongSequenceAttr(toNativeArray<unsigned long>(exec, value));
1201 }
1202 
1203 
1204 void setJSTestObjUnsignedLongLongSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1205 {
1206  UNUSED_PARAM(exec);
1207  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1208  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1209  impl->setUnsignedLongLongSequenceAttr(toNativeArray<unsigned long long>(exec, value));
1210 }
1211 
1212 
1213 void setJSTestObjFloatSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1214 {
1215  UNUSED_PARAM(exec);
1216  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1217  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1218  impl->setFloatSequenceAttr(toNativeArray<float>(exec, value));
1219 }
1220 
1221 
1222 void setJSTestObjDoubleSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1223 {
1224  UNUSED_PARAM(exec);
1225  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1226  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1227  impl->setDoubleSequenceAttr(toNativeArray<double>(exec, value));
1228 }
1229 
1230 
1231 void setJSTestObjBooleanSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1232 {
1233  UNUSED_PARAM(exec);
1234  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1235  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1236  impl->setBooleanSequenceAttr(toNativeArray<boolean>(exec, value));
1237 }
1238 
1239 
1240 void setJSTestObjVoidSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1241 {
1242  UNUSED_PARAM(exec);
1243  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1244  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1245  impl->setVoidSequenceAttr(toNativeArray<void>(exec, value));
1246 }
1247 
1248 
1249 void setJSTestObjDateSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1250 {
1251  UNUSED_PARAM(exec);
1252  JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1253  TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1254  impl->setDateSequenceAttr(toNativeArray<Date>(exec, value));
1255 }
1256 
1257 
1258978void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1259979{
1260980 UNUSED_PARAM(exec);

@@EncodedJSValue JSC_HOST_CALL jsTestObjPr
17311451 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
17321452 if (exec->argumentCount() < 1)
17331453 return throwVMError(exec, createNotEnoughArgumentsError(exec));
1734  sequence<ScriptProfile>* sequenceArg(toNativeArray<ScriptProfile>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
 1454 Vector<ScriptProfile> sequenceArg(toNativeArray<ScriptProfile>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
17351455 if (exec->hadException())
17361456 return JSValue::encode(jsUndefined());
17371457 impl->methodWithSequenceArg(sequenceArg);
120165

Source/WebCore/bindings/scripts/test/JS/JSTestObj.h

@@JSC::JSValue jsTestObjStringAttr(JSC::Ex
233233void setJSTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
234234JSC::JSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
235235void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
236 JSC::JSValue jsTestObjSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
237 void setJSTestObjSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
238 JSC::JSValue jsTestObjIntSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
239 void setJSTestObjIntSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
240 JSC::JSValue jsTestObjShortSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
241 void setJSTestObjShortSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
242 JSC::JSValue jsTestObjLongSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
243 void setJSTestObjLongSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
244 JSC::JSValue jsTestObjLongLongSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
245 void setJSTestObjLongLongSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
246 JSC::JSValue jsTestObjUnsignedIntSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
247 void setJSTestObjUnsignedIntSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
248 JSC::JSValue jsTestObjUnsignedShortSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
249 void setJSTestObjUnsignedShortSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
250 JSC::JSValue jsTestObjUnsignedLongSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
251 void setJSTestObjUnsignedLongSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
252 JSC::JSValue jsTestObjUnsignedLongLongSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
253 void setJSTestObjUnsignedLongLongSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
254 JSC::JSValue jsTestObjFloatSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
255 void setJSTestObjFloatSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
256 JSC::JSValue jsTestObjDoubleSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
257 void setJSTestObjDoubleSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
258 JSC::JSValue jsTestObjBooleanSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
259 void setJSTestObjBooleanSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
260 JSC::JSValue jsTestObjVoidSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
261 void setJSTestObjVoidSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
262 JSC::JSValue jsTestObjDateSequenceAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
263 void setJSTestObjDateSequenceAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
264236JSC::JSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
265237void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
266238JSC::JSValue jsTestObjCreate(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
120165

Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

@@static void testObjAttrAttrSetter(v8::Lo
220220 return;
221221}
222222
223 static v8::Handle<v8::Value> sequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
224 {
225  INC_STATS("DOM.TestObj.sequenceAttr._get");
226  TestObj* imp = V8TestObj::toNative(info.Holder());
227  return v8Array(imp->sequenceAttr(), info.GetIsolate());
228 }
229 
230 static void sequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
231 {
232  INC_STATS("DOM.TestObj.sequenceAttr._set");
233  TestObj* imp = V8TestObj::toNative(info.Holder());
234  Vector<ScriptProfile> v = toNativeArray<ScriptProfile>(value);
235  imp->setSequenceAttr(v);
236  return;
237 }
238 
239 static v8::Handle<v8::Value> intSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
240 {
241  INC_STATS("DOM.TestObj.intSequenceAttr._get");
242  TestObj* imp = V8TestObj::toNative(info.Holder());
243  return v8Array(imp->intSequenceAttr(), info.GetIsolate());
244 }
245 
246 static void intSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
247 {
248  INC_STATS("DOM.TestObj.intSequenceAttr._set");
249  TestObj* imp = V8TestObj::toNative(info.Holder());
250  Vector<int> v = toNativeArray<int>(value);
251  imp->setIntSequenceAttr(v);
252  return;
253 }
254 
255 static v8::Handle<v8::Value> shortSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
256 {
257  INC_STATS("DOM.TestObj.shortSequenceAttr._get");
258  TestObj* imp = V8TestObj::toNative(info.Holder());
259  return v8Array(imp->shortSequenceAttr(), info.GetIsolate());
260 }
261 
262 static void shortSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
263 {
264  INC_STATS("DOM.TestObj.shortSequenceAttr._set");
265  TestObj* imp = V8TestObj::toNative(info.Holder());
266  Vector<short> v = toNativeArray<short>(value);
267  imp->setShortSequenceAttr(v);
268  return;
269 }
270 
271 static v8::Handle<v8::Value> longSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
272 {
273  INC_STATS("DOM.TestObj.longSequenceAttr._get");
274  TestObj* imp = V8TestObj::toNative(info.Holder());
275  return v8Array(imp->longSequenceAttr(), info.GetIsolate());
276 }
277 
278 static void longSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
279 {
280  INC_STATS("DOM.TestObj.longSequenceAttr._set");
281  TestObj* imp = V8TestObj::toNative(info.Holder());
282  Vector<long> v = toNativeArray<long>(value);
283  imp->setLongSequenceAttr(v);
284  return;
285 }
286 
287 static v8::Handle<v8::Value> longLongSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
288 {
289  INC_STATS("DOM.TestObj.longLongSequenceAttr._get");
290  TestObj* imp = V8TestObj::toNative(info.Holder());
291  return v8Array(imp->longLongSequenceAttr(), info.GetIsolate());
292 }
293 
294 static void longLongSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
295 {
296  INC_STATS("DOM.TestObj.longLongSequenceAttr._set");
297  TestObj* imp = V8TestObj::toNative(info.Holder());
298  Vector<long long> v = toNativeArray<long long>(value);
299  imp->setLongLongSequenceAttr(v);
300  return;
301 }
302 
303 static v8::Handle<v8::Value> unsignedIntSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
304 {
305  INC_STATS("DOM.TestObj.unsignedIntSequenceAttr._get");
306  TestObj* imp = V8TestObj::toNative(info.Holder());
307  return v8Array(imp->unsignedIntSequenceAttr(), info.GetIsolate());
308 }
309 
310 static void unsignedIntSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
311 {
312  INC_STATS("DOM.TestObj.unsignedIntSequenceAttr._set");
313  TestObj* imp = V8TestObj::toNative(info.Holder());
314  Vector<unsigned int> v = toNativeArray<unsigned int>(value);
315  imp->setUnsignedIntSequenceAttr(v);
316  return;
317 }
318 
319 static v8::Handle<v8::Value> unsignedShortSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
320 {
321  INC_STATS("DOM.TestObj.unsignedShortSequenceAttr._get");
322  TestObj* imp = V8TestObj::toNative(info.Holder());
323  return v8Array(imp->unsignedShortSequenceAttr(), info.GetIsolate());
324 }
325 
326 static void unsignedShortSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
327 {
328  INC_STATS("DOM.TestObj.unsignedShortSequenceAttr._set");
329  TestObj* imp = V8TestObj::toNative(info.Holder());
330  Vector<unsigned short> v = toNativeArray<unsigned short>(value);
331  imp->setUnsignedShortSequenceAttr(v);
332  return;
333 }
334 
335 static v8::Handle<v8::Value> unsignedLongSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
336 {
337  INC_STATS("DOM.TestObj.unsignedLongSequenceAttr._get");
338  TestObj* imp = V8TestObj::toNative(info.Holder());
339  return v8Array(imp->unsignedLongSequenceAttr(), info.GetIsolate());
340 }
341 
342 static void unsignedLongSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
343 {
344  INC_STATS("DOM.TestObj.unsignedLongSequenceAttr._set");
345  TestObj* imp = V8TestObj::toNative(info.Holder());
346  Vector<unsigned long> v = toNativeArray<unsigned long>(value);
347  imp->setUnsignedLongSequenceAttr(v);
348  return;
349 }
350 
351 static v8::Handle<v8::Value> unsignedLongLongSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
352 {
353  INC_STATS("DOM.TestObj.unsignedLongLongSequenceAttr._get");
354  TestObj* imp = V8TestObj::toNative(info.Holder());
355  return v8Array(imp->unsignedLongLongSequenceAttr(), info.GetIsolate());
356 }
357 
358 static void unsignedLongLongSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
359 {
360  INC_STATS("DOM.TestObj.unsignedLongLongSequenceAttr._set");
361  TestObj* imp = V8TestObj::toNative(info.Holder());
362  Vector<unsigned long long> v = toNativeArray<unsigned long long>(value);
363  imp->setUnsignedLongLongSequenceAttr(v);
364  return;
365 }
366 
367 static v8::Handle<v8::Value> floatSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
368 {
369  INC_STATS("DOM.TestObj.floatSequenceAttr._get");
370  TestObj* imp = V8TestObj::toNative(info.Holder());
371  return v8Array(imp->floatSequenceAttr(), info.GetIsolate());
372 }
373 
374 static void floatSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
375 {
376  INC_STATS("DOM.TestObj.floatSequenceAttr._set");
377  TestObj* imp = V8TestObj::toNative(info.Holder());
378  Vector<float> v = toNativeArray<float>(value);
379  imp->setFloatSequenceAttr(v);
380  return;
381 }
382 
383 static v8::Handle<v8::Value> doubleSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
384 {
385  INC_STATS("DOM.TestObj.doubleSequenceAttr._get");
386  TestObj* imp = V8TestObj::toNative(info.Holder());
387  return v8Array(imp->doubleSequenceAttr(), info.GetIsolate());
388 }
389 
390 static void doubleSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
391 {
392  INC_STATS("DOM.TestObj.doubleSequenceAttr._set");
393  TestObj* imp = V8TestObj::toNative(info.Holder());
394  Vector<double> v = toNativeArray<double>(value);
395  imp->setDoubleSequenceAttr(v);
396  return;
397 }
398 
399 static v8::Handle<v8::Value> booleanSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
400 {
401  INC_STATS("DOM.TestObj.booleanSequenceAttr._get");
402  TestObj* imp = V8TestObj::toNative(info.Holder());
403  return v8Array(imp->booleanSequenceAttr(), info.GetIsolate());
404 }
405 
406 static void booleanSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
407 {
408  INC_STATS("DOM.TestObj.booleanSequenceAttr._set");
409  TestObj* imp = V8TestObj::toNative(info.Holder());
410  Vector<boolean> v = toNativeArray<boolean>(value);
411  imp->setBooleanSequenceAttr(v);
412  return;
413 }
414 
415 static v8::Handle<v8::Value> voidSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
416 {
417  INC_STATS("DOM.TestObj.voidSequenceAttr._get");
418  TestObj* imp = V8TestObj::toNative(info.Holder());
419  return v8Array(imp->voidSequenceAttr(), info.GetIsolate());
420 }
421 
422 static void voidSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
423 {
424  INC_STATS("DOM.TestObj.voidSequenceAttr._set");
425  TestObj* imp = V8TestObj::toNative(info.Holder());
426  Vector<void> v = toNativeArray<void>(value);
427  imp->setVoidSequenceAttr(v);
428  return;
429 }
430 
431 static v8::Handle<v8::Value> dateSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
432 {
433  INC_STATS("DOM.TestObj.dateSequenceAttr._get");
434  TestObj* imp = V8TestObj::toNative(info.Holder());
435  return v8Array(imp->dateSequenceAttr(), info.GetIsolate());
436 }
437 
438 static void dateSequenceAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
439 {
440  INC_STATS("DOM.TestObj.dateSequenceAttr._set");
441  TestObj* imp = V8TestObj::toNative(info.Holder());
442  Vector<Date> v = toNativeArray<Date>(value);
443  imp->setDateSequenceAttr(v);
444  return;
445 }
446 
447223static v8::Handle<v8::Value> XMLObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
448224{
449225 INC_STATS("DOM.TestObj.XMLObjAttr._get");

@@static v8::Handle<v8::Value> methodWithS
13061082 if (args.Length() < 1)
13071083 return V8Proxy::throwNotEnoughArgumentsError(args.GetIsolate());
13081084 TestObj* imp = V8TestObj::toNative(args.Holder());
1309  EXCEPTION_BLOCK(sequence<ScriptProfile>*, sequenceArg, toNativeArray<ScriptProfile>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
 1085 EXCEPTION_BLOCK(Vector<ScriptProfile>, sequenceArg, toNativeArray<ScriptProfile>(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
13101086 imp->methodWithSequenceArg(sequenceArg);
13111087 return v8::Handle<v8::Value>();
13121088}

@@static const BatchedAttribute TestObjAtt
20341810 {"stringAttr", TestObjV8Internal::stringAttrAttrGetter, TestObjV8Internal::stringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
20351811 // Attribute 'testObjAttr' (Type: 'attribute' ExtAttr: '')
20361812 {"testObjAttr", TestObjV8Internal::testObjAttrAttrGetter, TestObjV8Internal::testObjAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2037  // Attribute 'sequenceAttr' (Type: 'attribute' ExtAttr: '')
2038  {"sequenceAttr", TestObjV8Internal::sequenceAttrAttrGetter, TestObjV8Internal::sequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2039  // Attribute 'intSequenceAttr' (Type: 'attribute' ExtAttr: '')
2040  {"intSequenceAttr", TestObjV8Internal::intSequenceAttrAttrGetter, TestObjV8Internal::intSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2041  // Attribute 'shortSequenceAttr' (Type: 'attribute' ExtAttr: '')
2042  {"shortSequenceAttr", TestObjV8Internal::shortSequenceAttrAttrGetter, TestObjV8Internal::shortSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2043  // Attribute 'longSequenceAttr' (Type: 'attribute' ExtAttr: '')
2044  {"longSequenceAttr", TestObjV8Internal::longSequenceAttrAttrGetter, TestObjV8Internal::longSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2045  // Attribute 'longLongSequenceAttr' (Type: 'attribute' ExtAttr: '')
2046  {"longLongSequenceAttr", TestObjV8Internal::longLongSequenceAttrAttrGetter, TestObjV8Internal::longLongSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2047  // Attribute 'unsignedIntSequenceAttr' (Type: 'attribute' ExtAttr: '')
2048  {"unsignedIntSequenceAttr", TestObjV8Internal::unsignedIntSequenceAttrAttrGetter, TestObjV8Internal::unsignedIntSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2049  // Attribute 'unsignedShortSequenceAttr' (Type: 'attribute' ExtAttr: '')
2050  {"unsignedShortSequenceAttr", TestObjV8Internal::unsignedShortSequenceAttrAttrGetter, TestObjV8Internal::unsignedShortSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2051  // Attribute 'unsignedLongSequenceAttr' (Type: 'attribute' ExtAttr: '')
2052  {"unsignedLongSequenceAttr", TestObjV8Internal::unsignedLongSequenceAttrAttrGetter, TestObjV8Internal::unsignedLongSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2053  // Attribute 'unsignedLongLongSequenceAttr' (Type: 'attribute' ExtAttr: '')
2054  {"unsignedLongLongSequenceAttr", TestObjV8Internal::unsignedLongLongSequenceAttrAttrGetter, TestObjV8Internal::unsignedLongLongSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2055  // Attribute 'floatSequenceAttr' (Type: 'attribute' ExtAttr: '')
2056  {"floatSequenceAttr", TestObjV8Internal::floatSequenceAttrAttrGetter, TestObjV8Internal::floatSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2057  // Attribute 'doubleSequenceAttr' (Type: 'attribute' ExtAttr: '')
2058  {"doubleSequenceAttr", TestObjV8Internal::doubleSequenceAttrAttrGetter, TestObjV8Internal::doubleSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2059  // Attribute 'booleanSequenceAttr' (Type: 'attribute' ExtAttr: '')
2060  {"booleanSequenceAttr", TestObjV8Internal::booleanSequenceAttrAttrGetter, TestObjV8Internal::booleanSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2061  // Attribute 'voidSequenceAttr' (Type: 'attribute' ExtAttr: '')
2062  {"voidSequenceAttr", TestObjV8Internal::voidSequenceAttrAttrGetter, TestObjV8Internal::voidSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2063  // Attribute 'dateSequenceAttr' (Type: 'attribute' ExtAttr: '')
2064  {"dateSequenceAttr", TestObjV8Internal::dateSequenceAttrAttrGetter, TestObjV8Internal::dateSequenceAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
20651813 // Attribute 'XMLObjAttr' (Type: 'attribute' ExtAttr: '')
20661814 {"XMLObjAttr", TestObjV8Internal::XMLObjAttrAttrGetter, TestObjV8Internal::XMLObjAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
20671815 // Attribute 'create' (Type: 'attribute' ExtAttr: '')
120165

Source/WebCore/inspector/ScriptProfileNode.idl

@@module core {
3737 readonly attribute double totalTime;
3838 readonly attribute double selfTime;
3939 readonly attribute unsigned long numberOfCalls;
40  readonly attribute sequence<ScriptProfileNode> children;
 40 sequence<ScriptProfileNode> children();
4141 readonly attribute boolean visible;
4242 readonly attribute [CustomGetter] unsigned long callUID;
4343 };
120165

Source/WebCore/page/Console.idl

@@module window {
4646 [CallWith=ScriptArguments|CallStack] void markTimeline();
4747
4848#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
49  readonly attribute sequence<ScriptProfile> profiles;
 49 // As per spec: http://www.w3.org/TR/WebIDL/#idl-sequence
 50 // "Sequences must not be used as the type of an attribute, constant or exception field."
 51 // FIXME: this will lead to BUG console.profiles !== console.profiles as profile will always returns new array.
 52 readonly attribute ScriptProfile[] profiles;
5053 [Custom] void profile(in DOMString title);
5154 [Custom] void profileEnd(in DOMString title);
5255#endif
120165

Source/WebCore/testing/Internals.idl

@@module window {
114114 boolean shouldDisplayTrackKind(in Document document, in DOMString trackKind) raises (DOMException);
115115#endif
116116
117  attribute sequence<String> userPreferredLanguages;
 117 sequence<String> userPreferredLanguages();
 118 void setUserPreferredLanguages(in sequence<String> languages);
118119
119120 unsigned long wheelEventHandlerCount(in Document document) raises (DOMException);
120121 unsigned long touchEventHandlerCount(in Document document) raises (DOMException);
120165

LayoutTests/ChangeLog

 12012-06-13 Vineet Chaudhary <vineet.chaudhary@motorola.com>
 2
 3 REGRESSION:Bindings sequence<T> in Console.idl, Internals.idl and ScriptProfileNode.idl should be T[]
 4 https://bugs.webkit.org/show_bug.cgi?id=84863
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 With reference to http://www.w3.org/TR/WebIDL/#idl-sequence
 9 "Sequences must not be used as the type of an attribute, constant or exception field."
 10 So we should use T[] instead of sequence<T>.
 11
 12 * fast/harness/user-preferred-language.html: Using getter and setter
 13 for userPreferredLanguages.
 14 * inspector/profiler/cpu-profiler-profiling-without-inspector.html:
 15 Use ScriptProfileNode.children as function.
 16 * media/track/track-language-preference-expected.txt:
 17 * media/track/track-language-preference.html: Using setter for
 18 userPreferredLanguages.
 19
1202012-06-12 Ryosuke Niwa <rniwa@webkit.org>
221
322 HTTP tests should use testRunner instead of layoutTestController
120167

LayoutTests/fast/harness/user-preferred-language.html

1515
1616 function runTest()
1717 {
18  var languages = internals.userPreferredLanguages;
 18 var languages = internals.userPreferredLanguages();
1919
2020 test('internals.userPreferredLanguages returns a non-empty array', languages.length);
2121
2222 languages.unshift("first-language");
2323 languages.push("last-language");
24  internals.userPreferredLanguages = languages;
 24 internals.setUserPreferredLanguages(languages);
2525
26  var newLanguages = internals.userPreferredLanguages;
 26 var newLanguages = internals.userPreferredLanguages();
2727 var sameContents = newLanguages.length == languages.length;
2828 if (sameContents) {
2929 for (var i = 0; i < newLanguages.length; i++) {
120165

LayoutTests/inspector/profiler/cpu-profiler-profiling-without-inspector.html

@@function printProfileNodeWithoutTime(pre
5555 var line = space + node.functionName + " (line " + node.lineNumber + ")\n";
5656 preElement.appendChild(document.createTextNode(line));
5757
58  var children = node.children;
 58 var children = node.children();
5959 for (var i = 0; i < children.length; ++i)
6060 printProfileNodeWithoutTime(preElement, children[i], space + " ");
6161}

@@function findFunctionInProfile(node, fun
6464{
6565 if (node.functionName === functionName)
6666 return true;
67  var children = node.children;
 67 var children = node.children();
6868 for (var i = 0; i < children.length; ++i)
6969 if (findFunctionInProfile(children[i], functionName))
7070 return true;
120165

LayoutTests/media/track/track-language-preference-expected.txt

@@Tests that the user's preferred language
22
33**Set track preferences and user preferred languages
44RUN(internals.setShouldDisplayTrackKind(document, 'Captions', true))
5 RUN(internals.userPreferredLanguages = ['jp', 'es-ES', 'en', 'fr'])
 5RUN(internals.setUserPreferredLanguages(['jp', 'es-ES', 'en', 'fr']))
66
77Test: a track language matches one of the user's preferred languages exactly.
88- creating tracks for: [fr,en,jp].
120165

LayoutTests/media/track/track-language-preference.html

7676
7777 consoleWrite("<i>**Set track preferences and user preferred languages<" + "/i>");
7878 run("internals.setShouldDisplayTrackKind(document, 'Captions', true)");
79  run("internals.userPreferredLanguages = ['jp', 'es-ES', 'en', 'fr']");
 79 run("internals.setUserPreferredLanguages(['jp', 'es-ES', 'en', 'fr'])");
8080 }
8181
8282 function createTrackElement(language, src)
120165