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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface.cpp

Issue 1085453003: IDL: Add support for [Unscopeable] on attributes and methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixes Created 5 years, 8 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. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface.h" 9 #include "V8TestInterface.h"
10 10
(...skipping 23 matching lines...) Expand all
34 #include "core/frame/UseCounter.h" 34 #include "core/frame/UseCounter.h"
35 #include "core/inspector/ConsoleMessage.h" 35 #include "core/inspector/ConsoleMessage.h"
36 #include "platform/RuntimeEnabledFeatures.h" 36 #include "platform/RuntimeEnabledFeatures.h"
37 #include "platform/ScriptForbiddenScope.h" 37 #include "platform/ScriptForbiddenScope.h"
38 #include "platform/TraceEvent.h" 38 #include "platform/TraceEvent.h"
39 #include "wtf/GetPtr.h" 39 #include "wtf/GetPtr.h"
40 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8Test Interface::domTemplate, V8TestInterface::refObject, V8TestInterface::derefObject , V8TestInterface::trace, V8TestInterface::toActiveDOMObject, V8TestInterface::v isitDOMWrapper, V8TestInterface::installConditionallyEnabledMethods, V8TestInter face::installConditionallyEnabledProperties, "TestInterface", &V8TestInterfaceEm pty::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeIn fo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo:: Dependent, WrapperTypeInfo::RefCountedObject }; 44 WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8Test Interface::domTemplate, V8TestInterface::refObject, V8TestInterface::derefObject , V8TestInterface::trace, V8TestInterface::toActiveDOMObject, V8TestInterface::v isitDOMWrapper, V8TestInterface::preparePrototypeObject, V8TestInterface::instal lConditionallyEnabledProperties, "TestInterface", &V8TestInterfaceEmpty::wrapper TypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectCl assId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent, W rapperTypeInfo::RefCountedObject };
45 45
46 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eImplementation.h. 46 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eImplementation.h.
47 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 47 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
48 // bindings/core/v8/ScriptWrappable.h. 48 // bindings/core/v8/ScriptWrappable.h.
49 const WrapperTypeInfo& TestInterfaceImplementation::s_wrapperTypeInfo = V8TestIn terface::wrapperTypeInfo; 49 const WrapperTypeInfo& TestInterfaceImplementation::s_wrapperTypeInfo = V8TestIn terface::wrapperTypeInfo;
50 50
51 namespace TestInterfaceImplementationV8Internal { 51 namespace TestInterfaceImplementationV8Internal {
52 static void (*voidMethodPartialOverloadMethodForPartialInterface)(const v8::Func tionCallbackInfo<v8::Value>&) = 0; 52 static void (*voidMethodPartialOverloadMethodForPartialInterface)(const v8::Func tionCallbackInfo<v8::Value>&) = 0;
53 static void (*staticVoidMethodPartialOverloadMethodForPartialInterface)(const v8 ::FunctionCallbackInfo<v8::Value>&) = 0; 53 static void (*staticVoidMethodPartialOverloadMethodForPartialInterface)(const v8 ::FunctionCallbackInfo<v8::Value>&) = 0;
54 static void (*promiseMethodPartialOverloadMethodForPartialInterface)(const v8::F unctionCallbackInfo<v8::Value>&) = 0; 54 static void (*promiseMethodPartialOverloadMethodForPartialInterface)(const v8::F unctionCallbackInfo<v8::Value>&) = 0;
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { 2415 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
2416 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partia l2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::p artial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 2416 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partia l2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::p artial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
2417 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration); 2417 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
2418 } 2418 }
2419 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { 2419 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
2420 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal:: partial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV 8Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_c ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None ), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 2420 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal:: partial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV 8Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_c ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None ), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
2421 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration); 2421 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
2422 } 2422 }
2423 } 2423 }
2424 2424
2425 void V8TestInterface::installConditionallyEnabledMethods(v8::Local<v8::Object> p rototypeObject, v8::Isolate* isolate) 2425 void V8TestInterface::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8: :Object> prototypeObject)
2426 { 2426 {
2427 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 2427 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
2428 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 2428 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
2429 ASSERT(context); 2429 ASSERT(context);
2430
2431 if (context && (context->isWorkerGlobalScope())) { 2430 if (context && (context->isWorkerGlobalScope())) {
2432 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isola te->GetCurrentContext()).ToLocalChecked()); 2431 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isola te->GetCurrentContext()).ToLocalChecked());
2433 } 2432 }
2434 if (context && (context->isDocument())) { 2433 if (context && (context->isDocument())) {
2435 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isola te->GetCurrentContext()).ToLocalChecked()); 2434 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isola te->GetCurrentContext()).ToLocalChecked());
2436 } 2435 }
2437 if (context && (context->isDocument())) { 2436 if (context && (context->isDocument())) {
2438 if (RuntimeEnabledFeatures::featureNameEnabled()) { 2437 if (RuntimeEnabledFeatures::featureNameEnabled()) {
2439 prototypeObject->Set(v8AtomicString(isolate, "methodWithExposedAndRu ntimeEnabledFlag"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementati onV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, v8Undefined( ), defaultSignature, 0)->GetFunction(isolate->GetCurrentContext()).ToLocalChecke d()); 2438 prototypeObject->Set(v8AtomicString(isolate, "methodWithExposedAndRu ntimeEnabledFlag"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementati onV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, v8Undefined( ), defaultSignature, 0)->GetFunction(isolate->GetCurrentContext()).ToLocalChecke d());
2440 } 2439 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2541 2540
2542 ScriptState::Scope scope(scriptState); 2541 ScriptState::Scope scope(scriptState);
2543 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 2542 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
2544 2543
2545 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); 2544 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate());
2546 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue)); 2545 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue));
2547 } 2546 }
2548 2547
2549 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate; 2548 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate;
2550 2549
2551 void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTempl ateFunction, InstallConditionallyEnabledMethodsFunction installConditionallyEnab ledMethodsFunction) 2550 void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTempl ateFunction, PreparePrototypeObjectFunction preparePrototypeObjectFunction)
2552 { 2551 {
2553 V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFun ction; 2552 V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFun ction;
2554 if (installConditionallyEnabledMethodsFunction) 2553 if (preparePrototypeObjectFunction)
2555 V8TestInterface::wrapperTypeInfo.installConditionallyEnabledMethodsFunct ion = installConditionallyEnabledMethodsFunction; 2554 V8TestInterface::wrapperTypeInfo.preparePrototypeObjectFunction = prepar ePrototypeObjectFunction;
2556 } 2555 }
2557 2556
2558 void V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface (void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2557 void V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface (void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2559 { 2558 {
2560 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodForPar tialInterface = method; 2559 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodForPar tialInterface = method;
2561 } 2560 }
2562 void V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2561 void V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2563 { 2562 {
2564 TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod ForPartialInterface = method; 2563 TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod ForPartialInterface = method;
2565 } 2564 }
2566 void V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterf ace(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2565 void V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterf ace(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2567 { 2566 {
2568 TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethodFor PartialInterface = method; 2567 TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethodFor PartialInterface = method;
2569 } 2568 }
2570 void V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartial Interface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2569 void V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartial Interface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2571 { 2570 {
2572 TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMet hodForPartialInterface = method; 2571 TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMet hodForPartialInterface = method;
2573 } 2572 }
2574 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2573 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&))
2575 { 2574 {
2576 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; 2575 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2577 } 2576 }
2578 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2577 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2579 { 2578 {
2580 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; 2579 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2581 } 2580 }
2582 } // namespace blink 2581 } // namespace blink
2583 #endif // ENABLE(CONDITION) 2582 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface.h ('k') | Source/bindings/tests/results/core/V8TestInterface2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698