Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 793243004: IDL: Properly support [Exposed] on static methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/modules/V8TestInterface5.cpp
diff --git a/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/Source/bindings/tests/results/modules/V8TestInterface5.cpp
index 053a53d4f950491d80a337417ec8b4c777e88bd5..79a88892eeade0fd4104a6e0663e5c30312cb0f6 100644
--- a/Source/bindings/tests/results/modules/V8TestInterface5.cpp
+++ b/Source/bindings/tests/results/modules/V8TestInterface5.cpp
@@ -792,6 +792,18 @@ static void installV8TestInterface5Template(v8::Handle<v8::FunctionTemplate> fun
"alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::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", TestInterface5ImplementationV8Internal::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", TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
+ };
+ V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration, isolate);
+ }
const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = {
"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
};
@@ -851,12 +863,6 @@ void V8TestInterface5::installConditionallyEnabledMethods(v8::Handle<v8::Object>
if (context && (context->isDocument())) {
prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8::FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::windowExposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
}
- if (context && (context->isWorkerGlobalScope())) {
- prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod"), v8::FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
- if (context && (context->isDocument())) {
- prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod"), v8::FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
if (context && (context->isDocument() || context->isServiceWorkerGlobalScope())) {
prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExposedMethod"), v8::FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
}
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698