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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 { | 42 { |
43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
44 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info); | 44 TestInterfaceGarbageCollectedV8Internal::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::Handle<v8::Object> holder = info.Holder(); |
51 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); | 51 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); |
52 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 52 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImpl(v8::Handle<v8::Object>::Cast(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 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; | 59 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; |
60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
61 } | 61 } |
62 | 62 |
63 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 63 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
64 { | 64 { |
65 if (UNLIKELY(info.Length() < 1)) { | 65 if (UNLIKELY(info.Length() < 1)) { |
66 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 66 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
67 return; | 67 return; |
68 } | 68 } |
69 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 69 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
70 TestInterfaceGarbageCollected* arg; | 70 TestInterfaceGarbageCollected* arg; |
71 { | 71 { |
72 arg = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsola
te(), info[0]); | 72 arg = V8TestInterfaceGarbageCollected::toImpl(v8::Handle<v8::Object>::Ca
st(info[0])); |
73 } | 73 } |
74 impl->func(arg); | 74 impl->func(arg); |
75 } | 75 } |
76 | 76 |
77 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 77 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
78 { | 78 { |
79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
80 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); | 80 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); |
81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
82 } | 82 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 return WrapperPersistent<TestInterfaceGarbageCollected>::create(internalPoin
ter->toImpl<TestInterfaceGarbageCollected>()); | 181 return WrapperPersistent<TestInterfaceGarbageCollected>::create(internalPoin
ter->toImpl<TestInterfaceGarbageCollected>()); |
182 } | 182 } |
183 | 183 |
184 template<> | 184 template<> |
185 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 185 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
186 { | 186 { |
187 return toV8(impl, creationContext, isolate); | 187 return toV8(impl, creationContext, isolate); |
188 } | 188 } |
189 | 189 |
190 } // namespace blink | 190 } // namespace blink |
OLD | NEW |