| 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 "V8TestInterfaceWillBeGarbageCollected.h" | 8 #include "V8TestInterfaceWillBeGarbageCollected.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| 11 #include "bindings/core/v8/V8DOMConfiguration.h" | 11 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 12 #include "bindings/core/v8/V8HiddenValue.h" | 12 #include "bindings/core/v8/V8HiddenValue.h" |
| 13 #include "bindings/core/v8/V8ObjectConstructor.h" | 13 #include "bindings/core/v8/V8ObjectConstructor.h" |
| 14 #include "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h" | 14 #include "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h" |
| 15 #include "core/dom/ContextFeatures.h" | 15 #include "core/dom/ContextFeatures.h" |
| 16 #include "core/dom/Document.h" | 16 #include "core/dom/Document.h" |
| 17 #include "core/frame/LocalDOMWindow.h" | 17 #include "core/frame/LocalDOMWindow.h" |
| 18 #include "platform/RuntimeEnabledFeatures.h" | 18 #include "platform/RuntimeEnabledFeatures.h" |
| 19 #include "platform/TraceEvent.h" | 19 #include "platform/TraceEvent.h" |
| 20 #include "wtf/GetPtr.h" | 20 #include "wtf/GetPtr.h" |
| 21 #include "wtf/RefPtr.h" | 21 #include "wtf/RefPtr.h" |
| 22 | 22 |
| 23 namespace blink { | 23 namespace blink { |
| 24 | 24 |
| 25 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte
d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, V8TestInterface
WillBeGarbageCollected::toEventTarget, 0, V8TestInterfaceWillBeGarbageCollected:
:installConditionallyEnabledMethods, V8TestInterfaceWillBeGarbageCollected::inst
allConditionallyEnabledProperties, &V8EventTarget::wrapperTypeInfo, WrapperTypeI
nfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo
::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; | 25 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte
d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterf
aceWillBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWi
llBeGarbageCollected::installConditionallyEnabledProperties, &V8EventTarget::wra
pperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obje
ctClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent
, WrapperTypeInfo::WillBeGarbageCollectedObject }; |
| 26 | 26 |
| 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eWillBeGarbageCollected.h. | 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eWillBeGarbageCollected.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& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo =
V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; | 30 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo =
V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; |
| 31 | 31 |
| 32 namespace TestInterfaceWillBeGarbageCollectedV8Internal { | 32 namespace TestInterfaceWillBeGarbageCollectedV8Internal { |
| 33 | 33 |
| 34 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 34 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) |
| 35 { | 35 { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal | 100 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal |
| 101 | 101 |
| 102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { | 102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { |
| 103 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette
rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa
llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr
opertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfig
uration::OnInstance}, | 103 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette
rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa
llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr
opertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfig
uration::OnInstance}, |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag
eCollectedMethods[] = { | 106 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag
eCollectedMethods[] = { |
| 107 {"func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 107 {"func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT
ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac
eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra
ce, 0, V8TestInterfaceWillBeGarbageCollected::toEventTarget, 0, V8TestInterfaceW
illBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWillBe
GarbageCollected::installConditionallyEnabledProperties, 0, WrapperTypeInfo::Wra
pperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Indepe
ndent, WrapperTypeInfo::WillBeGarbageCollectedObject }; | 110 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT
ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac
eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra
ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMeth
ods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledPropertie
s, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassI
d, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe
rTypeInfo::WillBeGarbageCollectedObject }; |
| 111 | 111 |
| 112 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 112 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 113 { | 113 { |
| 114 if (!info.IsConstructCall()) { | 114 if (!info.IsConstructCall()) { |
| 115 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface")); | 115 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface")); |
| 116 return; | 116 return; |
| 117 } | 117 } |
| 118 | 118 |
| 119 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 119 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
| 120 v8SetReturnValue(info, info.Holder()); | 120 v8SetReturnValue(info, info.Holder()); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 v8::Handle<v8::Object> V8TestInterfaceWillBeGarbageCollected::findInstanceInProt
otypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 202 v8::Handle<v8::Object> V8TestInterfaceWillBeGarbageCollected::findInstanceInProt
otypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 203 { | 203 { |
| 204 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 204 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 205 } | 205 } |
| 206 | 206 |
| 207 TestInterfaceWillBeGarbageCollected* V8TestInterfaceWillBeGarbageCollected::toIm
plWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 207 TestInterfaceWillBeGarbageCollected* V8TestInterfaceWillBeGarbageCollected::toIm
plWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 208 { | 208 { |
| 209 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestInterfaceWillBeGarbageCollected>() : 0; | 209 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestInterfaceWillBeGarbageCollected>() : 0; |
| 210 } | 210 } |
| 211 | 211 |
| 212 EventTarget* V8TestInterfaceWillBeGarbageCollected::toEventTarget(v8::Handle<v8:
:Object> object) | |
| 213 { | |
| 214 return toImpl(object); | |
| 215 } | |
| 216 | |
| 217 void V8TestInterfaceWillBeGarbageCollected::refObject(ScriptWrappableBase* scrip
tWrappableBase) | 212 void V8TestInterfaceWillBeGarbageCollected::refObject(ScriptWrappableBase* scrip
tWrappableBase) |
| 218 { | 213 { |
| 219 #if !ENABLE(OILPAN) | 214 #if !ENABLE(OILPAN) |
| 220 scriptWrappableBase->toImpl<TestInterfaceWillBeGarbageCollected>()->ref(); | 215 scriptWrappableBase->toImpl<TestInterfaceWillBeGarbageCollected>()->ref(); |
| 221 #endif | 216 #endif |
| 222 } | 217 } |
| 223 | 218 |
| 224 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappableBase* scr
iptWrappableBase) | 219 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappableBase* scr
iptWrappableBase) |
| 225 { | 220 { |
| 226 #if !ENABLE(OILPAN) | 221 #if !ENABLE(OILPAN) |
| 227 scriptWrappableBase->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); | 222 scriptWrappableBase->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); |
| 228 #endif | 223 #endif |
| 229 } | 224 } |
| 230 | 225 |
| 231 template<> | 226 template<> |
| 232 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 227 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 233 { | 228 { |
| 234 return toV8(impl, creationContext, isolate); | 229 return toV8(impl, creationContext, isolate); |
| 235 } | 230 } |
| 236 | 231 |
| 237 } // namespace blink | 232 } // namespace blink |
| OLD | NEW |