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 "V8TestInterfaceConstructor2.h" | 8 #include "V8TestInterfaceConstructor2.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 v8::Handle<v8::Object> wrapper = info.Holder(); | 42 v8::Handle<v8::Object> wrapper = info.Holder(); |
43 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); | 43 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); |
44 v8SetReturnValue(info, wrapper); | 44 v8SetReturnValue(info, wrapper); |
45 } | 45 } |
46 | 46 |
47 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 47 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
48 { | 48 { |
49 Dictionary dictionaryArg; | 49 Dictionary dictionaryArg; |
50 { | 50 { |
51 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { | 51 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
52 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc
t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."
), info.GetIsolate()); | 52 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToConstruct("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg')
is not an object.")); |
53 return; | 53 return; |
54 } | 54 } |
55 dictionaryArg = Dictionary(info[0], info.GetIsolate()); | 55 dictionaryArg = Dictionary(info[0], info.GetIsolate()); |
56 } | 56 } |
57 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); | 57 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); |
58 v8::Handle<v8::Object> wrapper = info.Holder(); | 58 v8::Handle<v8::Object> wrapper = info.Holder(); |
59 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); | 59 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); |
60 v8SetReturnValue(info, wrapper); | 60 v8SetReturnValue(info, wrapper); |
61 } | 61 } |
62 | 62 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 exceptionState.throwTypeError("No matching constructor signature."); | 168 exceptionState.throwTypeError("No matching constructor signature."); |
169 exceptionState.throwIfNeeded(); | 169 exceptionState.throwIfNeeded(); |
170 } | 170 } |
171 | 171 |
172 } // namespace TestInterfaceConstructor2V8Internal | 172 } // namespace TestInterfaceConstructor2V8Internal |
173 | 173 |
174 void V8TestInterfaceConstructor2::constructorCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 174 void V8TestInterfaceConstructor2::constructorCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
175 { | 175 { |
176 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 176 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
177 if (!info.IsConstructCall()) { | 177 if (!info.IsConstructCall()) { |
178 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestInterfaceConstructor2"), info.GetIsolate()); | 178 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterfaceConstructor2")); |
179 return; | 179 return; |
180 } | 180 } |
181 | 181 |
182 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 182 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
183 v8SetReturnValue(info, info.Holder()); | 183 v8SetReturnValue(info, info.Holder()); |
184 return; | 184 return; |
185 } | 185 } |
186 | 186 |
187 TestInterfaceConstructor2V8Internal::constructor(info); | 187 TestInterfaceConstructor2V8Internal::constructor(info); |
188 } | 188 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 scriptWrappableBase->toImpl<TestInterfaceConstructor2>()->deref(); | 238 scriptWrappableBase->toImpl<TestInterfaceConstructor2>()->deref(); |
239 } | 239 } |
240 | 240 |
241 template<> | 241 template<> |
242 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 242 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
243 { | 243 { |
244 return toV8(impl, creationContext, isolate); | 244 return toV8(impl, creationContext, isolate); |
245 } | 245 } |
246 | 246 |
247 } // namespace blink | 247 } // namespace blink |
OLD | NEW |