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 "V8TestInterfaceEventInitConstructor.h" | 8 #include "V8TestInterfaceEventInitConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 const WrapperTypeInfo V8TestInterfaceEventInitConstructor::wrapperTypeInfo = { g
in::kEmbedderBlink, V8TestInterfaceEventInitConstructor::domTemplate, V8TestInte
rfaceEventInitConstructor::refObject, V8TestInterfaceEventInitConstructor::deref
Object, V8TestInterfaceEventInitConstructor::trace, 0, 0, V8TestInterfaceEventIn
itConstructor::installConditionallyEnabledMethods, V8TestInterfaceEventInitConst
ructor::installConditionallyEnabledProperties, &V8Event::wrapperTypeInfo, Wrappe
rTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTy
peInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo
::WillBeGarbageCollectedObject }; | 25 const WrapperTypeInfo V8TestInterfaceEventInitConstructor::wrapperTypeInfo = { g
in::kEmbedderBlink, V8TestInterfaceEventInitConstructor::domTemplate, V8TestInte
rfaceEventInitConstructor::refObject, V8TestInterfaceEventInitConstructor::deref
Object, V8TestInterfaceEventInitConstructor::trace, 0, 0, V8TestInterfaceEventIn
itConstructor::installConditionallyEnabledMethods, V8TestInterfaceEventInitConst
ructor::installConditionallyEnabledProperties, &V8Event::wrapperTypeInfo, Wrappe
rTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTy
peInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo
::WillBeGarbageCollectedObject }; |
26 | 26 |
27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eEventInitConstructor.h. | 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eEventInitConstructor.h. |
28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
29 // bindings/core/v8/ScriptWrappable.h. | 29 // bindings/core/v8/ScriptWrappable.h. |
30 const WrapperTypeInfo& TestInterfaceEventInitConstructor::s_wrapperTypeInfo = V8
TestInterfaceEventInitConstructor::wrapperTypeInfo; | 30 const WrapperTypeInfo& TestInterfaceEventInitConstructor::s_wrapperTypeInfo = V8
TestInterfaceEventInitConstructor::wrapperTypeInfo; |
31 | 31 |
32 namespace TestInterfaceEventInitConstructorV8Internal { | 32 namespace TestInterfaceEventInitConstructorV8Internal { |
33 | 33 |
34 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 34 static void readonlyStringAttributeAttributeGetter(const v8::FunctionCallbackInf
o<v8::Value>& info) |
35 { | 35 { |
36 v8::Local<v8::Object> holder = info.Holder(); | 36 v8::Local<v8::Object> holder = info.Holder(); |
37 TestInterfaceEventInitConstructor* impl = V8TestInterfaceEventInitConstructo
r::toImpl(holder); | 37 TestInterfaceEventInitConstructor* impl = V8TestInterfaceEventInitConstructo
r::toImpl(holder); |
38 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | 38 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); |
39 } | 39 } |
40 | 40 |
41 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 41 static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
42 { | 42 { |
43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
44 TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttribut
eGetter(info); | 44 TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttribut
eGetter(info); |
45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
46 } | 46 } |
47 | 47 |
48 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 48 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
49 { | 49 { |
50 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); | 50 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); |
51 if (UNLIKELY(info.Length() < 2)) { | 51 if (UNLIKELY(info.Length() < 2)) { |
(...skipping 13 matching lines...) Expand all Loading... |
65 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8TestInterfaceEventInit::toImp
l(info.GetIsolate(), info[1], testInterfaceEventInit, exceptionState), exception
State); | 65 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8TestInterfaceEventInit::toImp
l(info.GetIsolate(), info[1], testInterfaceEventInit, exceptionState), exception
State); |
66 } | 66 } |
67 RefPtrWillBeRawPtr<TestInterfaceEventInitConstructor> impl = TestInterfaceEv
entInitConstructor::create(type, testInterfaceEventInit); | 67 RefPtrWillBeRawPtr<TestInterfaceEventInitConstructor> impl = TestInterfaceEv
entInitConstructor::create(type, testInterfaceEventInit); |
68 v8::Local<v8::Object> wrapper = info.Holder(); | 68 v8::Local<v8::Object> wrapper = info.Holder(); |
69 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEventInitConst
ructor::wrapperTypeInfo, wrapper); | 69 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEventInitConst
ructor::wrapperTypeInfo, wrapper); |
70 v8SetReturnValue(info, wrapper); | 70 v8SetReturnValue(info, wrapper); |
71 } | 71 } |
72 | 72 |
73 } // namespace TestInterfaceEventInitConstructorV8Internal | 73 } // namespace TestInterfaceEventInitConstructorV8Internal |
74 | 74 |
75 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceEventInit
ConstructorAttributes[] = { | 75 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitC
onstructorAccessors[] = { |
76 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea
donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 76 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea
donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu
ration::ExposedToAllScripts}, |
77 }; | 77 }; |
78 | 78 |
79 void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 79 void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
80 { | 80 { |
81 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 81 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
82 if (!info.IsConstructCall()) { | 82 if (!info.IsConstructCall()) { |
83 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterfaceEventInitConstructor")); | 83 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterfaceEventInitConstructor")); |
84 return; | 84 return; |
85 } | 85 } |
86 | 86 |
87 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 87 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
88 v8SetReturnValue(info, info.Holder()); | 88 v8SetReturnValue(info, info.Holder()); |
89 return; | 89 return; |
90 } | 90 } |
91 | 91 |
92 TestInterfaceEventInitConstructorV8Internal::constructor(info); | 92 TestInterfaceEventInitConstructorV8Internal::constructor(info); |
93 } | 93 } |
94 | 94 |
95 static void installV8TestInterfaceEventInitConstructorTemplate(v8::Local<v8::Fun
ctionTemplate> functionTemplate, v8::Isolate* isolate) | 95 static void installV8TestInterfaceEventInitConstructorTemplate(v8::Local<v8::Fun
ctionTemplate> functionTemplate, v8::Isolate* isolate) |
96 { | 96 { |
97 functionTemplate->ReadOnlyPrototype(); | 97 functionTemplate->ReadOnlyPrototype(); |
98 | 98 |
99 v8::Local<v8::Signature> defaultSignature; | 99 v8::Local<v8::Signature> defaultSignature; |
100 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceEventInitConstructor", V8Event::domTemplate(isolate)
, V8TestInterfaceEventInitConstructor::internalFieldCount, | 100 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceEventInitConstructor", V8Event::domTemplate(isolate)
, V8TestInterfaceEventInitConstructor::internalFieldCount, |
101 V8TestInterfaceEventInitConstructorAttributes, WTF_ARRAY_LENGTH(V8TestIn
terfaceEventInitConstructorAttributes), | |
102 0, 0, | 101 0, 0, |
| 102 V8TestInterfaceEventInitConstructorAccessors, WTF_ARRAY_LENGTH(V8TestInt
erfaceEventInitConstructorAccessors), |
103 0, 0); | 103 0, 0); |
104 functionTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::constr
uctorCallback); | 104 functionTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::constr
uctorCallback); |
105 functionTemplate->SetLength(2); | 105 functionTemplate->SetLength(2); |
106 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 106 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
107 ALLOW_UNUSED_LOCAL(instanceTemplate); | 107 ALLOW_UNUSED_LOCAL(instanceTemplate); |
108 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 108 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
109 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 109 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
110 | 110 |
111 // Custom toString template | 111 // Custom toString template |
112 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 112 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
(...skipping 27 matching lines...) Expand all Loading... |
140 } | 140 } |
141 | 141 |
142 void V8TestInterfaceEventInitConstructor::derefObject(ScriptWrappable* scriptWra
ppable) | 142 void V8TestInterfaceEventInitConstructor::derefObject(ScriptWrappable* scriptWra
ppable) |
143 { | 143 { |
144 #if !ENABLE(OILPAN) | 144 #if !ENABLE(OILPAN) |
145 scriptWrappable->toImpl<TestInterfaceEventInitConstructor>()->deref(); | 145 scriptWrappable->toImpl<TestInterfaceEventInitConstructor>()->deref(); |
146 #endif | 146 #endif |
147 } | 147 } |
148 | 148 |
149 } // namespace blink | 149 } // namespace blink |
OLD | NEW |