| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
| 6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
| 7 | 7 |
| 8 // clang-format off | 8 // clang-format off |
| 9 #include "V8TestInterfaceSecureContext.h" | 9 #include "V8TestInterfaceSecureContext.h" |
| 10 | 10 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 355 |
| 356 TestInterfaceSecureContext* V8TestInterfaceSecureContext::toImplWithTypeCheck(v8
::Isolate* isolate, v8::Local<v8::Value> value) { | 356 TestInterfaceSecureContext* V8TestInterfaceSecureContext::toImplWithTypeCheck(v8
::Isolate* isolate, v8::Local<v8::Value> value) { |
| 357 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; | 357 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; |
| 358 } | 358 } |
| 359 | 359 |
| 360 void V8TestInterfaceSecureContext::preparePrototypeAndInterfaceObject(v8::Local<
v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> protot
ypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTempla
te> interfaceTemplate) { | 360 void V8TestInterfaceSecureContext::preparePrototypeAndInterfaceObject(v8::Local<
v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> protot
ypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTempla
te> interfaceTemplate) { |
| 361 v8::Isolate* isolate = context->GetIsolate(); | 361 v8::Isolate* isolate = context->GetIsolate(); |
| 362 ExecutionContext* executionContext = toExecutionContext(context); | 362 ExecutionContext* executionContext = toExecutionContext(context); |
| 363 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 363 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
| 364 if (executionContext && (executionContext->isSecureContext())) { | 364 if (executionContext && (executionContext->isSecureContext())) { |
| 365 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"
secureContextAttribute", TestInterfaceSecureContextV8Internal::secureContextAttr
ibuteAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContex
tAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8
::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMCo
nfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 365 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"
secureContextAttribute", TestInterfaceSecureContextV8Internal::secureContextAttr
ibuteAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContex
tAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8
::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfigurat
ion::CheckHolder}; |
| 366 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, accessorConfiguration); | 366 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, accessorConfiguration); |
| 367 } | 367 } |
| 368 if (executionContext && (executionContext->isSecureContext())) { | 368 if (executionContext && (executionContext->isSecureContext())) { |
| 369 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { | 369 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { |
| 370 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration
= {"secureContextRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal:
:secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecur
eContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback,
0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8
DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMCon
figuration::CheckHolder}; | 370 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration
= {"secureContextRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal:
:secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecur
eContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback,
0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8
DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 371 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje
ct>(), prototypeObject, interfaceObject, signature, accessorConfiguration); | 371 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje
ct>(), prototypeObject, interfaceObject, signature, accessorConfiguration); |
| 372 } | 372 } |
| 373 } | 373 } |
| 374 if (executionContext && (executionContext->isDocument())) { | 374 if (executionContext && (executionContext->isDocument())) { |
| 375 if (executionContext && (executionContext->isSecureContext())) { | 375 if (executionContext && (executionContext->isSecureContext())) { |
| 376 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration
= {"secureContextWindowExposedAttribute", TestInterfaceSecureContextV8Internal::
secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceSecureC
ontextV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0,
0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfig
uration::CheckHolder}; | 376 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration
= {"secureContextWindowExposedAttribute", TestInterfaceSecureContextV8Internal::
secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceSecureC
ontextV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0,
0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 377 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje
ct>(), prototypeObject, interfaceObject, signature, accessorConfiguration); | 377 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje
ct>(), prototypeObject, interfaceObject, signature, accessorConfiguration); |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 380 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
| 381 if (executionContext && (executionContext->isSecureContext())) { | 381 if (executionContext && (executionContext->isSecureContext())) { |
| 382 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration
= {"secureContextWorkerExposedAttribute", TestInterfaceSecureContextV8Internal::
secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceSecureC
ontextV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0,
0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfig
uration::CheckHolder}; | 382 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration
= {"secureContextWorkerExposedAttribute", TestInterfaceSecureContextV8Internal::
secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceSecureC
ontextV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0,
0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 383 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje
ct>(), prototypeObject, interfaceObject, signature, accessorConfiguration); | 383 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje
ct>(), prototypeObject, interfaceObject, signature, accessorConfiguration); |
| 384 } | 384 } |
| 385 } | 385 } |
| 386 if (executionContext && (executionContext->isDocument())) { | 386 if (executionContext && (executionContext->isDocument())) { |
| 387 if (executionContext && (executionContext->isSecureContext())) { | 387 if (executionContext && (executionContext->isSecureContext())) { |
| 388 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { | 388 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { |
| 389 const V8DOMConfiguration::AccessorConfiguration accessorConfigurat
ion = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceSecureC
ontextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGett
erCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedRunt
imeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 389 const V8DOMConfiguration::AccessorConfiguration accessorConfigurat
ion = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceSecureC
ontextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGett
erCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedRunt
imeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMC
onfiguration::CheckHolder}; |
| 390 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::
Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); | 390 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::
Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); |
| 391 } | 391 } |
| 392 } | 392 } |
| 393 } | 393 } |
| 394 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 394 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
| 395 if (executionContext && (executionContext->isSecureContext())) { | 395 if (executionContext && (executionContext->isSecureContext())) { |
| 396 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { | 396 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { |
| 397 const V8DOMConfiguration::AccessorConfiguration accessorConfigurat
ion = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceSecureC
ontextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGett
erCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRunt
imeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 397 const V8DOMConfiguration::AccessorConfiguration accessorConfigurat
ion = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceSecureC
ontextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGett
erCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRunt
imeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMC
onfiguration::CheckHolder}; |
| 398 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::
Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); | 398 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::
Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); |
| 399 } | 399 } |
| 400 } | 400 } |
| 401 } | 401 } |
| 402 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 402 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
| 403 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creat
ionContext()); | 403 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creat
ionContext()); |
| 404 DCHECK(executionContext); | 404 DCHECK(executionContext); |
| 405 if (executionContext && (executionContext->isSecureContext())) { | 405 if (executionContext && (executionContext->isSecureContext())) { |
| 406 const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodCon
figuration = {"secureContextMethod", TestInterfaceSecureContextV8Internal::secur
eContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllSc
ripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 406 const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodCon
figuration = {"secureContextMethod", TestInterfaceSecureContextV8Internal::secur
eContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V
8DOMConfiguration::CheckHolder}; |
| 407 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, secureContextMethodMethodConfigura
tion); | 407 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, secureContextMethodMethodConfigura
tion); |
| 408 } | 408 } |
| 409 if (executionContext && (executionContext->isSecureContext())) { | 409 if (executionContext && (executionContext->isSecureContext())) { |
| 410 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { | 410 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { |
| 411 const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnab
ledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfa
ceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0
, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto
type, V8DOMConfiguration::CheckHolder}; | 411 const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnab
ledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfa
ceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0
, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 412 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object
>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMet
hodMethodConfiguration); | 412 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object
>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMet
hodMethodConfiguration); |
| 413 } | 413 } |
| 414 } | 414 } |
| 415 if (executionContext && (executionContext->isSecureContext())) { | 415 if (executionContext && (executionContext->isSecureContext())) { |
| 416 if (executionContext && (executionContext->isDocument())) { | 416 if (executionContext && (executionContext->isDocument())) { |
| 417 const V8DOMConfiguration::MethodConfiguration secureContextWindowExpos
edMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterface
SecureContextV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp
e, V8DOMConfiguration::CheckHolder}; | 417 const V8DOMConfiguration::MethodConfiguration secureContextWindowExpos
edMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterface
SecureContextV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 418 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object
>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMeth
odMethodConfiguration); | 418 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object
>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMeth
odMethodConfiguration); |
| 419 } | 419 } |
| 420 } | 420 } |
| 421 if (executionContext && (executionContext->isSecureContext())) { | 421 if (executionContext && (executionContext->isSecureContext())) { |
| 422 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 422 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
| 423 const V8DOMConfiguration::MethodConfiguration secureContextWorkerExpos
edMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterface
SecureContextV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp
e, V8DOMConfiguration::CheckHolder}; | 423 const V8DOMConfiguration::MethodConfiguration secureContextWorkerExpos
edMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterface
SecureContextV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 424 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object
>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMeth
odMethodConfiguration); | 424 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object
>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMeth
odMethodConfiguration); |
| 425 } | 425 } |
| 426 } | 426 } |
| 427 if (executionContext && (executionContext->isSecureContext())) { | 427 if (executionContext && (executionContext->isSecureContext())) { |
| 428 if (executionContext && (executionContext->isDocument())) { | 428 if (executionContext && (executionContext->isDocument())) { |
| 429 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { | 429 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { |
| 430 const V8DOMConfiguration::MethodConfiguration secureContextWindowE
xposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRunt
imeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExpo
sedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::Expos
edToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder
}; | 430 const V8DOMConfiguration::MethodConfiguration secureContextWindowE
xposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRunt
imeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExpo
sedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPro
totype, V8DOMConfiguration::CheckHolder}; |
| 431 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Ob
ject>(), prototypeObject, interfaceObject, signature, secureContextWindowExposed
RuntimeEnabledMethodMethodConfiguration); | 431 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Ob
ject>(), prototypeObject, interfaceObject, signature, secureContextWindowExposed
RuntimeEnabledMethodMethodConfiguration); |
| 432 } | 432 } |
| 433 } | 433 } |
| 434 } | 434 } |
| 435 if (executionContext && (executionContext->isSecureContext())) { | 435 if (executionContext && (executionContext->isSecureContext())) { |
| 436 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 436 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
| 437 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { | 437 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { |
| 438 const V8DOMConfiguration::MethodConfiguration secureContextWorkerE
xposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRunt
imeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExpo
sedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::Expos
edToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder
}; | 438 const V8DOMConfiguration::MethodConfiguration secureContextWorkerE
xposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRunt
imeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExpo
sedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPro
totype, V8DOMConfiguration::CheckHolder}; |
| 439 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Ob
ject>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposed
RuntimeEnabledMethodMethodConfiguration); | 439 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Ob
ject>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposed
RuntimeEnabledMethodMethodConfiguration); |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 | 444 |
| 445 } // namespace blink | 445 } // namespace blink |
| OLD | NEW |