| 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 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); | 54 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), 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 v8::TryCatch block; | 74 arg = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsola
te(), info[0]); |
| 75 V8RethrowTryCatchScope rethrow(block); | |
| 76 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toImplWithT
ypeCheck(info.GetIsolate(), info[0])); | |
| 77 } | 75 } |
| 78 impl->func(arg); | 76 impl->func(arg); |
| 79 } | 77 } |
| 80 | 78 |
| 81 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 79 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 82 { | 80 { |
| 83 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 84 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); | 82 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); |
| 85 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 86 } | 84 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 return WrapperPersistent<TestInterfaceGarbageCollected>::create(internalPoin
ter->toImpl<TestInterfaceGarbageCollected>()); | 183 return WrapperPersistent<TestInterfaceGarbageCollected>::create(internalPoin
ter->toImpl<TestInterfaceGarbageCollected>()); |
| 186 } | 184 } |
| 187 | 185 |
| 188 template<> | 186 template<> |
| 189 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) |
| 190 { | 188 { |
| 191 return toV8(impl, creationContext, isolate); | 189 return toV8(impl, creationContext, isolate); |
| 192 } | 190 } |
| 193 | 191 |
| 194 } // namespace blink | 192 } // namespace blink |
| OLD | NEW |