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 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 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info); | 46 TestInterfaceGarbageCollectedV8Internal::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 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); | 53 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); |
54 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 54 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImpl(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 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; | 61 TestInterfaceGarbageCollectedV8Internal::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", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 68 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
69 return; | 69 return; |
70 } | 70 } |
71 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 71 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
72 TestInterfaceGarbageCollected* arg; | 72 TestInterfaceGarbageCollected* arg; |
73 { | 73 { |
74 arg = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsola
te(), info[0]); | 74 arg = V8TestInterfaceGarbageCollected::toImpl(v8::Handle<v8::Object>::Ca
st(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 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); | 82 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); |
83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
84 } | 84 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 return WrapperPersistent<TestInterfaceGarbageCollected>::create(internalPoin
ter->toImpl<TestInterfaceGarbageCollected>()); | 183 return WrapperPersistent<TestInterfaceGarbageCollected>::create(internalPoin
ter->toImpl<TestInterfaceGarbageCollected>()); |
184 } | 184 } |
185 | 185 |
186 template<> | 186 template<> |
187 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 187 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
188 { | 188 { |
189 return toV8(impl, creationContext, isolate); | 189 return toV8(impl, creationContext, isolate); |
190 } | 190 } |
191 | 191 |
192 } // namespace blink | 192 } // namespace blink |
OLD | NEW |