| Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
|
| index ef841aa5793e82d5a47bb13127d7d92a708acd51..a803035b129b34e31d77749a8c5dc619b6bcc9ed 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
|
| @@ -49,437 +49,395 @@ static_assert(
|
|
|
| namespace TestInterfaceSecureContextV8Internal {
|
|
|
| -static void secureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| +static void secureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
|
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextAttribute()), impl);
|
| + v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextAttribute()), impl);
|
| }
|
|
|
| -void secureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeGetter(info);
|
| +void secureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeGetter(info);
|
| }
|
|
|
| -static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| +static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextAttribute");
|
| + ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextAttribute");
|
|
|
| - // Prepare the value to be set.
|
| - bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
| + // Prepare the value to be set.
|
| + bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
|
|
| - // Type check per: http://heycam.github.io/webidl/#es-interface
|
| - if (!cppValue) {
|
| - exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| - return;
|
| - }
|
| + // Type check per: http://heycam.github.io/webidl/#es-interface
|
| + if (!cppValue) {
|
| + exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| + return;
|
| + }
|
|
|
| - impl->setSecureContextAttribute(cppValue);
|
| + impl->setSecureContextAttribute(cppValue);
|
| }
|
|
|
| -void secureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Value> v8Value = info[0];
|
| +void secureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Value> v8Value = info[0];
|
|
|
| - TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetter(v8Value, info);
|
| + TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetter(v8Value, info);
|
| }
|
|
|
| -static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| +static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
|
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextRuntimeEnabledAttribute()), impl);
|
| + v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextRuntimeEnabledAttribute()), impl);
|
| }
|
|
|
| -void secureContextRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeGetter(info);
|
| +void secureContextRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeGetter(info);
|
| }
|
|
|
| -static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| +static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextRuntimeEnabledAttribute");
|
| + ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextRuntimeEnabledAttribute");
|
|
|
| - // Prepare the value to be set.
|
| - bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
| + // Prepare the value to be set.
|
| + bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
|
|
| - // Type check per: http://heycam.github.io/webidl/#es-interface
|
| - if (!cppValue) {
|
| - exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| - return;
|
| - }
|
| + // Type check per: http://heycam.github.io/webidl/#es-interface
|
| + if (!cppValue) {
|
| + exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| + return;
|
| + }
|
|
|
| - impl->setSecureContextRuntimeEnabledAttribute(cppValue);
|
| + impl->setSecureContextRuntimeEnabledAttribute(cppValue);
|
| }
|
|
|
| -void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Value> v8Value = info[0];
|
| +void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Value> v8Value = info[0];
|
|
|
| - TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetter(v8Value, info);
|
| + TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetter(v8Value, info);
|
| }
|
|
|
| -static void secureContextWindowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| +static void secureContextWindowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
|
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedAttribute()), impl);
|
| + v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedAttribute()), impl);
|
| }
|
|
|
| -void secureContextWindowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeGetter(info);
|
| +void secureContextWindowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeGetter(info);
|
| }
|
|
|
| -static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| +static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWindowExposedAttribute");
|
| + ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWindowExposedAttribute");
|
|
|
| - // Prepare the value to be set.
|
| - bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
| + // Prepare the value to be set.
|
| + bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
|
|
| - // Type check per: http://heycam.github.io/webidl/#es-interface
|
| - if (!cppValue) {
|
| - exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| - return;
|
| - }
|
| + // Type check per: http://heycam.github.io/webidl/#es-interface
|
| + if (!cppValue) {
|
| + exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| + return;
|
| + }
|
|
|
| - impl->setSecureContextWindowExposedAttribute(cppValue);
|
| + impl->setSecureContextWindowExposedAttribute(cppValue);
|
| }
|
|
|
| -void secureContextWindowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Value> v8Value = info[0];
|
| +void secureContextWindowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Value> v8Value = info[0];
|
|
|
| - TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeSetter(v8Value, info);
|
| + TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeSetter(v8Value, info);
|
| }
|
|
|
| -static void secureContextWorkerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| +static void secureContextWorkerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
|
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedAttribute()), impl);
|
| + v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedAttribute()), impl);
|
| }
|
|
|
| -void secureContextWorkerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeGetter(info);
|
| +void secureContextWorkerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeGetter(info);
|
| }
|
|
|
| -static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| +static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWorkerExposedAttribute");
|
| + ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWorkerExposedAttribute");
|
|
|
| - // Prepare the value to be set.
|
| - bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
| + // Prepare the value to be set.
|
| + bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
|
|
| - // Type check per: http://heycam.github.io/webidl/#es-interface
|
| - if (!cppValue) {
|
| - exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| - return;
|
| - }
|
| + // Type check per: http://heycam.github.io/webidl/#es-interface
|
| + if (!cppValue) {
|
| + exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| + return;
|
| + }
|
|
|
| - impl->setSecureContextWorkerExposedAttribute(cppValue);
|
| + impl->setSecureContextWorkerExposedAttribute(cppValue);
|
| }
|
|
|
| -void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Value> v8Value = info[0];
|
| +void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Value> v8Value = info[0];
|
|
|
| - TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeSetter(v8Value, info);
|
| + TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeSetter(v8Value, info);
|
| }
|
|
|
| -static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| +static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
|
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedRuntimeEnabledAttribute()), impl);
|
| + v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedRuntimeEnabledAttribute()), impl);
|
| }
|
|
|
| -void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(info);
|
| +void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(info);
|
| }
|
|
|
| -static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| +static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWindowExposedRuntimeEnabledAttribute");
|
| + ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWindowExposedRuntimeEnabledAttribute");
|
|
|
| - // Prepare the value to be set.
|
| - bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
| + // Prepare the value to be set.
|
| + bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
|
|
| - // Type check per: http://heycam.github.io/webidl/#es-interface
|
| - if (!cppValue) {
|
| - exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| - return;
|
| - }
|
| + // Type check per: http://heycam.github.io/webidl/#es-interface
|
| + if (!cppValue) {
|
| + exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| + return;
|
| + }
|
|
|
| - impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue);
|
| + impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue);
|
| }
|
|
|
| -void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Value> v8Value = info[0];
|
| +void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Value> v8Value = info[0];
|
|
|
| - TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
|
| + TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
|
| }
|
|
|
| -static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| +static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
|
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedRuntimeEnabledAttribute()), impl);
|
| + v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedRuntimeEnabledAttribute()), impl);
|
| }
|
|
|
| -void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(info);
|
| +void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(info);
|
| }
|
|
|
| -static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Object> holder = info.Holder();
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
| +static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder);
|
|
|
| - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWorkerExposedRuntimeEnabledAttribute");
|
| + ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterfaceSecureContext", "secureContextWorkerExposedRuntimeEnabledAttribute");
|
|
|
| - // Prepare the value to be set.
|
| - bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
| + // Prepare the value to be set.
|
| + bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
|
|
|
| - // Type check per: http://heycam.github.io/webidl/#es-interface
|
| - if (!cppValue) {
|
| - exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| - return;
|
| - }
|
| + // Type check per: http://heycam.github.io/webidl/#es-interface
|
| + if (!cppValue) {
|
| + exceptionState.throwTypeError("The provided value is not of type 'bool'.");
|
| + return;
|
| + }
|
|
|
| - impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue);
|
| + impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue);
|
| }
|
|
|
| -void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - v8::Local<v8::Value> v8Value = info[0];
|
| +void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + v8::Local<v8::Value> v8Value = info[0];
|
|
|
| - TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
|
| + TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
|
| }
|
|
|
| -static void secureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
| +static void secureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
|
|
| - impl->secureContextMethod();
|
| + impl->secureContextMethod();
|
| }
|
|
|
| -void secureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextMethodMethod(info);
|
| +void secureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextMethodMethod(info);
|
| }
|
|
|
| -static void secureContextRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
| +static void secureContextRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
|
|
| - impl->secureContextRuntimeEnabledMethod();
|
| + impl->secureContextRuntimeEnabledMethod();
|
| }
|
|
|
| -void secureContextRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethod(info);
|
| +void secureContextRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethod(info);
|
| }
|
|
|
| -static void secureContextWindowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
| +static void secureContextWindowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
|
|
| - impl->secureContextWindowExposedMethod();
|
| + impl->secureContextWindowExposedMethod();
|
| }
|
|
|
| -void secureContextWindowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWindowExposedMethodMethod(info);
|
| +void secureContextWindowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWindowExposedMethodMethod(info);
|
| }
|
|
|
| -static void secureContextWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
| +static void secureContextWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
|
|
| - impl->secureContextWorkerExposedMethod();
|
| + impl->secureContextWorkerExposedMethod();
|
| }
|
|
|
| -void secureContextWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWorkerExposedMethodMethod(info);
|
| +void secureContextWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWorkerExposedMethodMethod(info);
|
| }
|
|
|
| -static void secureContextWindowExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
| +static void secureContextWindowExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
|
|
| - impl->secureContextWindowExposedRuntimeEnabledMethod();
|
| + impl->secureContextWindowExposedRuntimeEnabledMethod();
|
| }
|
|
|
| -void secureContextWindowExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethod(info);
|
| +void secureContextWindowExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethod(info);
|
| }
|
|
|
| -static void secureContextWorkerExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
| +static void secureContextWorkerExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(info.Holder());
|
|
|
| - impl->secureContextWorkerExposedRuntimeEnabledMethod();
|
| + impl->secureContextWorkerExposedRuntimeEnabledMethod();
|
| }
|
|
|
| -void secureContextWorkerExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| -{
|
| - TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethod(info);
|
| +void secureContextWorkerExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
| + TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethod(info);
|
| }
|
|
|
| } // namespace TestInterfaceSecureContextV8Internal
|
|
|
| -static void installV8TestInterfaceSecureContextTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate)
|
| -{
|
| - // Initialize the interface object's template.
|
| - V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceSecureContext::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceSecureContext::internalFieldCount);
|
| - v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| - ALLOW_UNUSED_LOCAL(signature);
|
| - v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTemplate();
|
| - ALLOW_UNUSED_LOCAL(instanceTemplate);
|
| - v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
|
| - ALLOW_UNUSED_LOCAL(prototypeTemplate);
|
| - // Register DOM constants, attributes and operations.
|
| -}
|
| -
|
| -v8::Local<v8::FunctionTemplate> V8TestInterfaceSecureContext::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world)
|
| -{
|
| - return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceSecureContextTemplate);
|
| -}
|
| -
|
| -bool V8TestInterfaceSecureContext::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
|
| -{
|
| - return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
|
| -}
|
| -
|
| -v8::Local<v8::Object> V8TestInterfaceSecureContext::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
|
| -{
|
| - return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
|
| -}
|
| -
|
| -TestInterfaceSecureContext* V8TestInterfaceSecureContext::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
|
| -{
|
| - return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| -}
|
| -
|
| -void V8TestInterfaceSecureContext::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
|
| -{
|
| - v8::Isolate* isolate = context->GetIsolate();
|
| - ExecutionContext* executionContext = toExecutionContext(context);
|
| - v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| - V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| - }
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| - V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isDocument())) {
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| - V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| - V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isDocument())) {
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| - V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| - }
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| - V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| - }
|
| - }
|
| - }
|
| - v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| - ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext());
|
| - ASSERT(executionContext);
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceSecureContextV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextMethodMethodConfiguration);
|
| - }
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| - const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodMethodConfiguration);
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (executionContext && (executionContext->isDocument())) {
|
| - const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMethodMethodConfiguration);
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| - const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMethodMethodConfiguration);
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (executionContext && (executionContext->isDocument())) {
|
| - if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| - const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration);
|
| - }
|
| - }
|
| - }
|
| - if (executionContext && (executionContext->isSecureContext())) {
|
| - if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| - if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| - const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration);
|
| - }
|
| - }
|
| - }
|
| -}
|
| -
|
| -} // namespace blink
|
| +static void installV8TestInterfaceSecureContextTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
|
| + // Initialize the interface object's template.
|
| + V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceSecureContext::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceSecureContext::internalFieldCount);
|
| + v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| + ALLOW_UNUSED_LOCAL(signature);
|
| + v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTemplate();
|
| + ALLOW_UNUSED_LOCAL(instanceTemplate);
|
| + v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
|
| + ALLOW_UNUSED_LOCAL(prototypeTemplate);
|
| + // Register DOM constants, attributes and operations.
|
| +}
|
| +
|
| +v8::Local<v8::FunctionTemplate> V8TestInterfaceSecureContext::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
|
| + return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceSecureContextTemplate);
|
| +}
|
| +
|
| +bool V8TestInterfaceSecureContext::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
|
| + return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
|
| +}
|
| +
|
| +v8::Local<v8::Object> V8TestInterfaceSecureContext::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
|
| + return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
|
| +}
|
| +
|
| +TestInterfaceSecureContext* V8TestInterfaceSecureContext::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
|
| + return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| +}
|
| +
|
| +void V8TestInterfaceSecureContext::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
|
| + v8::Isolate* isolate = context->GetIsolate();
|
| + ExecutionContext* executionContext = toExecutionContext(context);
|
| + v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| + }
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isDocument())) {
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isDocument())) {
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| + }
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
|
| + }
|
| + }
|
| + }
|
| + v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| + ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext());
|
| + DCHECK(executionContext);
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceSecureContextV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextMethodMethodConfiguration);
|
| + }
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodMethodConfiguration);
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (executionContext && (executionContext->isDocument())) {
|
| + const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMethodMethodConfiguration);
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| + const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMethodMethodConfiguration);
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (executionContext && (executionContext->isDocument())) {
|
| + if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration);
|
| + }
|
| + }
|
| + }
|
| + if (executionContext && (executionContext->isSecureContext())) {
|
| + if (executionContext && (executionContext->isWorkerGlobalScope())) {
|
| + if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration);
|
| + }
|
| + }
|
| + }
|
| +}
|
| +
|
| +} // namespace blink
|
|
|