| 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 15 matching lines...) Expand all Loading... |
| 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 { |
| 36 v8::Handle<v8::Object> holder = info.Holder(); | 36 v8::Local<v8::Object> holder = info.Holder(); |
| 37 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); | 37 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); |
| 38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); | 38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); |
| 39 } | 39 } |
| 40 | 40 |
| 41 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 41 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 42 { | 42 { |
| 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 44 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); | 44 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); |
| 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 46 } | 46 } |
| 47 | 47 |
| 48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) |
| 49 { | 49 { |
| 50 v8::Handle<v8::Object> holder = info.Holder(); | 50 v8::Local<v8::Object> holder = info.Holder(); |
| 51 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); | 51 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); |
| 52 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 52 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 53 impl->setAttr1(WTF::getPtr(cppValue)); | 53 impl->setAttr1(WTF::getPtr(cppValue)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 57 { | 57 { |
| 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 59 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); | 59 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); |
| 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 85 { | 85 { |
| 86 if (UNLIKELY(info.Length() < 1)) { | 86 if (UNLIKELY(info.Length() < 1)) { |
| 87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); | 87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); |
| 88 return; | 88 return; |
| 89 } | 89 } |
| 90 V8StringResource<> str; | 90 V8StringResource<> str; |
| 91 { | 91 { |
| 92 TOSTRING_VOID_INTERNAL(str, info[0]); | 92 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 93 } | 93 } |
| 94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
| 95 v8::Handle<v8::Object> wrapper = info.Holder(); | 95 v8::Local<v8::Object> wrapper = info.Holder(); |
| 96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); | 96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); |
| 97 v8SetReturnValue(info, wrapper); | 97 v8SetReturnValue(info, wrapper); |
| 98 } | 98 } |
| 99 | 99 |
| 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 122 } | 122 } |
| 123 if (UNLIKELY(info.Length() < 1)) { | 123 if (UNLIKELY(info.Length() < 1)) { |
| 124 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); | 124 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); |
| 125 return; | 125 return; |
| 126 } | 126 } |
| 127 V8StringResource<> str; | 127 V8StringResource<> str; |
| 128 { | 128 { |
| 129 TOSTRING_VOID_INTERNAL(str, info[0]); | 129 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 130 } | 130 } |
| 131 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); | 131 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); |
| 132 v8::Handle<v8::Object> wrapper = info.Holder(); | 132 v8::Local<v8::Object> wrapper = info.Holder(); |
| 133 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollectedConstructor::wrapperTypeInfo, wrapper); | 133 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollectedConstructor::wrapperTypeInfo, wrapper); |
| 134 v8SetReturnValue(info, wrapper); | 134 v8SetReturnValue(info, wrapper); |
| 135 } | 135 } |
| 136 | 136 |
| 137 v8::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate(v8::Isolate* isolate) | 137 v8::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate(v8::Isolate* isolate) |
| 138 { | 138 { |
| 139 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 139 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 140 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 140 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 141 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 141 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 142 if (!result.IsEmpty()) | 142 if (!result.IsEmpty()) |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 | 217 |
| 218 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) | 218 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) |
| 219 { | 219 { |
| 220 #if !ENABLE(OILPAN) | 220 #if !ENABLE(OILPAN) |
| 221 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); | 221 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); |
| 222 #endif | 222 #endif |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |