| 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 "V8TestInterfaceGarbageCollected.h" | 8 #include "V8TestInterfaceGarbageCollected.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // bindings/core/v8/ScriptWrappable.h. | 43 // bindings/core/v8/ScriptWrappable.h. |
| 44 const WrapperTypeInfo& TestInterfaceGarbageCollected::s_wrapperTypeInfo = V8Test
InterfaceGarbageCollected::wrapperTypeInfo; | 44 const WrapperTypeInfo& TestInterfaceGarbageCollected::s_wrapperTypeInfo = V8Test
InterfaceGarbageCollected::wrapperTypeInfo; |
| 45 | 45 |
| 46 namespace TestInterfaceGarbageCollectedV8Internal { | 46 namespace TestInterfaceGarbageCollectedV8Internal { |
| 47 | 47 |
| 48 template <typename T> void V8_USE(T) { } | 48 template <typename T> void V8_USE(T) { } |
| 49 | 49 |
| 50 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 50 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) |
| 51 { | 51 { |
| 52 v8::Handle<v8::Object> holder = info.Holder(); | 52 v8::Handle<v8::Object> holder = info.Holder(); |
| 53 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat
ive(holder); | 53 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); |
| 54 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); | 54 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); |
| 55 } | 55 } |
| 56 | 56 |
| 57 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 57 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 58 { | 58 { |
| 59 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 59 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 60 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info); | 60 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info); |
| 61 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 61 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 62 } | 62 } |
| 63 | 63 |
| 64 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 64 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) |
| 65 { | 65 { |
| 66 v8::Handle<v8::Object> holder = info.Holder(); | 66 v8::Handle<v8::Object> holder = info.Holder(); |
| 67 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat
ive(holder); | 67 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); |
| 68 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | 68 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); |
| 69 impl->setAttr1(WTF::getPtr(cppValue)); | 69 impl->setAttr1(WTF::getPtr(cppValue)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 72 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 73 { | 73 { |
| 74 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 74 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 75 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; | 75 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; |
| 76 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 77 } | 77 } |
| 78 | 78 |
| 79 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 79 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 80 { | 80 { |
| 81 if (UNLIKELY(info.Length() < 1)) { | 81 if (UNLIKELY(info.Length() < 1)) { |
| 82 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 82 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
| 83 return; | 83 return; |
| 84 } | 84 } |
| 85 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat
ive(info.Holder()); | 85 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
| 86 TestInterfaceGarbageCollected* arg; | 86 TestInterfaceGarbageCollected* arg; |
| 87 { | 87 { |
| 88 v8::TryCatch block; | 88 v8::TryCatch block; |
| 89 V8RethrowTryCatchScope rethrow(block); | 89 V8RethrowTryCatchScope rethrow(block); |
| 90 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toNativeWit
hTypeCheck(info.GetIsolate(), info[0])); | 90 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toImplWithT
ypeCheck(info.GetIsolate(), info[0])); |
| 91 } | 91 } |
| 92 impl->func(arg); | 92 impl->func(arg); |
| 93 } | 93 } |
| 94 | 94 |
| 95 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 95 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 96 { | 96 { |
| 97 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 97 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 98 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); | 98 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); |
| 99 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 99 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 100 } | 100 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 bool V8TestInterfaceGarbageCollected::hasInstance(v8::Handle<v8::Value> v8Value,
v8::Isolate* isolate) | 168 bool V8TestInterfaceGarbageCollected::hasInstance(v8::Handle<v8::Value> v8Value,
v8::Isolate* isolate) |
| 169 { | 169 { |
| 170 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 170 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 171 } | 171 } |
| 172 | 172 |
| 173 v8::Handle<v8::Object> V8TestInterfaceGarbageCollected::findInstanceInPrototypeC
hain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 173 v8::Handle<v8::Object> V8TestInterfaceGarbageCollected::findInstanceInPrototypeC
hain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 174 { | 174 { |
| 175 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 175 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 176 } | 176 } |
| 177 | 177 |
| 178 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toNativeWithType
Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 178 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toImplWithTypeCh
eck(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 179 { | 179 { |
| 180 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 180 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestInterfaceGarbageCollected>() : 0; |
| 181 } | 181 } |
| 182 | 182 |
| 183 EventTarget* V8TestInterfaceGarbageCollected::toEventTarget(v8::Handle<v8::Objec
t> object) | 183 EventTarget* V8TestInterfaceGarbageCollected::toEventTarget(v8::Handle<v8::Objec
t> object) |
| 184 { | 184 { |
| 185 return toNative(object); | 185 return toImpl(object); |
| 186 } | 186 } |
| 187 | 187 |
| 188 | 188 |
| 189 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappableBase* internalPoi
nter) | 189 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappableBase* internalPoi
nter) |
| 190 { | 190 { |
| 191 } | 191 } |
| 192 | 192 |
| 193 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappableBase* internalP
ointer) | 193 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappableBase* internalP
ointer) |
| 194 { | 194 { |
| 195 } | 195 } |
| 196 | 196 |
| 197 WrapperPersistentNode* V8TestInterfaceGarbageCollected::createPersistentHandle(S
criptWrappableBase* internalPointer) | 197 WrapperPersistentNode* V8TestInterfaceGarbageCollected::createPersistentHandle(S
criptWrappableBase* internalPointer) |
| 198 { | 198 { |
| 199 return new WrapperPersistent<TestInterfaceGarbageCollected>(fromInternalPoin
ter(internalPointer)); | 199 return new WrapperPersistent<TestInterfaceGarbageCollected>(internalPointer-
>toImpl<TestInterfaceGarbageCollected>()); |
| 200 } | 200 } |
| 201 | 201 |
| 202 template<> | 202 template<> |
| 203 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 203 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
| 204 { | 204 { |
| 205 return toV8(impl, creationContext, isolate); | 205 return toV8(impl, creationContext, isolate); |
| 206 } | 206 } |
| 207 | 207 |
| 208 } // namespace blink | 208 } // namespace blink |
| OLD | NEW |