Changeset 146534 in webkit


Ignore:
Timestamp:
Mar 21, 2013 3:52:24 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[V8] Generate specialized callbacks for the main world
https://bugs.webkit.org/show_bug.cgi?id=112430

Patch by Marja Hölttä <marja@chromium.org> on 2013-03-21
Reviewed by Jochen Eisinger.

The new specialized bindings will be faster, because they don't need to
do the "main world, isolated world or a worker" check, but can right
away assume that we're in the main world.

This patch generates main world bindings for getters and setters of Node,
Element and Document.

No new tests (updated existing binding tests).

  • bindings/scripts/CodeGeneratorV8.pm:

(GenerateOverloadedFunction):
(GenerateFunctionCallback):
(GenerateFunction):
(GenerateParametersCheck):
(GenerateSingleConstructorCallback):
(GenerateNonStandardFunction):
(GenerateImplementation):
(GenerateFunctionCallString):

  • bindings/scripts/test/V8/V8Float64Array.cpp:

(WebCore):

  • bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:

(WebCore):

  • bindings/scripts/test/V8/V8TestEventTarget.cpp:

(WebCore):

  • bindings/scripts/test/V8/V8TestInterface.cpp:

(WebCore):

  • bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:

(WebCore):

  • bindings/scripts/test/V8/V8TestObj.cpp:

(WebCore):

  • bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:

(WebCore):

  • bindings/scripts/test/V8/V8TestTypedefs.cpp:

(WebCore):

  • bindings/v8/V8DOMConfiguration.cpp:

(WebCore::V8DOMConfiguration::batchConfigureCallbacks):
(WebCore::V8DOMConfiguration::configureTemplate):

  • bindings/v8/V8DOMConfiguration.h:

(BatchedMethod):
(V8DOMConfiguration):

  • dom/Document.idl:
  • dom/Element.idl:
  • dom/Node.idl:
Location:
trunk/Source/WebCore
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r146533 r146534  
     12013-03-21  Marja Hölttä  <marja@chromium.org>
     2
     3        [V8] Generate specialized callbacks for the main world
     4        https://bugs.webkit.org/show_bug.cgi?id=112430
     5
     6        Reviewed by Jochen Eisinger.
     7
     8        The new specialized bindings will be faster, because they don't need to
     9        do the "main world, isolated world or a worker" check, but can right
     10        away assume that we're in the main world.
     11
     12        This patch generates main world bindings for getters and setters of Node,
     13        Element and Document.
     14
     15        No new tests (updated existing binding tests).
     16
     17        * bindings/scripts/CodeGeneratorV8.pm:
     18        (GenerateOverloadedFunction):
     19        (GenerateFunctionCallback):
     20        (GenerateFunction):
     21        (GenerateParametersCheck):
     22        (GenerateSingleConstructorCallback):
     23        (GenerateNonStandardFunction):
     24        (GenerateImplementation):
     25        (GenerateFunctionCallString):
     26        * bindings/scripts/test/V8/V8Float64Array.cpp:
     27        (WebCore):
     28        * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
     29        (WebCore):
     30        * bindings/scripts/test/V8/V8TestEventTarget.cpp:
     31        (WebCore):
     32        * bindings/scripts/test/V8/V8TestInterface.cpp:
     33        (WebCore):
     34        * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
     35        (WebCore):
     36        * bindings/scripts/test/V8/V8TestObj.cpp:
     37        (WebCore):
     38        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
     39        (WebCore):
     40        * bindings/scripts/test/V8/V8TestTypedefs.cpp:
     41        (WebCore):
     42        * bindings/v8/V8DOMConfiguration.cpp:
     43        (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
     44        (WebCore::V8DOMConfiguration::configureTemplate):
     45        * bindings/v8/V8DOMConfiguration.h:
     46        (BatchedMethod):
     47        (V8DOMConfiguration):
     48        * dom/Document.idl:
     49        * dom/Element.idl:
     50        * dom/Node.idl:
     51
    1522013-03-21  Elliott Sprehn  <esprehn@chromium.org>
    253
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r146281 r146534  
    15571557    my $function = shift;
    15581558    my $interface = shift;
     1559    my $forMainWorldSuffix = shift;
    15591560    my $interfaceName = $interface->name;
    15601561
     
    15701571    push(@implContentInternals, "#if ${conditionalString}\n\n") if $conditionalString;
    15711572    push(@implContentInternals, <<END);
    1572 static v8::Handle<v8::Value> ${name}Method(const v8::Arguments& args)
     1573static v8::Handle<v8::Value> ${name}Method${forMainWorldSuffix}(const v8::Arguments& args)
    15731574{
    15741575END
     
    15801581        push(@implContentInternals, "    if ($parametersCheck)\n");
    15811582        my $overloadedIndexString = $overload->{overloadIndex};
    1582         push(@implContentInternals, "        return ${name}${overloadedIndexString}Method(args);\n");
     1583        push(@implContentInternals, "        return ${name}${overloadedIndexString}Method${forMainWorldSuffix}(args);\n");
    15831584    }
    15841585    if ($leastNumMandatoryParams >= 1) {
     
    15971598    my $function = shift;
    15981599    my $interface = shift;
     1600    my $forMainWorldSuffix = shift;
    15991601
    16001602    my $interfaceName = $interface->name;
     
    16051607    push(@implContentInternals, "#if ${conditionalString}\n\n") if $conditionalString;
    16061608    push(@implContentInternals, <<END);
    1607 static v8::Handle<v8::Value> ${name}MethodCallback(const v8::Arguments& args)
     1609static v8::Handle<v8::Value> ${name}MethodCallback${forMainWorldSuffix}(const v8::Arguments& args)
    16081610{
    16091611END
     
    16121614        push(@implContentInternals, "    return ${v8InterfaceName}::${name}MethodCustom(args);\n");
    16131615    } else {
    1614         push(@implContentInternals, "    return ${interfaceName}V8Internal::${name}Method(args);\n");
     1616        push(@implContentInternals, "    return ${interfaceName}V8Internal::${name}Method${forMainWorldSuffix}(args);\n");
    16151617    }
    16161618    push(@implContentInternals, "}\n\n");
     
    16221624    my $function = shift;
    16231625    my $interface = shift;
     1626    my $forMainWorldSuffix = shift;
    16241627
    16251628    my $interfaceName = $interface->name;
     
    16391642    my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature);
    16401643    push(@implContentInternals, "#if ${conditionalString}\n\n") if $conditionalString;
    1641     push(@implContentInternals, "static v8::Handle<v8::Value> ${name}Method(const v8::Arguments& args)\n");
     1644    push(@implContentInternals, "static v8::Handle<v8::Value> ${name}Method${forMainWorldSuffix}(const v8::Arguments& args)\n");
    16421645    push(@implContentInternals, "{\n");
    16431646
     
    17361739    }
    17371740
    1738     my ($parameterCheckString, $paramIndex, %replacements) = GenerateParametersCheck($function, $interfaceName);
     1741    my ($parameterCheckString, $paramIndex, %replacements) = GenerateParametersCheck($function, $interfaceName, $forMainWorldSuffix);
    17391742    push(@implContentInternals, $parameterCheckString);
    17401743
    17411744    # Build the function call string.
    1742     push(@implContentInternals, GenerateFunctionCallString($function, $paramIndex, "    ", $interfaceName, %replacements));
     1745    push(@implContentInternals, GenerateFunctionCallString($function, $paramIndex, "    ", $interfaceName, $forMainWorldSuffix, %replacements));
    17431746
    17441747    if ($raisesExceptions) {
     
    18241827    my $function = shift;
    18251828    my $interfaceName = shift;
     1829    my $forMainWorldSuffix = shift;
    18261830
    18271831    my $parameterCheckString = "";
     
    18391843        if ($optional && $optional ne "DefaultIsUndefined" && $optional ne "DefaultIsNullString" && $nativeType ne "Dictionary" && !$parameter->extendedAttributes->{"Callback"}) {
    18401844            $parameterCheckString .= "    if (args.Length() <= $paramIndex) {\n";
    1841             my $functionCall = GenerateFunctionCallString($function, $paramIndex, "    " x 2, $interfaceName, %replacements);
     1845            my $functionCall = GenerateFunctionCallString($function, $paramIndex, "    " x 2, $interfaceName, $forMainWorldSuffix, %replacements);
    18421846            $parameterCheckString .= $functionCall;
    18431847            $parameterCheckString .= "    }\n";
     
    20622066    # FIXME: Currently [Constructor(...)] does not yet support [Optional] arguments.
    20632067    # It just supports [Optional=DefaultIsUndefined] or [Optional=DefaultIsNullString].
    2064     my ($parameterCheckString, $paramIndex, %replacements) = GenerateParametersCheck($function, $interfaceName);
     2068    my ($parameterCheckString, $paramIndex, %replacements) = GenerateParametersCheck($function, $interfaceName, "");
    20652069    push(@implContentInternals, $parameterCheckString);
    20662070
     
    25682572    my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature);
    25692573    push(@implContent, "#if ${conditionalString}\n") if $conditionalString;
    2570     push(@implContent, "    ${conditional}$template->Set(v8::String::NewSymbol(\"$name\"), v8::FunctionTemplate::New(${interfaceName}V8Internal::${name}MethodCallback, v8Undefined(), ${signature})$property_attributes);\n");
     2574    if ($function->signature->extendedAttributes->{"V8PerWorldBindings"}) {
     2575        push(@implContent, "    if (currentWorldType == MainWorld) {\n");
     2576        push(@implContent, "        ${conditional}$template->Set(v8::String::NewSymbol(\"$name\"), v8::FunctionTemplate::New(${interfaceName}V8Internal::${name}MethodCallbackForMainWorld, v8Undefined(), ${signature})$property_attributes);\n");
     2577        push(@implContent, "    } else {\n");
     2578        push(@implContent, "        ${conditional}$template->Set(v8::String::NewSymbol(\"$name\"), v8::FunctionTemplate::New(${interfaceName}V8Internal::${name}MethodCallback, v8Undefined(), ${signature})$property_attributes);\n");
     2579        push(@implContent, "    }\n");
     2580    } else {
     2581        push(@implContent, "    ${conditional}$template->Set(v8::String::NewSymbol(\"$name\"), v8::FunctionTemplate::New(${interfaceName}V8Internal::${name}MethodCallback, v8Undefined(), ${signature})$property_attributes);\n");
     2582    }
    25712583    push(@implContent, "#endif // ${conditionalString}\n") if $conditionalString;
    25722584}
     
    29132925    # Generate methods for functions.
    29142926    foreach my $function (@{$interface->functions}) {
    2915         GenerateFunction($function, $interface);
     2927        GenerateFunction($function, $interface, "");
     2928        if ($function->signature->extendedAttributes->{"V8PerWorldBindings"}) {
     2929            GenerateFunction($function, $interface, "ForMainWorld");
     2930        }
     2931
    29162932        if ($function->{overloadIndex} == @{$function->{overloads}}) {
    29172933            if ($function->{overloadIndex} > 1) {
    2918                 GenerateOverloadedFunction($function, $interface);
     2934                GenerateOverloadedFunction($function, $interface, "");
     2935                if ($function->signature->extendedAttributes->{"V8PerWorldBindings"}) {
     2936                    GenerateOverloadedFunction($function, $interface, "ForMainWorld");
     2937                }
    29192938            }
    2920             GenerateFunctionCallback($function, $interface);
     2939            GenerateFunctionCallback($function, $interface, "");
     2940            if ($function->signature->extendedAttributes->{"V8PerWorldBindings"}) {
     2941                GenerateFunctionCallback($function, $interface, "ForMainWorld");
     2942            }
    29212943        }
    29222944
     
    30063028        }
    30073029        my $name = $function->signature->name;
     3030        my $methodForMainWorld = "0";
     3031        if ($function->signature->extendedAttributes->{"V8PerWorldBindings"}) {
     3032            $methodForMainWorld = "${interfaceName}V8Internal::${name}MethodCallbackForMainWorld";
     3033        }
    30083034        my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature);
    30093035        push(@implContent, "#if ${conditionalString}\n") if $conditionalString;
    30103036        push(@implContent, <<END);
    3011     {"$name", ${interfaceName}V8Internal::${name}MethodCallback},
     3037    {"$name", ${interfaceName}V8Internal::${name}MethodCallback, ${methodForMainWorld}},
    30123038END
    30133039        push(@implContent, "#endif\n") if $conditionalString;
     
    38493875    my $indent = shift;
    38503876    my $interfaceName = shift;
     3877    my $forMainWorldSuffix = shift;
    38513878    my %replacements = @_;
    38523879
     
    39513978        # FIXME: Update for all ScriptWrappables.
    39523979        if (IsDOMNodeType($interfaceName)) {
    3953             $result .= $indent . "return toV8Fast(WTF::getPtr(${svgNativeType}::create($return)), args, imp);\n";
     3980            $result .= $indent . "return toV8Fast${forMainWorldSuffix}(WTF::getPtr(${svgNativeType}::create($return)), args, imp);\n";
    39543981        } else {
    3955             $result .= $indent . "return toV8(WTF::getPtr(${svgNativeType}::create($return)), args.Holder(), args.GetIsolate());\n";
     3982            $result .= $indent . "return toV8${forMainWorldSuffix}(WTF::getPtr(${svgNativeType}::create($return)), args.Holder(), args.GetIsolate());\n";
    39563983        }
    39573984        return $result;
     
    39683995    # FIXME: Update for all ScriptWrappables.
    39693996    if (IsDOMNodeType($interfaceName)) {
    3970         $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", "args", "imp", "ReturnUnsafeHandle", "");
     3997        $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", "args", "imp", "ReturnUnsafeHandle", $forMainWorldSuffix);
    39713998    } else {
    3972         $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", 0, 0, "ReturnUnsafeHandle", "");
     3999        $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", 0, 0, "ReturnUnsafeHandle", $forMainWorldSuffix);
    39734000    }
    39744001
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp

    r146259 r146534  
    122122
    123123static const V8DOMConfiguration::BatchedMethod V8Float64ArrayMethods[] = {
    124     {"set", Float64ArrayV8Internal::setMethodCallback},
     124    {"set", Float64ArrayV8Internal::setMethodCallback, 0},
    125125};
    126126
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp

    r146259 r146534  
    8989
    9090static const V8DOMConfiguration::BatchedMethod V8TestCustomNamedGetterMethods[] = {
    91     {"anotherFunction", TestCustomNamedGetterV8Internal::anotherFunctionMethodCallback},
     91    {"anotherFunction", TestCustomNamedGetterV8Internal::anotherFunctionMethodCallback, 0},
    9292};
    9393
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp

    r146259 r146534  
    155155
    156156static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = {
    157     {"item", TestEventTargetV8Internal::itemMethodCallback},
    158     {"addEventListener", TestEventTargetV8Internal::addEventListenerMethodCallback},
    159     {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethodCallback},
     157    {"item", TestEventTargetV8Internal::itemMethodCallback, 0},
     158    {"addEventListener", TestEventTargetV8Internal::addEventListenerMethodCallback, 0},
     159    {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethodCallback, 0},
    160160};
    161161
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp

    r146259 r146534  
    384384static const V8DOMConfiguration::BatchedMethod V8TestInterfaceMethods[] = {
    385385#if ENABLE(Condition11) || ENABLE(Condition12)
    386     {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCallback},
    387 #endif
    388 #if ENABLE(Condition11) || ENABLE(Condition12)
    389     {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCallback},
     386    {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCallback, 0},
     387#endif
     388#if ENABLE(Condition11) || ENABLE(Condition12)
     389    {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCallback, 0},
    390390#endif
    391391};
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp

    r146259 r146534  
    9090
    9191static const V8DOMConfiguration::BatchedMethod V8TestMediaQueryListListenerMethods[] = {
    92     {"method", TestMediaQueryListListenerV8Internal::methodMethodCallback},
     92    {"method", TestMediaQueryListListenerV8Internal::methodMethodCallback, 0},
    9393};
    9494
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

    r146281 r146534  
    32523252
    32533253static const V8DOMConfiguration::BatchedMethod V8TestObjMethods[] = {
    3254     {"voidMethod", TestObjV8Internal::voidMethodMethodCallback},
    3255     {"longMethod", TestObjV8Internal::longMethodMethodCallback},
    3256     {"objMethod", TestObjV8Internal::objMethodMethodCallback},
    3257     {"methodReturningSequence", TestObjV8Internal::methodReturningSequenceMethodCallback},
    3258     {"serializedValue", TestObjV8Internal::serializedValueMethodCallback},
    3259     {"optionsObject", TestObjV8Internal::optionsObjectMethodCallback},
    3260     {"methodWithException", TestObjV8Internal::methodWithExceptionMethodCallback},
    3261     {"customMethod", TestObjV8Internal::customMethodMethodCallback},
    3262     {"customMethodWithArgs", TestObjV8Internal::customMethodWithArgsMethodCallback},
    3263     {"addEventListener", TestObjV8Internal::addEventListenerMethodCallback},
    3264     {"removeEventListener", TestObjV8Internal::removeEventListenerMethodCallback},
    3265     {"withScriptStateVoid", TestObjV8Internal::withScriptStateVoidMethodCallback},
    3266     {"withScriptStateObj", TestObjV8Internal::withScriptStateObjMethodCallback},
    3267     {"withScriptStateVoidException", TestObjV8Internal::withScriptStateVoidExceptionMethodCallback},
    3268     {"withScriptStateObjException", TestObjV8Internal::withScriptStateObjExceptionMethodCallback},
    3269     {"withScriptExecutionContext", TestObjV8Internal::withScriptExecutionContextMethodCallback},
    3270     {"withScriptExecutionContextAndScriptState", TestObjV8Internal::withScriptExecutionContextAndScriptStateMethodCallback},
    3271     {"withScriptExecutionContextAndScriptStateObjException", TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionMethodCallback},
    3272     {"withScriptExecutionContextAndScriptStateWithSpaces", TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesMethodCallback},
    3273     {"withScriptArgumentsAndCallStack", TestObjV8Internal::withScriptArgumentsAndCallStackMethodCallback},
    3274     {"methodWithOptionalArg", TestObjV8Internal::methodWithOptionalArgMethodCallback},
    3275     {"methodWithNonOptionalArgAndOptionalArg", TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethodCallback},
    3276     {"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback},
    3277     {"methodWithOptionalString", TestObjV8Internal::methodWithOptionalStringMethodCallback},
    3278     {"methodWithOptionalStringIsUndefined", TestObjV8Internal::methodWithOptionalStringIsUndefinedMethodCallback},
    3279     {"methodWithOptionalStringIsNullString", TestObjV8Internal::methodWithOptionalStringIsNullStringMethodCallback},
    3280     {"methodWithCallbackArg", TestObjV8Internal::methodWithCallbackArgMethodCallback},
    3281     {"methodWithNonCallbackArgAndCallbackArg", TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethodCallback},
    3282     {"methodWithCallbackAndOptionalArg", TestObjV8Internal::methodWithCallbackAndOptionalArgMethodCallback},
    3283     {"methodWithEnforceRangeInt32", TestObjV8Internal::methodWithEnforceRangeInt32MethodCallback},
    3284     {"methodWithEnforceRangeUInt32", TestObjV8Internal::methodWithEnforceRangeUInt32MethodCallback},
    3285     {"methodWithEnforceRangeInt64", TestObjV8Internal::methodWithEnforceRangeInt64MethodCallback},
    3286     {"methodWithEnforceRangeUInt64", TestObjV8Internal::methodWithEnforceRangeUInt64MethodCallback},
     3254    {"voidMethod", TestObjV8Internal::voidMethodMethodCallback, 0},
     3255    {"longMethod", TestObjV8Internal::longMethodMethodCallback, 0},
     3256    {"objMethod", TestObjV8Internal::objMethodMethodCallback, 0},
     3257    {"methodReturningSequence", TestObjV8Internal::methodReturningSequenceMethodCallback, 0},
     3258    {"serializedValue", TestObjV8Internal::serializedValueMethodCallback, 0},
     3259    {"optionsObject", TestObjV8Internal::optionsObjectMethodCallback, 0},
     3260    {"methodWithException", TestObjV8Internal::methodWithExceptionMethodCallback, 0},
     3261    {"customMethod", TestObjV8Internal::customMethodMethodCallback, 0},
     3262    {"customMethodWithArgs", TestObjV8Internal::customMethodWithArgsMethodCallback, 0},
     3263    {"addEventListener", TestObjV8Internal::addEventListenerMethodCallback, 0},
     3264    {"removeEventListener", TestObjV8Internal::removeEventListenerMethodCallback, 0},
     3265    {"withScriptStateVoid", TestObjV8Internal::withScriptStateVoidMethodCallback, 0},
     3266    {"withScriptStateObj", TestObjV8Internal::withScriptStateObjMethodCallback, 0},
     3267    {"withScriptStateVoidException", TestObjV8Internal::withScriptStateVoidExceptionMethodCallback, 0},
     3268    {"withScriptStateObjException", TestObjV8Internal::withScriptStateObjExceptionMethodCallback, 0},
     3269    {"withScriptExecutionContext", TestObjV8Internal::withScriptExecutionContextMethodCallback, 0},
     3270    {"withScriptExecutionContextAndScriptState", TestObjV8Internal::withScriptExecutionContextAndScriptStateMethodCallback, 0},
     3271    {"withScriptExecutionContextAndScriptStateObjException", TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionMethodCallback, 0},
     3272    {"withScriptExecutionContextAndScriptStateWithSpaces", TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesMethodCallback, 0},
     3273    {"withScriptArgumentsAndCallStack", TestObjV8Internal::withScriptArgumentsAndCallStackMethodCallback, 0},
     3274    {"methodWithOptionalArg", TestObjV8Internal::methodWithOptionalArgMethodCallback, 0},
     3275    {"methodWithNonOptionalArgAndOptionalArg", TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethodCallback, 0},
     3276    {"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback, 0},
     3277    {"methodWithOptionalString", TestObjV8Internal::methodWithOptionalStringMethodCallback, 0},
     3278    {"methodWithOptionalStringIsUndefined", TestObjV8Internal::methodWithOptionalStringIsUndefinedMethodCallback, 0},
     3279    {"methodWithOptionalStringIsNullString", TestObjV8Internal::methodWithOptionalStringIsNullStringMethodCallback, 0},
     3280    {"methodWithCallbackArg", TestObjV8Internal::methodWithCallbackArgMethodCallback, 0},
     3281    {"methodWithNonCallbackArgAndCallbackArg", TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethodCallback, 0},
     3282    {"methodWithCallbackAndOptionalArg", TestObjV8Internal::methodWithCallbackAndOptionalArgMethodCallback, 0},
     3283    {"methodWithEnforceRangeInt32", TestObjV8Internal::methodWithEnforceRangeInt32MethodCallback, 0},
     3284    {"methodWithEnforceRangeUInt32", TestObjV8Internal::methodWithEnforceRangeUInt32MethodCallback, 0},
     3285    {"methodWithEnforceRangeInt64", TestObjV8Internal::methodWithEnforceRangeInt64MethodCallback, 0},
     3286    {"methodWithEnforceRangeUInt64", TestObjV8Internal::methodWithEnforceRangeUInt64MethodCallback, 0},
    32873287#if ENABLE(Condition1)
    3288     {"conditionalMethod1", TestObjV8Internal::conditionalMethod1MethodCallback},
     3288    {"conditionalMethod1", TestObjV8Internal::conditionalMethod1MethodCallback, 0},
    32893289#endif
    32903290#if ENABLE(Condition1) && ENABLE(Condition2)
    3291     {"conditionalMethod2", TestObjV8Internal::conditionalMethod2MethodCallback},
     3291    {"conditionalMethod2", TestObjV8Internal::conditionalMethod2MethodCallback, 0},
    32923292#endif
    32933293#if ENABLE(Condition1) || ENABLE(Condition2)
    3294     {"conditionalMethod3", TestObjV8Internal::conditionalMethod3MethodCallback},
     3294    {"conditionalMethod3", TestObjV8Internal::conditionalMethod3MethodCallback, 0},
    32953295#endif
    3296     {"overloadedMethod", TestObjV8Internal::overloadedMethodMethodCallback},
    3297     {"classMethodWithClamp", TestObjV8Internal::classMethodWithClampMethodCallback},
    3298     {"getSVGDocument", TestObjV8Internal::getSVGDocumentMethodCallback},
    3299     {"mutablePointFunction", TestObjV8Internal::mutablePointFunctionMethodCallback},
    3300     {"immutablePointFunction", TestObjV8Internal::immutablePointFunctionMethodCallback},
    3301     {"orange", TestObjV8Internal::orangeMethodCallback},
    3302     {"strictFunction", TestObjV8Internal::strictFunctionMethodCallback},
    3303     {"variadicStringMethod", TestObjV8Internal::variadicStringMethodMethodCallback},
    3304     {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallback},
     3296    {"overloadedMethod", TestObjV8Internal::overloadedMethodMethodCallback, 0},
     3297    {"classMethodWithClamp", TestObjV8Internal::classMethodWithClampMethodCallback, 0},
     3298    {"getSVGDocument", TestObjV8Internal::getSVGDocumentMethodCallback, 0},
     3299    {"mutablePointFunction", TestObjV8Internal::mutablePointFunctionMethodCallback, 0},
     3300    {"immutablePointFunction", TestObjV8Internal::immutablePointFunctionMethodCallback, 0},
     3301    {"orange", TestObjV8Internal::orangeMethodCallback, 0},
     3302    {"strictFunction", TestObjV8Internal::strictFunctionMethodCallback, 0},
     3303    {"variadicStringMethod", TestObjV8Internal::variadicStringMethodMethodCallback, 0},
     3304    {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallback, 0},
    33053305};
    33063306
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp

    r146259 r146534  
    294294
    295295static const V8DOMConfiguration::BatchedMethod V8TestSerializedScriptValueInterfaceMethods[] = {
    296     {"acceptTransferList", TestSerializedScriptValueInterfaceV8Internal::acceptTransferListMethodCallback},
    297     {"multiTransferList", TestSerializedScriptValueInterfaceV8Internal::multiTransferListMethodCallback},
     296    {"acceptTransferList", TestSerializedScriptValueInterfaceV8Internal::acceptTransferListMethodCallback, 0},
     297    {"multiTransferList", TestSerializedScriptValueInterfaceV8Internal::multiTransferListMethodCallback, 0},
    298298};
    299299
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp

    r146259 r146534  
    515515
    516516static const V8DOMConfiguration::BatchedMethod V8TestTypedefsMethods[] = {
    517     {"func", TestTypedefsV8Internal::funcMethodCallback},
    518     {"multiTransferList", TestTypedefsV8Internal::multiTransferListMethodCallback},
    519     {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback},
    520     {"funcWithClamp", TestTypedefsV8Internal::funcWithClampMethodCallback},
    521     {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMethodCallback},
    522     {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCallback},
     517    {"func", TestTypedefsV8Internal::funcMethodCallback, 0},
     518    {"multiTransferList", TestTypedefsV8Internal::multiTransferListMethodCallback, 0},
     519    {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback, 0},
     520    {"funcWithClamp", TestTypedefsV8Internal::funcWithClampMethodCallback, 0},
     521    {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMethodCallback, 0},
     522    {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCallback, 0},
    523523};
    524524
  • trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.cpp

    r146259 r146534  
    4949}
    5050
    51 void V8DOMConfiguration::batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate> prototype, v8::Handle<v8::Signature> signature, v8::PropertyAttribute attributes, const BatchedMethod* callbacks, size_t callbackCount, v8::Isolate*)
     51void V8DOMConfiguration::batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate> prototype, v8::Handle<v8::Signature> signature, v8::PropertyAttribute attributes, const BatchedMethod* callbacks, size_t callbackCount, v8::Isolate*, WrapperWorldType currentWorldType)
    5252{
    53     for (size_t i = 0; i < callbackCount; ++i)
    54         prototype->Set(v8::String::NewSymbol(callbacks[i].name), v8::FunctionTemplate::New(callbacks[i].callback, v8Undefined(), signature), attributes);
     53    for (size_t i = 0; i < callbackCount; ++i) {
     54        v8::InvocationCallback callback = callbacks[i].callback;
     55        if (currentWorldType == MainWorld && callbacks[i].callbackForMainWorld)
     56            callback = callbacks[i].callbackForMainWorld;
     57        prototype->Set(v8::String::NewSymbol(callbacks[i].name), v8::FunctionTemplate::New(callback, v8Undefined(), signature), attributes);
     58    }
    5559}
    5660
     
    7478    v8::Local<v8::Signature> defaultSignature = v8::Signature::New(functionDescriptor);
    7579    if (callbackCount)
    76         batchConfigureCallbacks(functionDescriptor->PrototypeTemplate(), defaultSignature, static_cast<v8::PropertyAttribute>(v8::DontDelete), callbacks, callbackCount, isolate);
     80        batchConfigureCallbacks(functionDescriptor->PrototypeTemplate(), defaultSignature, static_cast<v8::PropertyAttribute>(v8::DontDelete), callbacks, callbackCount, isolate, currentWorldType);
    7781    return defaultSignature;
    7882}
  • trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.h

    r146259 r146534  
    102102        const char* const name;
    103103        v8::InvocationCallback callback;
     104        v8::InvocationCallback callbackForMainWorld;
    104105    };
    105106
    106     static void batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Signature>, v8::PropertyAttribute, const BatchedMethod*, size_t callbackCount, v8::Isolate*);
     107    static void batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Signature>, v8::PropertyAttribute, const BatchedMethod*, size_t callbackCount, v8::Isolate*, WrapperWorldType);
    107108
    108109    static v8::Local<v8::Signature> configureTemplate(v8::Persistent<v8::FunctionTemplate>, const char* interfaceName, v8::Persistent<v8::FunctionTemplate> parentClass, size_t fieldCount, const BatchedAttribute*, size_t attributeCount, const BatchedMethod*, size_t callbackCount, v8::Isolate*, WrapperWorldType);
  • trunk/Source/WebCore/dom/Document.idl

    r146305 r146534  
    3030    readonly attribute Element documentElement;
    3131
    32     [ReturnNewObject] Element createElement(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString tagName)
    33         raises (DOMException);
    34     DocumentFragment   createDocumentFragment();
    35     [ReturnNewObject] Text createTextNode(in [Optional=DefaultIsUndefined] DOMString data);
    36     [ReturnNewObject] Comment createComment(in [Optional=DefaultIsUndefined] DOMString data);
    37     [ReturnNewObject] CDATASection createCDATASection(in [Optional=DefaultIsUndefined] DOMString data)
    38         raises(DOMException);
    39     [ObjCLegacyUnnamedParameters, ReturnNewObject] ProcessingInstruction createProcessingInstruction(in [Optional=DefaultIsUndefined] DOMString target,
     32    [ReturnNewObject, V8PerWorldBindings] Element createElement(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString tagName)
     33        raises (DOMException);
     34    [V8PerWorldBindings] DocumentFragment   createDocumentFragment();
     35    [ReturnNewObject, V8PerWorldBindings] Text createTextNode(in [Optional=DefaultIsUndefined] DOMString data);
     36    [ReturnNewObject, V8PerWorldBindings] Comment createComment(in [Optional=DefaultIsUndefined] DOMString data);
     37    [ReturnNewObject, V8PerWorldBindings] CDATASection createCDATASection(in [Optional=DefaultIsUndefined] DOMString data)
     38        raises(DOMException);
     39    [ObjCLegacyUnnamedParameters, ReturnNewObject, V8PerWorldBindings] ProcessingInstruction createProcessingInstruction(in [Optional=DefaultIsUndefined] DOMString target,
    4040                                                                                 in [Optional=DefaultIsUndefined] DOMString data)
    4141        raises (DOMException);
    42     [ReturnNewObject] Attr createAttribute(in [Optional=DefaultIsUndefined] DOMString name)
    43         raises (DOMException);
    44     [ReturnNewObject] EntityReference createEntityReference(in [Optional=DefaultIsUndefined] DOMString name)
    45         raises(DOMException);
    46     NodeList          getElementsByTagName(in [Optional=DefaultIsUndefined] DOMString tagname);
     42    [ReturnNewObject, V8PerWorldBindings] Attr createAttribute(in [Optional=DefaultIsUndefined] DOMString name)
     43        raises (DOMException);
     44    [ReturnNewObject, V8PerWorldBindings] EntityReference createEntityReference(in [Optional=DefaultIsUndefined] DOMString name)
     45        raises(DOMException);
     46    [V8PerWorldBindings] NodeList getElementsByTagName(in [Optional=DefaultIsUndefined] DOMString tagname);
    4747
    4848    // Introduced in DOM Level 2:
    4949
    50     [ObjCLegacyUnnamedParameters, ReturnNewObject] Node importNode(in [Optional=DefaultIsUndefined] Node importedNode,
     50    [ObjCLegacyUnnamedParameters, ReturnNewObject, V8PerWorldBindings] Node importNode(in [Optional=DefaultIsUndefined] Node importedNode,
    5151                                               in [Optional] boolean deep)
    5252        raises (DOMException);
    53     [ObjCLegacyUnnamedParameters, ReturnNewObject] Element createElementNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
     53    [ObjCLegacyUnnamedParameters, ReturnNewObject, V8PerWorldBindings] Element createElementNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
    5454                                                       in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString qualifiedName)
    5555        raises (DOMException);
    56     [ObjCLegacyUnnamedParameters, ReturnNewObject] Attr createAttributeNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
     56    [ObjCLegacyUnnamedParameters, ReturnNewObject, V8PerWorldBindings] Attr createAttributeNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
    5757                                                      in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString qualifiedName)
    5858        raises (DOMException);
    59     [ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
     59    [ObjCLegacyUnnamedParameters, V8PerWorldBindings] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
    6060                                                   in [Optional=DefaultIsUndefined] DOMString localName);
    61     Element            getElementById(in [Optional=DefaultIsUndefined] DOMString elementId);
     61    [V8PerWorldBindings] Element            getElementById(in [Optional=DefaultIsUndefined] DOMString elementId);
    6262
    6363    // DOM Level 3 Core
     
    7171                setter raises (DOMException);
    7272
    73     Node              adoptNode(in [Optional=DefaultIsUndefined] Node source)
     73    [V8PerWorldBindings] Node adoptNode(in [Optional=DefaultIsUndefined] Node source)
    7474        raises (DOMException);
    7575
     
    8686    // DOM Level 2 Events (DocumentEvents interface)
    8787
    88     Event              createEvent(in [Optional=DefaultIsUndefined] DOMString eventType)
     88    [V8PerWorldBindings] Event              createEvent(in [Optional=DefaultIsUndefined] DOMString eventType)
    8989        raises(DOMException);
    9090
    9191    // DOM Level 2 Tranversal and Range (DocumentRange interface)
    9292
    93     Range              createRange();
     93    [V8PerWorldBindings] Range              createRange();
    9494
    9595    // DOM Level 2 Tranversal and Range (DocumentTraversal interface)
    9696
    97     [ObjCLegacyUnnamedParameters] NodeIterator createNodeIterator(in [Optional=DefaultIsUndefined] Node root,
     97    [ObjCLegacyUnnamedParameters, V8PerWorldBindings] NodeIterator createNodeIterator(in [Optional=DefaultIsUndefined] Node root,
    9898                                                   in [Optional=DefaultIsUndefined] unsigned long whatToShow,
    9999                                                   in [Optional=DefaultIsUndefined] NodeFilter filter,
    100100                                                   in [Optional=DefaultIsUndefined] boolean expandEntityReferences)
    101101        raises(DOMException);
    102     [ObjCLegacyUnnamedParameters] TreeWalker createTreeWalker(in [Optional=DefaultIsUndefined] Node root,
     102    [ObjCLegacyUnnamedParameters, V8PerWorldBindings] TreeWalker createTreeWalker(in [Optional=DefaultIsUndefined] Node root,
    103103                                               in [Optional=DefaultIsUndefined] unsigned long whatToShow,
    104104                                               in [Optional=DefaultIsUndefined] NodeFilter filter,
     
    116116    // DOM Level 2 Style (DocumentCSS interface)
    117117
    118     [ObjCLegacyUnnamedParameters] CSSStyleDeclaration getOverrideStyle(in [Optional=DefaultIsUndefined] Element element,
     118    [ObjCLegacyUnnamedParameters, V8PerWorldBindings] CSSStyleDeclaration getOverrideStyle(in [Optional=DefaultIsUndefined] Element element,
    119119                                                        in [Optional=DefaultIsUndefined] DOMString pseudoElement);
    120120
    121121    // DOM Level 3 XPath (XPathEvaluator interface)
    122     [ObjCLegacyUnnamedParameters] XPathExpression createExpression(in [Optional=DefaultIsUndefined] DOMString expression,
     122    [ObjCLegacyUnnamedParameters, V8PerWorldBindings] XPathExpression createExpression(in [Optional=DefaultIsUndefined] DOMString expression,
    123123                                                    in [Optional=DefaultIsUndefined] XPathNSResolver resolver)
    124124        raises(DOMException);
    125     XPathNSResolver    createNSResolver(in Node nodeResolver);
    126     [ObjCLegacyUnnamedParameters, V8Custom] XPathResult evaluate(in [Optional=DefaultIsUndefined] DOMString expression,
     125    [V8PerWorldBindings] XPathNSResolver    createNSResolver(in Node nodeResolver);
     126    [ObjCLegacyUnnamedParameters, V8Custom, V8PerWorldBindings] XPathResult evaluate(in [Optional=DefaultIsUndefined] DOMString expression,
    127127                                                  in [Optional=DefaultIsUndefined] Node contextNode,
    128128                                                  in [Optional=DefaultIsUndefined] XPathNSResolver resolver,
     
    148148    boolean            queryCommandState(in [Optional=DefaultIsUndefined] DOMString command);
    149149    boolean            queryCommandSupported(in [Optional=DefaultIsUndefined] DOMString command);
    150     DOMString          queryCommandValue(in [Optional=DefaultIsUndefined] DOMString command);
     150    [V8PerWorldBindings] DOMString queryCommandValue(in [Optional=DefaultIsUndefined] DOMString command);
    151151
    152152    // Moved down from HTMLDocument
     
    177177    readonly attribute DOMString lastModified;
    178178
    179     NodeList getElementsByName(in [Optional=DefaultIsUndefined] DOMString elementName);
     179    [V8PerWorldBindings] NodeList getElementsByName(in [Optional=DefaultIsUndefined] DOMString elementName);
    180180
    181181#if defined(ENABLE_MICRODATA) && ENABLE_MICRODATA
    182     NodeList getItems(in [TreatNullAs=NullString, TreatUndefinedAs=NullString, Optional=DefaultIsUndefined] DOMString typeNames);
     182    [V8PerWorldBindings] NodeList getItems(in [TreatNullAs=NullString, TreatUndefinedAs=NullString, Optional=DefaultIsUndefined] DOMString typeNames);
    183183#endif
    184184
     
    193193    [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString readyState;
    194194
    195     Element            elementFromPoint(in [Optional=DefaultIsUndefined] long x,
    196                                         in [Optional=DefaultIsUndefined] long y);
    197     Range              caretRangeFromPoint(in [Optional=DefaultIsUndefined] long x,
    198                                            in [Optional=DefaultIsUndefined] long y);
     195    [V8PerWorldBindings] Element elementFromPoint(in [Optional=DefaultIsUndefined] long x,
     196                                                  in [Optional=DefaultIsUndefined] long y);
     197    [V8PerWorldBindings] Range caretRangeFromPoint(in [Optional=DefaultIsUndefined] long x,
     198                                                   in [Optional=DefaultIsUndefined] long y);
    199199
    200200    // Mozilla extensions
    201201#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    202     DOMSelection      getSelection();
     202    [V8PerWorldBindings] DOMSelection getSelection();
    203203#endif
    204204    [TreatReturnedNullStringAs=Null] readonly attribute DOMString characterSet;
     
    235235
    236236    // HTML 5
    237     NodeList getElementsByClassName(in [Optional=DefaultIsUndefined] DOMString tagname);
     237    [V8PerWorldBindings] NodeList getElementsByClassName(in [Optional=DefaultIsUndefined] DOMString tagname);
    238238
    239239    readonly attribute DOMString compatMode;
    240240
    241241    // NodeSelector - Selector API
    242     Element querySelector(in DOMString selectors)
    243         raises(DOMException);
    244     NodeList querySelectorAll(in DOMString selectors)
     242    [V8PerWorldBindings] Element querySelector(in DOMString selectors)
     243        raises(DOMException);
     244    [V8PerWorldBindings] NodeList querySelectorAll(in DOMString selectors)
    245245        raises(DOMException);
    246246
     
    346346
    347347#if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
    348     [ReturnNewObject, V8EnabledAtRuntime=touch] Touch createTouch(in [Optional=DefaultIsUndefined] DOMWindow window,
     348    [ReturnNewObject, V8EnabledAtRuntime=touch, V8PerWorldBindings] Touch createTouch(in [Optional=DefaultIsUndefined] DOMWindow window,
    349349                                                     in [Optional=DefaultIsUndefined] EventTarget target,
    350350                                                     in [Optional=DefaultIsUndefined] long identifier,
     
    363363
    364364#if defined(ENABLE_CUSTOM_ELEMENTS) && ENABLE_CUSTOM_ELEMENTS
    365     [V8EnabledAtRuntime=customDOMElements, Conditional=CUSTOM_ELEMENTS, ImplementedAs=registerElement, CallWith=ScriptState]
     365    [V8EnabledAtRuntime=customDOMElements, Conditional=CUSTOM_ELEMENTS, ImplementedAs=registerElement, CallWith=ScriptState, V8PerWorldBindings]
    366366    CustomElementConstructor webkitRegister(in DOMString name, in [Optional] Dictionary options) raises(DOMException);
    367     [ReturnNewObject] Element createElement(in DOMString localName, in [TreatNullAs=NullString] DOMString typeExtension) raises (DOMException);
    368     [ReturnNewObject] Element createElementNS(in [TreatNullAs=NullString] DOMString namespaceURI, in DOMString qualifiedName,
     367    [ReturnNewObject, V8PerWorldBindings] Element createElement(in DOMString localName, in [TreatNullAs=NullString] DOMString typeExtension) raises (DOMException);
     368    [ReturnNewObject, V8PerWorldBindings] Element createElementNS(in [TreatNullAs=NullString] DOMString namespaceURI, in DOMString qualifiedName,
    369369                                              in [TreatNullAs=NullString] DOMString typeExtension) raises (DOMException);
    370370#endif
  • trunk/Source/WebCore/dom/Element.idl

    r146259 r146534  
    3535        raises(DOMException);
    3636    void removeAttribute(in [Optional=DefaultIsUndefined] DOMString name);
    37     Attr getAttributeNode(in [Optional=DefaultIsUndefined] DOMString name);
    38     Attr setAttributeNode(in [Optional=DefaultIsUndefined] Attr newAttr)
    39         raises(DOMException);
    40     Attr removeAttributeNode(in [Optional=DefaultIsUndefined] Attr oldAttr)
    41         raises(DOMException);
    42     NodeList getElementsByTagName(in [Optional=DefaultIsUndefined] DOMString name);
     37    [V8PerWorldBindings] Attr getAttributeNode(in [Optional=DefaultIsUndefined] DOMString name);
     38    [V8PerWorldBindings] Attr setAttributeNode(in [Optional=DefaultIsUndefined] Attr newAttr)
     39        raises(DOMException);
     40    [V8PerWorldBindings] Attr removeAttributeNode(in [Optional=DefaultIsUndefined] Attr oldAttr)
     41        raises(DOMException);
     42    [V8PerWorldBindings] NodeList getElementsByTagName(in [Optional=DefaultIsUndefined] DOMString name);
    4343
    4444#if !defined(LANGUAGE_OBJECTIVE_C)
     
    5858    [ObjCLegacyUnnamedParameters] void removeAttributeNS(in [TreatNullAs=NullString] DOMString namespaceURI,
    5959                                          in DOMString localName);
    60     [ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
     60    [ObjCLegacyUnnamedParameters, V8PerWorldBindings] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
    6161                                                   in [Optional=DefaultIsUndefined] DOMString localName);
    62     [ObjCLegacyUnnamedParameters] Attr getAttributeNodeNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
     62    [ObjCLegacyUnnamedParameters, V8PerWorldBindings] Attr getAttributeNodeNS(in [TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI,
    6363                                           in [Optional=DefaultIsUndefined] DOMString localName);
    64     Attr setAttributeNodeNS(in [Optional=DefaultIsUndefined] Attr newAttr)
     64    [V8PerWorldBindings] Attr setAttributeNodeNS(in [Optional=DefaultIsUndefined] Attr newAttr)
    6565        raises(DOMException);
    6666    boolean hasAttribute(in DOMString name);
     
    9797
    9898    // HTML 5
    99     NodeList getElementsByClassName(in [Optional=DefaultIsUndefined] DOMString name);
     99    [V8PerWorldBindings] NodeList getElementsByClassName(in [Optional=DefaultIsUndefined] DOMString name);
    100100
    101101    [Reflect=class, V8PerWorldBindings] attribute DOMString className;
     
    107107
    108108    // NodeSelector - Selector API
    109     Element querySelector(in DOMString selectors)
    110         raises(DOMException);
    111     NodeList querySelectorAll(in DOMString selectors)
     109    [V8PerWorldBindings] Element querySelector(in DOMString selectors)
     110        raises(DOMException);
     111    [V8PerWorldBindings] NodeList querySelectorAll(in DOMString selectors)
    112112        raises(DOMException);
    113113
     
    126126#if defined(ENABLE_SHADOW_DOM) && ENABLE_SHADOW_DOM && defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    127127    [Reflect=pseudo, V8EnabledAtRuntime=shadowDOM, ImplementedAs=pseudo, V8PerWorldBindings] attribute DOMString webkitPseudo;
    128     [V8EnabledAtRuntime=shadowDOM, ImplementedAs=createShadowRoot] ShadowRoot webkitCreateShadowRoot() raises(DOMException);
     128    [V8EnabledAtRuntime=shadowDOM, ImplementedAs=createShadowRoot, V8PerWorldBindings] ShadowRoot webkitCreateShadowRoot() raises(DOMException);
    129129    [V8EnabledAtRuntime=shadowDOM, ImplementedAs=shadowRoot, V8PerWorldBindings] readonly attribute ShadowRoot webkitShadowRoot;
    130130#endif
     
    136136#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    137137    // CSSOM View Module API
    138     ClientRectList getClientRects();
    139     ClientRect getBoundingClientRect();
     138    [V8PerWorldBindings] ClientRectList getClientRects();
     139    [V8PerWorldBindings] ClientRect getBoundingClientRect();
    140140#endif
    141141
  • trunk/Source/WebCore/dom/Node.idl

    r146259 r146534  
    7777
    7878    boolean            hasChildNodes();
    79     Node               cloneNode(in [Optional=DefaultIsUndefined] boolean deep);
     79    [V8PerWorldBindings] Node               cloneNode(in [Optional=DefaultIsUndefined] boolean deep);
    8080    void               normalize();
    8181
Note: See TracChangeset for help on using the changeset viewer.