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" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 } // namespace blink | 33 } // namespace blink |
34 | 34 |
35 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceWillBeGarb
ageCollected* object) | 35 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceWillBeGarb
ageCollected* object) |
36 { | 36 { |
37 blink::initializeScriptWrappableForInterface(object); | 37 blink::initializeScriptWrappableForInterface(object); |
38 } | 38 } |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::derefObject, 0, V8TestInterfaceWillBeGarbageCol
lected::toEventTarget, 0, V8TestInterfaceWillBeGarbageCollected::installPerConte
xtEnabledMethods, &V8EventTarget::wrapperTypeInfo, WrapperTypeObjectPrototype, W
illBeGarbageCollectedObject }; | 41 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::derefObject, 0, V8TestInterfaceWillBeGarbageCol
lected::toEventTarget, 0, V8TestInterfaceWillBeGarbageCollected::installConditio
nallyEnabledMethods, &V8EventTarget::wrapperTypeInfo, WrapperTypeObjectPrototype
, WillBeGarbageCollectedObject }; |
42 | 42 |
43 namespace TestInterfaceWillBeGarbageCollectedV8Internal { | 43 namespace TestInterfaceWillBeGarbageCollectedV8Internal { |
44 | 44 |
45 template <typename T> void V8_USE(T) { } | 45 template <typename T> void V8_USE(T) { } |
46 | 46 |
47 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 47 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) |
48 { | 48 { |
49 v8::Handle<v8::Object> holder = info.Holder(); | 49 v8::Handle<v8::Object> holder = info.Holder(); |
50 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(holder); | 50 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(holder); |
51 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); | 51 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal | 115 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal |
116 | 116 |
117 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { | 117 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { |
118 {"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}, | 118 {"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}, |
119 }; | 119 }; |
120 | 120 |
121 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag
eCollectedMethods[] = { | 121 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag
eCollectedMethods[] = { |
122 {"func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 122 {"func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
123 }; | 123 }; |
124 | 124 |
125 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT
ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate, V8TestInterfaceWillBeGarbageCollected::derefObject, 0, V8TestInt
erfaceWillBeGarbageCollected::toEventTarget, 0, V8TestInterfaceWillBeGarbageColl
ected::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, WillBeGar
bageCollectedObject }; | 125 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT
ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate, V8TestInterfaceWillBeGarbageCollected::derefObject, 0, V8TestInt
erfaceWillBeGarbageCollected::toEventTarget, 0, V8TestInterfaceWillBeGarbageColl
ected::installConditionallyEnabledMethods, 0, WrapperTypeObjectPrototype, WillBe
GarbageCollectedObject }; |
126 | 126 |
127 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 127 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
128 { | 128 { |
129 if (!info.IsConstructCall()) { | 129 if (!info.IsConstructCall()) { |
130 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestInterface"), info.GetIsolate()); | 130 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestInterface"), info.GetIsolate()); |
131 return; | 131 return; |
132 } | 132 } |
133 | 133 |
134 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 134 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
135 v8SetReturnValue(info, info.Holder()); | 135 v8SetReturnValue(info, info.Holder()); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 242 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
243 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 243 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
244 // the same object de-ref functions, though, so use that as the basis of
the check. | 244 // the same object de-ref functions, though, so use that as the basis of
the check. |
245 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 245 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
246 } | 246 } |
247 | 247 |
248 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 248 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
249 if (UNLIKELY(wrapper.IsEmpty())) | 249 if (UNLIKELY(wrapper.IsEmpty())) |
250 return wrapper; | 250 return wrapper; |
251 | 251 |
252 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 252 installConditionallyEnabledProperties(wrapper, isolate); |
253 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent)
; | 253 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent)
; |
254 return wrapper; | 254 return wrapper; |
255 } | 255 } |
256 | 256 |
257 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappableBase* int
ernalPointer) | 257 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappableBase* int
ernalPointer) |
258 { | 258 { |
259 #if !ENABLE(OILPAN) | 259 #if !ENABLE(OILPAN) |
260 fromInternalPointer(internalPointer)->deref(); | 260 fromInternalPointer(internalPointer)->deref(); |
261 #endif // !ENABLE(OILPAN) | 261 #endif // !ENABLE(OILPAN) |
262 } | 262 } |
263 | 263 |
264 template<> | 264 template<> |
265 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 265 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
266 { | 266 { |
267 return toV8(impl, creationContext, isolate); | 267 return toV8(impl, creationContext, isolate); |
268 } | 268 } |
269 | 269 |
270 } // namespace blink | 270 } // namespace blink |
OLD | NEW |