| 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 "V8TestInterface3.h" | 8 #include "V8TestInterface3.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| 11 #include "bindings/core/v8/ScriptState.h" |
| 11 #include "bindings/core/v8/V8DOMConfiguration.h" | 12 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 12 #include "bindings/core/v8/V8HiddenValue.h" | 13 #include "bindings/core/v8/V8HiddenValue.h" |
| 14 #include "bindings/core/v8/V8Iterator.h" |
| 13 #include "bindings/core/v8/V8Node.h" | 15 #include "bindings/core/v8/V8Node.h" |
| 14 #include "bindings/core/v8/V8ObjectConstructor.h" | 16 #include "bindings/core/v8/V8ObjectConstructor.h" |
| 15 #include "core/dom/ContextFeatures.h" | 17 #include "core/dom/ContextFeatures.h" |
| 16 #include "core/dom/Document.h" | 18 #include "core/dom/Document.h" |
| 17 #include "platform/RuntimeEnabledFeatures.h" | 19 #include "platform/RuntimeEnabledFeatures.h" |
| 18 #include "platform/TraceEvent.h" | 20 #include "platform/TraceEvent.h" |
| 19 #include "wtf/GetPtr.h" | 21 #include "wtf/GetPtr.h" |
| 20 #include "wtf/RefPtr.h" | 22 #include "wtf/RefPtr.h" |
| 21 | 23 |
| 22 namespace blink { | 24 namespace blink { |
| 23 | 25 |
| 24 const WrapperTypeInfo V8TestInterface3::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface3::domTemplate, V8TestInterface3::refObject, V8TestInterface3::d
erefObject, V8TestInterface3::trace, 0, V8TestInterface3::visitDOMWrapper, V8Tes
tInterface3::installConditionallyEnabledMethods, V8TestInterface3::installCondit
ionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, Wrappe
rTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTyp
eInfo::Dependent, WrapperTypeInfo::RefCountedObject }; | 26 const WrapperTypeInfo V8TestInterface3::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface3::domTemplate, V8TestInterface3::refObject, V8TestInterface3::d
erefObject, V8TestInterface3::trace, 0, V8TestInterface3::visitDOMWrapper, V8Tes
tInterface3::installConditionallyEnabledMethods, V8TestInterface3::installCondit
ionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, Wrappe
rTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTyp
eInfo::Dependent, WrapperTypeInfo::RefCountedObject }; |
| 25 | 27 |
| 26 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e3.h. | 28 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e3.h. |
| 27 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 28 // bindings/core/v8/ScriptWrappable.h. | 30 // bindings/core/v8/ScriptWrappable.h. |
| 29 const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra
pperTypeInfo; | 31 const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra
pperTypeInfo; |
| 30 | 32 |
| 31 namespace TestInterface3V8Internal { | 33 namespace TestInterface3V8Internal { |
| 32 | 34 |
| 35 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 36 { |
| 37 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface3", info.Holder(), info.GetIsolate()); |
| 38 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 39 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 40 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); |
| 41 if (exceptionState.hadException()) { |
| 42 exceptionState.throwIfNeeded(); |
| 43 return; |
| 44 } |
| 45 v8SetReturnValue(info, result.release()); |
| 46 } |
| 47 |
| 48 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 49 { |
| 50 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 51 TestInterface3V8Internal::iteratorMethod(info); |
| 52 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 53 } |
| 54 |
| 33 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 55 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 34 { | 56 { |
| 35 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 57 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
| 36 V8TestInterface3::indexedPropertyGetterCustom(index, info); | 58 V8TestInterface3::indexedPropertyGetterCustom(index, info); |
| 37 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 38 } | 60 } |
| 39 | 61 |
| 40 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 62 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 41 { | 63 { |
| 42 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 64 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterfa
ce3::internalFieldCount, | 118 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterfa
ce3::internalFieldCount, |
| 97 0, 0, | 119 0, 0, |
| 98 0, 0, | 120 0, 0, |
| 99 0, 0); | 121 0, 0); |
| 100 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 122 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 101 ALLOW_UNUSED_LOCAL(instanceTemplate); | 123 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 102 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 124 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 103 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 125 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 104 functionTemplate->InstanceTemplate()->SetHandler(v8::IndexedPropertyHandlerC
onfiguration(TestInterface3V8Internal::indexedPropertyGetterCallback, TestInterf
ace3V8Internal::indexedPropertySetterCallback, 0, TestInterface3V8Internal::inde
xedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface3>)); | 126 functionTemplate->InstanceTemplate()->SetHandler(v8::IndexedPropertyHandlerC
onfiguration(TestInterface3V8Internal::indexedPropertyGetterCallback, TestInterf
ace3V8Internal::indexedPropertySetterCallback, 0, TestInterface3V8Internal::inde
xedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface3>)); |
| 105 functionTemplate->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerCon
figuration(TestInterface3V8Internal::namedPropertyGetterCallback, TestInterface3
V8Internal::namedPropertySetterCallback, TestInterface3V8Internal::namedProperty
QueryCallback, TestInterface3V8Internal::namedPropertyDeleterCallback, TestInter
face3V8Internal::namedPropertyEnumeratorCallback)); | 127 functionTemplate->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerCon
figuration(TestInterface3V8Internal::namedPropertyGetterCallback, TestInterface3
V8Internal::namedPropertySetterCallback, TestInterface3V8Internal::namedProperty
QueryCallback, TestInterface3V8Internal::namedPropertyDeleterCallback, TestInter
face3V8Internal::namedPropertyEnumeratorCallback)); |
| 128 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iter
atorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
| 129 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D
ontDelete, symbolKeyedIteratorConfiguration, isolate); |
| 106 | 130 |
| 107 // Custom toString template | 131 // Custom toString template |
| 108 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 132 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
| 109 } | 133 } |
| 110 | 134 |
| 111 v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isola
te) | 135 v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isola
te) |
| 112 { | 136 { |
| 113 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface3Template); | 137 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface3Template); |
| 114 } | 138 } |
| 115 | 139 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 132 { | 156 { |
| 133 scriptWrappable->toImpl<TestInterface3>()->ref(); | 157 scriptWrappable->toImpl<TestInterface3>()->ref(); |
| 134 } | 158 } |
| 135 | 159 |
| 136 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) | 160 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) |
| 137 { | 161 { |
| 138 scriptWrappable->toImpl<TestInterface3>()->deref(); | 162 scriptWrappable->toImpl<TestInterface3>()->deref(); |
| 139 } | 163 } |
| 140 | 164 |
| 141 } // namespace blink | 165 } // namespace blink |
| OLD | NEW |