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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 69 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
70 { | 70 { |
71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
72 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; | 72 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; |
73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
74 } | 74 } |
75 | 75 |
76 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 76 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
77 { | 77 { |
78 if (UNLIKELY(info.Length() < 1)) { | 78 if (UNLIKELY(info.Length() < 1)) { |
79 throwMinimumArityTypeErrorForMethod("func", "TestInterfaceGarbageCollect
ed", 1, info.Length(), info.GetIsolate()); | 79 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
80 return; | 80 return; |
81 } | 81 } |
82 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat
ive(info.Holder()); | 82 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat
ive(info.Holder()); |
83 TestInterfaceGarbageCollected* arg; | 83 TestInterfaceGarbageCollected* arg; |
84 { | 84 { |
85 v8::TryCatch block; | 85 v8::TryCatch block; |
86 V8RethrowTryCatchScope rethrow(block); | 86 V8RethrowTryCatchScope rethrow(block); |
87 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toNativeWit
hTypeCheck(info.GetIsolate(), info[0])); | 87 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toNativeWit
hTypeCheck(info.GetIsolate(), info[0])); |
88 } | 88 } |
89 impl->func(arg); | 89 impl->func(arg); |
90 } | 90 } |
91 | 91 |
92 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 92 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
93 { | 93 { |
94 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
95 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); | 95 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); |
96 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 96 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
97 } | 97 } |
98 | 98 |
99 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 99 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
100 { | 100 { |
101 if (UNLIKELY(info.Length() < 1)) { | 101 if (UNLIKELY(info.Length() < 1)) { |
102 throwMinimumArityTypeErrorForConstructor("TestInterfaceGarbageCollected"
, 1, info.Length(), info.GetIsolate()); | 102 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or("TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); |
103 return; | 103 return; |
104 } | 104 } |
105 V8StringResource<> str; | 105 V8StringResource<> str; |
106 { | 106 { |
107 TOSTRING_VOID_INTERNAL(str, info[0]); | 107 TOSTRING_VOID_INTERNAL(str, info[0]); |
108 } | 108 } |
109 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); | 109 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); |
110 v8::Handle<v8::Object> wrapper = info.Holder(); | 110 v8::Handle<v8::Object> wrapper = info.Holder(); |
111 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceGarbageCollected>(im
pl.release(), &V8TestInterfaceGarbageCollected::wrapperTypeInfo, wrapper, info.G
etIsolate(), WrapperConfiguration::Independent); | 111 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceGarbageCollected>(im
pl.release(), &V8TestInterfaceGarbageCollected::wrapperTypeInfo, wrapper, info.G
etIsolate(), WrapperConfiguration::Independent); |
112 v8SetReturnValue(info, wrapper); | 112 v8SetReturnValue(info, wrapper); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 { | 213 { |
214 } | 214 } |
215 | 215 |
216 template<> | 216 template<> |
217 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 217 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
218 { | 218 { |
219 return toV8(impl, creationContext, isolate); | 219 return toV8(impl, creationContext, isolate); |
220 } | 220 } |
221 | 221 |
222 } // namespace blink | 222 } // namespace blink |
OLD | NEW |