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

Side by Side Diff: Source/bindings/tests/results/V8SupportTestInterface.cpp

Issue 26547005: IDL compiler: [PerContextEnabled] for getters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reupload Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows: 53 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows:
54 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function 54 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
55 // in the global namespace. 55 // in the global namespace.
56 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c) 56 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c)
57 void webCoreInitializeScriptWrappableForInterface(WebCore::SupportTestInterface* object) 57 void webCoreInitializeScriptWrappableForInterface(WebCore::SupportTestInterface* object)
58 { 58 {
59 WebCore::initializeScriptWrappableForInterface(object); 59 WebCore::initializeScriptWrappableForInterface(object);
60 } 60 }
61 61
62 namespace WebCore { 62 namespace WebCore {
63 WrapperTypeInfo V8SupportTestInterface::info = { V8SupportTestInterface::GetTemp late, V8SupportTestInterface::derefObject, 0, 0, 0, V8SupportTestInterface::inst allPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype }; 63 WrapperTypeInfo V8SupportTestInterface::info = { V8SupportTestInterface::GetTemp late, V8SupportTestInterface::derefObject, 0, 0, 0, V8SupportTestInterface::inst allPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype };
64 64
65 namespace SupportTestInterfaceV8Internal { 65 namespace SupportTestInterfaceV8Internal {
66 66
67 template <typename T> void V8_USE(T) { } 67 template <typename T> void V8_USE(T) { }
68 68
69 #if ENABLE(Condition11) || ENABLE(Condition12) 69 #if ENABLE(Condition11) || ENABLE(Condition12)
70 static void supplementalStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 70 static void supplementalStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
71 { 71 {
72 v8SetReturnValueInt(info, SupportTestPartialInterface::supplementalStaticRea dOnlyAttr()); 72 v8SetReturnValueInt(info, SupportTestPartialInterface::supplementalStaticRea dOnlyAttr());
73 } 73 }
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor ldType); 497 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor ldType);
498 } 498 }
499 499
500 bool V8SupportTestInterface::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate* isolate) 500 bool V8SupportTestInterface::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate* isolate)
501 { 501 {
502 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) 502 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld)
503 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo rld) 503 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo rld)
504 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl d); 504 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl d);
505 } 505 }
506 506
507 void V8SupportTestInterface::installPerContextProperties(v8::Handle<v8::Object> instance, SupportTestInterface* impl, v8::Isolate* isolate) 507 void V8SupportTestInterface::installPerContextEnabledProperties(v8::Handle<v8::O bject> instance, SupportTestInterface* impl, v8::Isolate* isolate)
508 { 508 {
509 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto type()); 509 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto type());
510
511 #if ENABLE(Condition11) || ENABLE(Condition12)
512 if (ContextFeatures::featureName14Enabled(impl->document())) { 510 if (ContextFeatures::featureName14Enabled(impl->document())) {
513 static const V8DOMConfiguration::AttributeConfiguration attributeConf iguration =\ 511 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
514 {"Node14", SupportTestInterfaceV8Internal::Node14AttributeGetterCallback , SupportTestInterfaceV8Internal::Node14AttributeSetterCallback, 0, 0, 0, static _cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No ne), 0 /* on instance */}; 512 {"Node14", SupportTestInterfaceV8Internal::Node14AttributeGetterCallback , SupportTestInterfaceV8Internal::Node14AttributeSetterCallback, 0, 0, 0, static _cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No ne), 0 /* on instance */};
515 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate); 513 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate);
516 } 514 }
517 #endif // ENABLE(Condition11) || ENABLE(Condition12)
518 } 515 }
519 516
520 v8::Handle<v8::Object> V8SupportTestInterface::createWrapper(PassRefPtr<SupportT estInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate ) 517 v8::Handle<v8::Object> V8SupportTestInterface::createWrapper(PassRefPtr<SupportT estInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate )
521 { 518 {
522 ASSERT(impl); 519 ASSERT(impl);
523 ASSERT(!DOMDataStore::containsWrapper<V8SupportTestInterface>(impl.get(), is olate)); 520 ASSERT(!DOMDataStore::containsWrapper<V8SupportTestInterface>(impl.get(), is olate));
524 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 521 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
525 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); 522 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get());
526 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 523 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have
527 // the same object de-ref functions, though, so use that as the basis of the check. 524 // the same object de-ref functions, though, so use that as the basis of the check.
528 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction); 525 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction);
529 } 526 }
530 527
531 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &info, toInternalPointer(impl.get()), isolate); 528 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &info, toInternalPointer(impl.get()), isolate);
532 if (UNLIKELY(wrapper.IsEmpty())) 529 if (UNLIKELY(wrapper.IsEmpty()))
533 return wrapper; 530 return wrapper;
534 531
535 installPerContextProperties(wrapper, impl.get(), isolate); 532 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
536 V8DOMWrapper::associateObjectWithWrapper<V8SupportTestInterface>(impl, &info , wrapper, isolate, WrapperConfiguration::Independent); 533 V8DOMWrapper::associateObjectWithWrapper<V8SupportTestInterface>(impl, &info , wrapper, isolate, WrapperConfiguration::Independent);
537 return wrapper; 534 return wrapper;
538 } 535 }
539 536
540 void V8SupportTestInterface::derefObject(void* object) 537 void V8SupportTestInterface::derefObject(void* object)
541 { 538 {
542 fromInternalPointer(object)->deref(); 539 fromInternalPointer(object)->deref();
543 } 540 }
544 541
545 } // namespace WebCore 542 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8SupportTestInterface.h ('k') | Source/bindings/tests/results/V8TestActiveDOMObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698