Index: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp |
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp |
index fb8c0a5998bc9cdfeab8db222403fa25f0c8cb4d..07e6be7be1342786c17b8558692c3276983a6109 100644 |
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp |
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp |
@@ -19,6 +19,7 @@ |
#include "bindings/tests/idls/modules/TestPartialInterfaceImplementation3.h" |
#include "core/dom/ContextFeatures.h" |
#include "core/dom/Document.h" |
+#include "core/experiments/Experiments.h" |
#include "core/frame/LocalFrame.h" |
#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/ScriptForbiddenScope.h" |
@@ -307,11 +308,19 @@ void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Local<v8::Functi |
v8::Local<v8::Signature> defaultSignature; |
if (!RuntimeEnabledFeatures::featureNameEnabled()) |
defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount, 0, 0, 0, 0, 0, 0); |
- else |
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount, |
- 0, 0, |
- 0, 0, |
- V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods)); |
+ else { |
+ ExecutionContext* ec = currentExecutionContext(isolate); |
+ ALLOW_UNUSED_LOCAL(ec); |
+ if (!Experiments::isApiEnabledWithoutMessage(ec, "ExperimentName")) { |
+ defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount, 0, 0, 0, 0, 0, 0); |
+ } |
+ else |
+ defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount, |
+ 0, 0, |
+ 0, 0, |
+ V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods)); |
+ } |
+ |
v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate(); |
ALLOW_UNUSED_LOCAL(instanceTemplate); |
v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->PrototypeTemplate(); |
@@ -320,6 +329,8 @@ void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Local<v8::Functi |
{"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
}; |
V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); |
+ ExecutionContext* ec = currentExecutionContext(isolate); |
+ ALLOW_UNUSED_LOCAL(ec); |
functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom); |
} |