| 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..42a60295dbf50f5143e770b2701d0dc36683391a 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"
|
| @@ -44,6 +45,8 @@ static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
|
|
|
| static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
|
| switch (std::min(1, info.Length())) {
|
| case 0:
|
| @@ -75,6 +78,8 @@ static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
|
|
|
| static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
|
| switch (std::min(1, info.Length())) {
|
| case 0:
|
| @@ -109,6 +114,8 @@ static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
|
|
|
| static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
|
| switch (std::min(1, info.Length())) {
|
| case 0:
|
| @@ -148,6 +155,8 @@ static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
|
|
|
| static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromiseMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
|
| switch (std::min(1, info.Length())) {
|
| case 0:
|
| @@ -194,6 +203,8 @@ static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
|
|
|
| static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2VoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
|
| switch (std::min(1, info.Length())) {
|
| case 0:
|
| @@ -262,6 +273,8 @@ static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
|
|
|
| static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2StaticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
|
| switch (std::min(1, info.Length())) {
|
| case 0:
|
| @@ -308,10 +321,20 @@ void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Local<v8::Functi
|
| 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));
|
| + {
|
| + ExecutionContext* ec = currentExecutionContext(isolate);
|
| + ALLOW_UNUSED_LOCAL(ec);
|
| + String errorMessage;
|
| + if (!Experiments::isApiEnabled(ec, "ExperimentName", errorMessage)) {
|
| + 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 +343,12 @@ 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);
|
| + String constantsErrorMessage;
|
| + ALLOW_UNUSED_LOCAL(constantsErrorMessage);
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom);
|
| }
|
|
|
| @@ -333,6 +362,8 @@ void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Co
|
| unscopeables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecked().As<v8::Object>();
|
| else
|
| unscopeables = v8::Object::New(isolate);
|
| + String errorMessage;
|
| + ALLOW_UNUSED_LOCAL(errorMessage);
|
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableVoidMethod"), v8::True(isolate)).FromJust();
|
| prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables).FromJust();
|
| }
|
|
|