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

Unified Diff: Source/bindings/tests/results/core/V8TestInterface.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/templates/methods.cpp ('k') | Source/bindings/tests/results/modules/V8TestInterface5.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9de82c9e2075e461a80077592527421dd4cf9155 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,
};
@@ -2166,12 +2178,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());
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/bindings/tests/results/modules/V8TestInterface5.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698