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

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

Issue 2692343006: [Bindings] Declare signature and executionContext once (Closed)
Patch Set: Add a test Created 3 years, 10 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 v8::Local<v8::Object> V8TestInterfaceSecureContext::findInstanceInPrototypeChain (v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { 355 v8::Local<v8::Object> V8TestInterfaceSecureContext::findInstanceInPrototypeChain (v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
356 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value); 356 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value);
357 } 357 }
358 358
359 TestInterfaceSecureContext* V8TestInterfaceSecureContext::toImplWithTypeCheck(v8 ::Isolate* isolate, v8::Local<v8::Value> value) { 359 TestInterfaceSecureContext* V8TestInterfaceSecureContext::toImplWithTypeCheck(v8 ::Isolate* isolate, v8::Local<v8::Value> value) {
360 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr; 360 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr;
361 } 361 }
362 362
363 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) { 363 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) {
364 v8::Isolate* isolate = context->GetIsolate(); 364 v8::Isolate* isolate = context->GetIsolate();
365 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
366 ExecutionContext* executionContext = toExecutionContext(context);
367 DCHECK(executionContext);
365 368
366 ExecutionContext* executionContext = toExecutionContext(context);
367 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
368 if (executionContext && (executionContext->isSecureContext())) { 369 if (executionContext && (executionContext->isSecureContext())) {
369 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}; 370 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};
370 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); 371 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
371 } 372 }
372 if (executionContext && (executionContext->isSecureContext())) { 373 if (executionContext && (executionContext->isSecureContext())) {
373 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { 374 if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
374 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}; 375 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};
375 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfiguration); 376 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfiguration);
376 } 377 }
377 } 378 }
(...skipping 18 matching lines...) Expand all
396 } 397 }
397 } 398 }
398 if (executionContext && (executionContext->isWorkerGlobalScope())) { 399 if (executionContext && (executionContext->isWorkerGlobalScope())) {
399 if (executionContext && (executionContext->isSecureContext())) { 400 if (executionContext && (executionContext->isSecureContext())) {
400 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { 401 if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
401 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}; 402 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};
402 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, accessorConfiguration); 403 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, accessorConfiguration);
403 } 404 }
404 } 405 }
405 } 406 }
406 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
407 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creat ionContext());
408 DCHECK(executionContext);
409 if (executionContext && (executionContext->isSecureContext())) { 407 if (executionContext && (executionContext->isSecureContext())) {
410 const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfi guration = {"secureContextMethod", V8TestInterfaceSecureContext::secureContextMe thodMethodCallback, nullptr, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOM Configuration::CheckHolder}; 408 const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfi guration = {"secureContextMethod", V8TestInterfaceSecureContext::secureContextMe thodMethodCallback, nullptr, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOM Configuration::CheckHolder};
411 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, secureContextMethodMethodConfigurati on); 409 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, secureContextMethodMethodConfigurati on);
412 } 410 }
413 if (executionContext && (executionContext->isSecureContext())) { 411 if (executionContext && (executionContext->isSecureContext())) {
414 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { 412 if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
415 const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledM ethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", V8TestInterface SecureContext::secureContextRuntimeEnabledMethodMethodCallback, nullptr, 0, v8:: None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 413 const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledM ethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", V8TestInterface SecureContext::secureContextRuntimeEnabledMethodMethodCallback, nullptr, 0, v8:: None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
416 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodM ethodConfiguration); 414 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodM ethodConfiguration);
417 } 415 }
418 } 416 }
(...skipping 21 matching lines...) Expand all
440 if (executionContext && (executionContext->isWorkerGlobalScope())) { 438 if (executionContext && (executionContext->isWorkerGlobalScope())) {
441 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { 439 if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
442 const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposed RuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEna bledMethod", V8TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnab ledMethodMethodCallback, nullptr, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 440 const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposed RuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEna bledMethod", V8TestInterfaceSecureContext::secureContextWorkerExposedRuntimeEnab ledMethodMethodCallback, nullptr, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
443 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntim eEnabledMethodMethodConfiguration); 441 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntim eEnabledMethodMethodConfiguration);
444 } 442 }
445 } 443 }
446 } 444 }
447 } 445 }
448 446
449 } // namespace blink 447 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698