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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 { | 44 { |
45 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 45 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
46 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); | 46 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); |
47 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 47 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
48 } | 48 } |
49 | 49 |
50 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 50 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) |
51 { | 51 { |
52 v8::Handle<v8::Object> holder = info.Holder(); | 52 v8::Handle<v8::Object> holder = info.Holder(); |
53 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); | 53 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); |
54 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 54 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImpl(v8::Handle<v8::Object>::Cast(v8Value)); |
55 impl->setAttr1(WTF::getPtr(cppValue)); | 55 impl->setAttr1(WTF::getPtr(cppValue)); |
56 } | 56 } |
57 | 57 |
58 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 58 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
59 { | 59 { |
60 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
61 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); | 61 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); |
62 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 62 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
63 } | 63 } |
64 | 64 |
65 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 65 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
66 { | 66 { |
67 if (UNLIKELY(info.Length() < 1)) { | 67 if (UNLIKELY(info.Length() < 1)) { |
68 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()
), info.GetIsolate()); | 68 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()
), info.GetIsolate()); |
69 return; | 69 return; |
70 } | 70 } |
71 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(info.Holder()); | 71 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(info.Holder()); |
72 TestInterfaceWillBeGarbageCollected* arg; | 72 TestInterfaceWillBeGarbageCollected* arg; |
73 { | 73 { |
74 arg = V8TestInterfaceWillBeGarbageCollected::toImplWithTypeCheck(info.Ge
tIsolate(), info[0]); | 74 arg = V8TestInterfaceWillBeGarbageCollected::toImpl(v8::Handle<v8::Objec
t>::Cast(info[0])); |
75 } | 75 } |
76 impl->func(arg); | 76 impl->func(arg); |
77 } | 77 } |
78 | 78 |
79 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 79 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
80 { | 80 { |
81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
82 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); | 82 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); |
83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
84 } | 84 } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 #endif | 239 #endif |
240 } | 240 } |
241 | 241 |
242 template<> | 242 template<> |
243 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 243 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
244 { | 244 { |
245 return toV8(impl, creationContext, isolate); | 245 return toV8(impl, creationContext, isolate); |
246 } | 246 } |
247 | 247 |
248 } // namespace blink | 248 } // namespace blink |
OLD | NEW |