Chromium Code Reviews| Index: Source/bindings/tests/results/core/V8TestInterface.cpp |
| diff --git a/Source/bindings/tests/results/core/V8TestInterface.cpp b/Source/bindings/tests/results/core/V8TestInterface.cpp |
| index 71414199a035f8dcc21291022cd9cb71ec378990..1dcc211e2c100087b583ab3e7ec8eac4d54e8aaa 100644 |
| --- a/Source/bindings/tests/results/core/V8TestInterface.cpp |
| +++ b/Source/bindings/tests/results/core/V8TestInterface.cpp |
| @@ -2009,6 +2009,18 @@ void V8TestInterface::installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemp |
| "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| }; |
| V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate); |
| + if (context && (context->isWorkerGlobalScope())) { |
| + const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMethodConfiguration = { |
| + "workerExposedStaticMethod", TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| + }; |
| + V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, workerExposedStaticMethodMethodConfiguration, isolate); |
| + } |
| + if (context && (context->isDocument())) { |
| + const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMethodConfiguration = { |
| + "windowExposedStaticMethod", TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| + }; |
| + V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration, isolate); |
| + } |
| const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMethodMethodConfiguration = { |
| "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| }; |
| @@ -2071,18 +2083,24 @@ void V8TestInterface::installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemp |
| V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::None, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfiguration, isolate); |
| } |
| #endif // ENABLE(PARTIAL_CONDITION) |
| - const V8DOMConfiguration::MethodConfiguration staticVoidMethodPartialOverloadMethodConfiguration = { |
| - "staticVoidMethodPartialOverload", TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| - }; |
| - V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, staticVoidMethodPartialOverloadMethodConfiguration, isolate); |
| - const V8DOMConfiguration::MethodConfiguration staticPromiseMethodPartialOverloadMethodConfiguration = { |
| - "staticPromiseMethodPartialOverload", TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| - }; |
| - V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, staticPromiseMethodPartialOverloadMethodConfiguration, isolate); |
| - const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMethodMethodConfiguration = { |
| - "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| - }; |
| - V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, partial2StaticVoidMethodMethodConfiguration, isolate); |
| + if (context && context->isDocument() && ContextFeatures::partialContextName3Enabled(toDocument(context))) { |
|
Jens Widell
2014/12/15 12:32:24
This added condition is wrong. Only one of the ove
Jens Widell
2014/12/15 12:37:54
Fixed in PS#2.
|
| + const V8DOMConfiguration::MethodConfiguration staticVoidMethodPartialOverloadMethodConfiguration = { |
| + "staticVoidMethodPartialOverload", TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| + }; |
| + V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, staticVoidMethodPartialOverloadMethodConfiguration, isolate); |
| + } |
| + if (context && context->isDocument() && ContextFeatures::partialContextName3Enabled(toDocument(context))) { |
| + const V8DOMConfiguration::MethodConfiguration staticPromiseMethodPartialOverloadMethodConfiguration = { |
| + "staticPromiseMethodPartialOverload", TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| + }; |
| + V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, staticPromiseMethodPartialOverloadMethodConfiguration, isolate); |
| + } |
| + if (context && context->isDocument() && ContextFeatures::partialContextName3Enabled(toDocument(context))) { |
| + const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMethodMethodConfiguration = { |
| + "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| + }; |
| + V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, partial2StaticVoidMethodMethodConfiguration, isolate); |
| + } |
| const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = { |
| "toString", TestInterfaceImplementationV8Internal::toStringMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
| }; |
| @@ -2166,12 +2184,6 @@ void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> |
| if (context && (context->isDocument())) { |
| prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
| } |
| - if (context && (context->isWorkerGlobalScope())) { |
| - prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
| - } |
| - if (context && (context->isDocument())) { |
| - prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
| - } |
| if (context && (context->isDocument())) { |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| prototypeObject->Set(v8AtomicString(isolate, "methodWithExposedAndRuntimeEnabledFlag"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |