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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp

Issue 2758893002: Slim V8DOMConfiguration structs for attributes and accessors. (Closed)
Patch Set: Created 3 years, 9 months 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 unified diff | Download patch
OLDNEW
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 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
10 10
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 return V8TestInterfaceSecureContext::toImplWithTypeCheck(isolate, value); 366 return V8TestInterfaceSecureContext::toImplWithTypeCheck(isolate, value);
367 } 367 }
368 368
369 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) { 369 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) {
370 v8::Isolate* isolate = context->GetIsolate(); 370 v8::Isolate* isolate = context->GetIsolate();
371 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 371 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
372 ExecutionContext* executionContext = toExecutionContext(context); 372 ExecutionContext* executionContext = toExecutionContext(context);
373 DCHECK(executionContext); 373 DCHECK(executionContext);
374 374
375 if (executionContext && (executionContext->isSecureContext())) { 375 if (executionContext && (executionContext->isSecureContext())) {
376 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"se cureContextAttribute", V8TestInterfaceSecureContext::secureContextAttributeAttri buteGetterCallback, V8TestInterfaceSecureContext::secureContextAttributeAttribut eSetterCallback, nullptr, nullptr, nullptr, nullptr, static_cast<v8::PropertyAtt ribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHol der}; 376 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration [] = {
377 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); 377 {"secureContextAttribute", V8TestInterfaceSecureContext::secureContextAttr ibuteAttributeGetterCallback, V8TestInterfaceSecureContext::secureContextAttribu teAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>( v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8D OMConfiguration::AllWorlds}
378 };
379 for (const auto& accessorConfig : accessorConfiguration)
380 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfig);
378 } 381 }
379 if (executionContext && (executionContext->isSecureContext())) { 382 if (executionContext && (executionContext->isSecureContext())) {
380 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { 383 if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
381 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {" secureContextRuntimeEnabledAttribute", V8TestInterfaceSecureContext::secureConte xtRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecureContext:: secureContextRuntimeEnabledAttributeAttributeSetterCallback, nullptr, nullptr, n ullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio n::OnPrototype, V8DOMConfiguration::CheckHolder}; 384 static const V8DOMConfiguration::AccessorConfiguration accessorConfigurati on[] = {
382 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfiguration); 385 {"secureContextRuntimeEnabledAttribute", V8TestInterfaceSecureContext::s ecureContextRuntimeEnabledAttributeAttributeGetterCallback, V8TestInterfaceSecur eContext::secureContextRuntimeEnabledAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPro totype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::AllWorlds}
386 };
387 for (const auto& accessorConfig : accessorConfiguration)
388 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, accessorConfig);
383 } 389 }
384 } 390 }
385 if (executionContext && (executionContext->isDocument())) { 391 if (executionContext && (executionContext->isDocument())) {
386 if (executionContext && (executionContext->isSecureContext())) { 392 if (executionContext && (executionContext->isSecureContext())) {
387 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {" secureContextWindowExposedAttribute", V8TestInterfaceSecureContext::secureContex tWindowExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::se cureContextWindowExposedAttributeAttributeSetterCallback, nullptr, nullptr, null ptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration:: OnPrototype, V8DOMConfiguration::CheckHolder}; 393 static const V8DOMConfiguration::AccessorConfiguration accessorConfigurati on[] = {
388 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfiguration); 394 {"secureContextWindowExposedAttribute", V8TestInterfaceSecureContext::se cureContextWindowExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureC ontext::secureContextWindowExposedAttributeAttributeSetterCallback, nullptr, nul lptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnProtot ype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::AllWorlds}
395 };
396 for (const auto& accessorConfig : accessorConfiguration)
397 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, accessorConfig);
389 } 398 }
390 } 399 }
391 if (executionContext && (executionContext->isWorkerGlobalScope())) { 400 if (executionContext && (executionContext->isWorkerGlobalScope())) {
392 if (executionContext && (executionContext->isSecureContext())) { 401 if (executionContext && (executionContext->isSecureContext())) {
393 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {" secureContextWorkerExposedAttribute", V8TestInterfaceSecureContext::secureContex tWorkerExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureContext::se cureContextWorkerExposedAttributeAttributeSetterCallback, nullptr, nullptr, null ptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration:: OnPrototype, V8DOMConfiguration::CheckHolder}; 402 static const V8DOMConfiguration::AccessorConfiguration accessorConfigurati on[] = {
394 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfiguration); 403 {"secureContextWorkerExposedAttribute", V8TestInterfaceSecureContext::se cureContextWorkerExposedAttributeAttributeGetterCallback, V8TestInterfaceSecureC ontext::secureContextWorkerExposedAttributeAttributeSetterCallback, nullptr, nul lptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnProtot ype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::AllWorlds}
404 };
405 for (const auto& accessorConfig : accessorConfiguration)
406 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, accessorConfig);
395 } 407 }
396 } 408 }
397 if (executionContext && (executionContext->isDocument())) { 409 if (executionContext && (executionContext->isDocument())) {
398 if (executionContext && (executionContext->isSecureContext())) { 410 if (executionContext && (executionContext->isSecureContext())) {
399 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { 411 if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
400 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", V8TestInterfaceSecureConte xt::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, V8 TestInterfaceSecureContext::secureContextWindowExposedRuntimeEnabledAttributeAtt ributeSetterCallback, nullptr, nullptr, nullptr, nullptr, static_cast<v8::Proper tyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Che ckHolder}; 412 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion[] = {
401 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, accessorConfiguration); 413 {"secureContextWindowExposedRuntimeEnabledAttribute", V8TestInterfaceS ecureContext::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCa llback, V8TestInterfaceSecureContext::secureContextWindowExposedRuntimeEnabledAt tributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttrib ute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder , V8DOMConfiguration::AllWorlds}
414 };
415 for (const auto& accessorConfig : accessorConfiguration)
416 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje ct>(), prototypeObject, interfaceObject, signature, accessorConfig);
402 } 417 }
403 } 418 }
404 } 419 }
405 if (executionContext && (executionContext->isWorkerGlobalScope())) { 420 if (executionContext && (executionContext->isWorkerGlobalScope())) {
406 if (executionContext && (executionContext->isSecureContext())) { 421 if (executionContext && (executionContext->isSecureContext())) {
407 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { 422 if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
408 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterfaceSecureConte xt::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, V8 TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnabledAttributeAtt ributeSetterCallback, nullptr, nullptr, nullptr, nullptr, static_cast<v8::Proper tyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Che ckHolder}; 423 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion[] = {
409 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, accessorConfiguration); 424 {"secureContextWorkerExposedRuntimeEnabledAttribute", V8TestInterfaceS ecureContext::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCa llback, V8TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnabledAt tributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttrib ute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder , V8DOMConfiguration::AllWorlds}
425 };
426 for (const auto& accessorConfig : accessorConfiguration)
427 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Obje ct>(), prototypeObject, interfaceObject, signature, accessorConfig);
410 } 428 }
411 } 429 }
412 } 430 }
413 if (executionContext && (executionContext->isSecureContext())) { 431 if (executionContext && (executionContext->isSecureContext())) {
414 const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfi guration[] = { 432 const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfi guration[] = {
415 {"secureContextMethod", V8TestInterfaceSecureContext::secureContextMethodM ethodCallback, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration: :CheckHolder, V8DOMConfiguration::DoNotCheckAccess, V8DOMConfiguration::AllWorld s} 433 {"secureContextMethod", V8TestInterfaceSecureContext::secureContextMethodM ethodCallback, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration: :CheckHolder, V8DOMConfiguration::DoNotCheckAccess, V8DOMConfiguration::AllWorld s}
416 }; 434 };
417 for (const auto& methodConfig : secureContextMethodMethodConfiguration) 435 for (const auto& methodConfig : secureContextMethodMethodConfiguration)
418 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig); 436 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig);
419 } 437 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 {"secureContextWorkerExposedRuntimeEnabledMethod", V8TestInterfaceSecu reContext::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, v8:: None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMCon figuration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds} 480 {"secureContextWorkerExposedRuntimeEnabledMethod", V8TestInterfaceSecu reContext::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, v8:: None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMCon figuration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}
463 }; 481 };
464 for (const auto& methodConfig : secureContextWorkerExposedRuntimeEnabled MethodMethodConfiguration) 482 for (const auto& methodConfig : secureContextWorkerExposedRuntimeEnabled MethodMethodConfiguration)
465 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, methodConfig); 483 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, methodConfig);
466 } 484 }
467 } 485 }
468 } 486 }
469 } 487 }
470 488
471 } // namespace blink 489 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698