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. 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 #include "V8TestInterface2.h" | 8 #include "V8TestInterface2.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 TestInterface2* impl = scriptWrappable->toImpl<TestInterface2>(); | 601 TestInterface2* impl = scriptWrappable->toImpl<TestInterface2>(); |
602 // The ownerNode() method may return a reference or a pointer. | 602 // The ownerNode() method may return a reference or a pointer. |
603 if (Node* owner = WTF::getPtr(impl->ownerNode())) { | 603 if (Node* owner = WTF::getPtr(impl->ownerNode())) { |
604 Node* root = V8GCController::opaqueRootForGC(isolate, owner); | 604 Node* root = V8GCController::opaqueRootForGC(isolate, owner); |
605 isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(r
oot)), wrapper); | 605 isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(r
oot)), wrapper); |
606 return; | 606 return; |
607 } | 607 } |
608 } | 608 } |
609 | 609 |
610 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { | 610 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { |
611 {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, V8DOMConfigurat
ion::ExposedToAllScripts}, | 611 {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
612 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf
iguration::ExposedToAllScripts}, | 612 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf
iguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
613 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | 613 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
614 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM
Configuration::ExposedToAllScripts}, | 614 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
615 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2,
V8DOMConfiguration::ExposedToAllScripts}, | 615 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2,
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
616 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 616 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}
, |
617 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 617 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProtot
ype}, |
618 {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, | 618 {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
619 {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, | 619 {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
620 {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConf
iguration::ExposedToAllScripts}, | 620 {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConf
iguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
621 {"forEach", TestInterface2V8Internal::forEachMethodCallback, 0, 1, V8DOMConf
iguration::ExposedToAllScripts}, | 621 {"forEach", TestInterface2V8Internal::forEachMethodCallback, 0, 1, V8DOMConf
iguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
622 {"has", TestInterface2V8Internal::hasMethodCallback, 0, 1, V8DOMConfiguratio
n::ExposedToAllScripts}, | 622 {"has", TestInterface2V8Internal::hasMethodCallback, 0, 1, V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
623 {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | 623 {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
624 }; | 624 }; |
625 | 625 |
626 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 626 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
627 { | 627 { |
628 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 628 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
629 if (!info.IsConstructCall()) { | 629 if (!info.IsConstructCall()) { |
630 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface2")); | 630 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface2")); |
631 return; | 631 return; |
632 } | 632 } |
633 | 633 |
(...skipping 28 matching lines...) Expand all Loading... |
662 { | 662 { |
663 v8::IndexedPropertyHandlerConfiguration config(TestInterface2V8Internal:
:indexedPropertyGetterCallback, TestInterface2V8Internal::indexedPropertySetterC
allback, 0, TestInterface2V8Internal::indexedPropertyDeleterCallback, indexedPro
pertyEnumerator<TestInterface2>); | 663 v8::IndexedPropertyHandlerConfiguration config(TestInterface2V8Internal:
:indexedPropertyGetterCallback, TestInterface2V8Internal::indexedPropertySetterC
allback, 0, TestInterface2V8Internal::indexedPropertyDeleterCallback, indexedPro
pertyEnumerator<TestInterface2>); |
664 functionTemplate->InstanceTemplate()->SetHandler(config); | 664 functionTemplate->InstanceTemplate()->SetHandler(config); |
665 } | 665 } |
666 { | 666 { |
667 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr
ings); | 667 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr
ings); |
668 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); | 668 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); |
669 v8::NamedPropertyHandlerConfiguration config(TestInterface2V8Internal::n
amedPropertyGetterCallback, TestInterface2V8Internal::namedPropertySetterCallbac
k, TestInterface2V8Internal::namedPropertyQueryCallback, TestInterface2V8Interna
l::namedPropertyDeleterCallback, TestInterface2V8Internal::namedPropertyEnumerat
orCallback, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags
)); | 669 v8::NamedPropertyHandlerConfiguration config(TestInterface2V8Internal::n
amedPropertyGetterCallback, TestInterface2V8Internal::namedPropertySetterCallbac
k, TestInterface2V8Internal::namedPropertyQueryCallback, TestInterface2V8Interna
l::namedPropertyDeleterCallback, TestInterface2V8Internal::namedPropertyEnumerat
orCallback, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags
)); |
670 functionTemplate->InstanceTemplate()->SetHandler(config); | 670 functionTemplate->InstanceTemplate()->SetHandler(config); |
671 } | 671 } |
672 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator
Configuration = { v8::Symbol::GetIterator, TestInterface2V8Internal::iteratorMet
hodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 672 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator
Configuration = { v8::Symbol::GetIterator, TestInterface2V8Internal::iteratorMet
hodCallback, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnP
rototype }; |
673 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); | 673 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); |
674 | 674 |
675 // Custom toString template | 675 // Custom toString template |
676 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 676 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
677 } | 677 } |
678 | 678 |
679 v8::Local<v8::FunctionTemplate> V8TestInterface2::domTemplate(v8::Isolate* isola
te) | 679 v8::Local<v8::FunctionTemplate> V8TestInterface2::domTemplate(v8::Isolate* isola
te) |
680 { | 680 { |
681 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface2Template); | 681 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface2Template); |
682 } | 682 } |
(...skipping 17 matching lines...) Expand all Loading... |
700 { | 700 { |
701 scriptWrappable->toImpl<TestInterface2>()->ref(); | 701 scriptWrappable->toImpl<TestInterface2>()->ref(); |
702 } | 702 } |
703 | 703 |
704 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) | 704 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) |
705 { | 705 { |
706 scriptWrappable->toImpl<TestInterface2>()->deref(); | 706 scriptWrappable->toImpl<TestInterface2>()->deref(); |
707 } | 707 } |
708 | 708 |
709 } // namespace blink | 709 } // namespace blink |
OLD | NEW |