| 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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 namespace TestInterfaceConstructor2V8Internal { | 44 namespace TestInterfaceConstructor2V8Internal { |
| 45 | 45 |
| 46 template <typename T> void V8_USE(T) { } | 46 template <typename T> void V8_USE(T) { } |
| 47 | 47 |
| 48 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 48 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 49 { | 49 { |
| 50 v8::Isolate* isolate = info.GetIsolate(); | 50 v8::Isolate* isolate = info.GetIsolate(); |
| 51 V8StringResource<> stringArg; | 51 V8StringResource<> stringArg; |
| 52 { | 52 { |
| 53 TOSTRING_VOID_INTERNAL_NOTRYCATCH(stringArg, info[0]); | 53 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 54 } | 54 } |
| 55 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); | 55 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
| 56 | 56 |
| 57 v8::Handle<v8::Object> wrapper = info.Holder(); | 57 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 58 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 58 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
| 59 v8SetReturnValue(info, wrapper); | 59 v8SetReturnValue(info, wrapper); |
| 60 } | 60 } |
| 61 | 61 |
| 62 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 62 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 63 { | 63 { |
| 64 v8::Isolate* isolate = info.GetIsolate(); | 64 v8::Isolate* isolate = info.GetIsolate(); |
| 65 Dictionary dictionaryArg; | 65 Dictionary dictionaryArg; |
| 66 { | 66 { |
| 67 v8::TryCatch block; | 67 V8TryPropagate block; |
| 68 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); | 68 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); |
| 69 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 69 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
| 70 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceCo
nstructor2", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate
()); | 70 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceCo
nstructor2", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate
()); |
| 71 block.ReThrow(); | |
| 72 return; | 71 return; |
| 73 } | 72 } |
| 74 } | 73 } |
| 75 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); | 74 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); |
| 76 | 75 |
| 77 v8::Handle<v8::Object> wrapper = info.Holder(); | 76 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 78 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 77 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
| 79 v8SetReturnValue(info, wrapper); | 78 v8SetReturnValue(info, wrapper); |
| 80 } | 79 } |
| 81 | 80 |
| 82 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 81 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 83 { | 82 { |
| 84 v8::Isolate* isolate = info.GetIsolate(); | 83 v8::Isolate* isolate = info.GetIsolate(); |
| 85 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); | 84 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); |
| 86 TestInterfaceEmpty* testInterfaceEmptyArg; | 85 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 87 int longArg; | 86 int longArg; |
| 88 V8StringResource<> defaultUndefinedOptionalStringArg; | 87 V8StringResource<> defaultUndefinedOptionalStringArg; |
| 89 V8StringResource<> defaultNullStringOptionalStringArg; | 88 V8StringResource<> defaultNullStringOptionalStringArg; |
| 90 Dictionary defaultUndefinedOptionalDictionaryArg; | 89 Dictionary defaultUndefinedOptionalDictionaryArg; |
| 91 V8StringResource<> optionalStringArg; | 90 V8StringResource<> optionalStringArg; |
| 92 { | 91 { |
| 93 v8::TryCatch block; | 92 V8TryPropagate block; |
| 94 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 93 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); |
| 95 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | 94 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); |
| 96 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); | 95 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); |
| 97 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, argumentOrNul
l(info, 3)); | 96 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, argumentOrNul
l(info, 3)); |
| 98 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); | 97 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); |
| 99 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { | 98 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { |
| 100 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); | 99 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
| 101 exceptionState.throwIfNeeded(); | 100 exceptionState.throwIfNeeded(); |
| 102 block.ReThrow(); | |
| 103 return; | 101 return; |
| 104 } | 102 } |
| 105 if (UNLIKELY(info.Length() <= 5)) { | 103 if (UNLIKELY(info.Length() <= 5)) { |
| 106 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | 104 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
| 107 v8::Handle<v8::Object> wrapper = info.Holder(); | 105 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 108 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2
>(impl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolat
e, WrapperConfiguration::Independent); | 106 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2
>(impl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolat
e, WrapperConfiguration::Independent); |
| 109 v8SetReturnValue(info, wrapper); | 107 v8SetReturnValue(info, wrapper); |
| 110 return; | 108 return; |
| 111 } | 109 } |
| 112 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); | 110 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 fromInternalPointer(object)->deref(); | 261 fromInternalPointer(object)->deref(); |
| 264 } | 262 } |
| 265 | 263 |
| 266 template<> | 264 template<> |
| 267 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 265 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
| 268 { | 266 { |
| 269 return toV8(impl, creationContext, isolate); | 267 return toV8(impl, creationContext, isolate); |
| 270 } | 268 } |
| 271 | 269 |
| 272 } // namespace WebCore | 270 } // namespace WebCore |
| OLD | NEW |