| 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 "V8TestInterfaceConstructor.h" | 8 #include "V8TestInterfaceConstructor.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 54 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 55 double doubleArg; | 55 double doubleArg; |
| 56 V8StringResource<> stringArg; | 56 V8StringResource<> stringArg; |
| 57 TestInterfaceEmpty* testInterfaceEmptyArg; | 57 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 58 Dictionary dictionaryArg; | 58 Dictionary dictionaryArg; |
| 59 Vector<String> sequenceStringArg; | 59 Vector<String> sequenceStringArg; |
| 60 Vector<Dictionary> sequenceDictionaryArg; | 60 Vector<Dictionary> sequenceDictionaryArg; |
| 61 Dictionary optionalDictionaryArg; | 61 Dictionary optionalDictionaryArg; |
| 62 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; | 62 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; |
| 63 { | 63 { |
| 64 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toDouble(info[0], excep
tionState), exceptionState); | 64 TONATIVE_CONVERT(convertAndThrow(doubleArg = toDouble(info[0], exception
State), exceptionState), return); |
| 65 TOSTRING_VOID_INTERNAL(stringArg, info[1]); | 65 TONATIVE_CONVERT((stringArg = info[1]).prepare(), return); |
| 66 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[2]); | 66 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[2]); |
| 67 if (!isUndefinedOrNull(info[3]) && !info[3]->IsObject()) { | 67 if (!isUndefinedOrNull(info[3]) && !info[3]->IsObject()) { |
| 68 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not
an object."); | 68 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not
an object."); |
| 69 exceptionState.throwIfNeeded(); | 69 exceptionState.throwIfNeeded(); |
| 70 return; | 70 return; |
| 71 } | 71 } |
| 72 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(dictionaryArg, Dictionary(info[3],
info.GetIsolate(), exceptionState), exceptionState); | 72 TONATIVE_CONVERT(convertAndThrow(dictionaryArg = Dictionary(info[3], inf
o.GetIsolate(), exceptionState), exceptionState), return); |
| 73 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(sequenceStringArg, toImplArray<Str
ing>(info[4], 5, info.GetIsolate(), exceptionState), exceptionState); | 73 TONATIVE_CONVERT(convertAndThrow(sequenceStringArg = toImplArray<String>
(info[4], 5, info.GetIsolate(), exceptionState), exceptionState), return); |
| 74 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(sequenceDictionaryArg, toImplArray
<Dictionary>(info[5], 6, info.GetIsolate(), exceptionState), exceptionState); | 74 TONATIVE_CONVERT(convertAndThrow(sequenceDictionaryArg = toImplArray<Dic
tionary>(info[5], 6, info.GetIsolate(), exceptionState), exceptionState), return
); |
| 75 if (!isUndefinedOrNull(info[6]) && !info[6]->IsObject()) { | 75 if (!isUndefinedOrNull(info[6]) && !info[6]->IsObject()) { |
| 76 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg')
is not an object."); | 76 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg')
is not an object."); |
| 77 exceptionState.throwIfNeeded(); | 77 exceptionState.throwIfNeeded(); |
| 78 return; | 78 return; |
| 79 } | 79 } |
| 80 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalDictionaryArg, Dictionary(
info[6], info.GetIsolate(), exceptionState), exceptionState); | 80 TONATIVE_CONVERT(convertAndThrow(optionalDictionaryArg = Dictionary(info
[6], info.GetIsolate(), exceptionState), exceptionState), return); |
| 81 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec
k(info.GetIsolate(), info[7]); | 81 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec
k(info.GetIsolate(), info[7]); |
| 82 } | 82 } |
| 83 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 83 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 84 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 84 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 85 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 85 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 86 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyAr
g, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryAr
g, optionalTestInterfaceEmptyArg, exceptionState); | 86 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyAr
g, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryAr
g, optionalTestInterfaceEmptyArg, exceptionState); |
| 87 if (exceptionState.hadException()) { | 87 if (exceptionState.hadException()) { |
| 88 exceptionState.throwIfNeeded(); | 88 exceptionState.throwIfNeeded(); |
| 89 return; | 89 return; |
| 90 } | 90 } |
| 91 v8::Local<v8::Object> wrapper = info.Holder(); | 91 v8::Local<v8::Object> wrapper = info.Holder(); |
| 92 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); | 92 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 93 v8SetReturnValue(info, wrapper); | 93 v8SetReturnValue(info, wrapper); |
| 94 } | 94 } |
| 95 | 95 |
| 96 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 96 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 97 { | 97 { |
| 98 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 98 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 99 V8StringResource<> arg; | 99 V8StringResource<> arg; |
| 100 V8StringResource<> optArg; | 100 V8StringResource<> optArg; |
| 101 { | 101 { |
| 102 TOSTRING_VOID_INTERNAL(arg, info[0]); | 102 TONATIVE_CONVERT((arg = info[0]).prepare(), return); |
| 103 if (UNLIKELY(info.Length() <= 1)) { | 103 if (UNLIKELY(info.Length() <= 1)) { |
| 104 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 104 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 105 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); | 105 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); |
| 106 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); | 106 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); |
| 107 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eate(scriptState, executionContext, document, arg, exceptionState); | 107 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eate(scriptState, executionContext, document, arg, exceptionState); |
| 108 if (exceptionState.hadException()) { | 108 if (exceptionState.hadException()) { |
| 109 exceptionState.throwIfNeeded(); | 109 exceptionState.throwIfNeeded(); |
| 110 return; | 110 return; |
| 111 } | 111 } |
| 112 v8::Local<v8::Object> wrapper = info.Holder(); | 112 v8::Local<v8::Object> wrapper = info.Holder(); |
| 113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctor::wrapperTypeInfo, wrapper); | 113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctor::wrapperTypeInfo, wrapper); |
| 114 v8SetReturnValue(info, wrapper); | 114 v8SetReturnValue(info, wrapper); |
| 115 return; | 115 return; |
| 116 } | 116 } |
| 117 TOSTRING_VOID_INTERNAL(optArg, info[1]); | 117 TONATIVE_CONVERT((optArg = info[1]).prepare(), return); |
| 118 } | 118 } |
| 119 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 119 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 120 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 120 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 121 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 121 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 122 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, arg, optArg, exceptionState); | 122 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, arg, optArg, exceptionState); |
| 123 if (exceptionState.hadException()) { | 123 if (exceptionState.hadException()) { |
| 124 exceptionState.throwIfNeeded(); | 124 exceptionState.throwIfNeeded(); |
| 125 return; | 125 return; |
| 126 } | 126 } |
| 127 v8::Local<v8::Object> wrapper = info.Holder(); | 127 v8::Local<v8::Object> wrapper = info.Holder(); |
| 128 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); | 128 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 129 v8SetReturnValue(info, wrapper); | 129 v8SetReturnValue(info, wrapper); |
| 130 } | 130 } |
| 131 | 131 |
| 132 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) | 132 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 133 { | 133 { |
| 134 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 134 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 135 V8StringResource<> arg; | 135 V8StringResource<> arg; |
| 136 V8StringResource<> arg2; | 136 V8StringResource<> arg2; |
| 137 V8StringResource<> arg3; | 137 V8StringResource<> arg3; |
| 138 { | 138 { |
| 139 TOSTRING_VOID_INTERNAL(arg, info[0]); | 139 TONATIVE_CONVERT((arg = info[0]).prepare(), return); |
| 140 TOSTRING_VOID_INTERNAL(arg2, info[1]); | 140 TONATIVE_CONVERT((arg2 = info[1]).prepare(), return); |
| 141 TOSTRING_VOID_INTERNAL(arg3, info[2]); | 141 TONATIVE_CONVERT((arg3 = info[2]).prepare(), return); |
| 142 } | 142 } |
| 143 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 143 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 144 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 144 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 145 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 145 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 146 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, arg, arg2, arg3, exceptionState); | 146 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, arg, arg2, arg3, exceptionState); |
| 147 if (exceptionState.hadException()) { | 147 if (exceptionState.hadException()) { |
| 148 exceptionState.throwIfNeeded(); | 148 exceptionState.throwIfNeeded(); |
| 149 return; | 149 return; |
| 150 } | 150 } |
| 151 v8::Local<v8::Object> wrapper = info.Holder(); | 151 v8::Local<v8::Object> wrapper = info.Holder(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 229 } |
| 230 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 230 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 231 if (UNLIKELY(info.Length() < 1)) { | 231 if (UNLIKELY(info.Length() < 1)) { |
| 232 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 232 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 233 exceptionState.throwIfNeeded(); | 233 exceptionState.throwIfNeeded(); |
| 234 return; | 234 return; |
| 235 } | 235 } |
| 236 V8StringResource<> arg; | 236 V8StringResource<> arg; |
| 237 V8StringResource<> optArg; | 237 V8StringResource<> optArg; |
| 238 { | 238 { |
| 239 TOSTRING_VOID_INTERNAL(arg, info[0]); | 239 TONATIVE_CONVERT((arg = info[0]).prepare(), return); |
| 240 if (UNLIKELY(info.Length() <= 1)) { | 240 if (UNLIKELY(info.Length() <= 1)) { |
| 241 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 241 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 242 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); | 242 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); |
| 243 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); | 243 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); |
| 244 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eateForJSConstructor(scriptState, executionContext, document, arg, exceptionStat
e); | 244 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eateForJSConstructor(scriptState, executionContext, document, arg, exceptionStat
e); |
| 245 if (exceptionState.hadException()) { | 245 if (exceptionState.hadException()) { |
| 246 exceptionState.throwIfNeeded(); | 246 exceptionState.throwIfNeeded(); |
| 247 return; | 247 return; |
| 248 } | 248 } |
| 249 v8::Local<v8::Object> wrapper = info.Holder(); | 249 v8::Local<v8::Object> wrapper = info.Holder(); |
| 250 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctorConstructor::wrapperTypeInfo, wrapper); | 250 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctorConstructor::wrapperTypeInfo, wrapper); |
| 251 v8SetReturnValue(info, wrapper); | 251 v8SetReturnValue(info, wrapper); |
| 252 return; | 252 return; |
| 253 } | 253 } |
| 254 TOSTRING_VOID_INTERNAL(optArg, info[1]); | 254 TONATIVE_CONVERT((optArg = info[1]).prepare(), return); |
| 255 } | 255 } |
| 256 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 256 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 257 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 257 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 258 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 258 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 259 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ
SConstructor(scriptState, executionContext, document, arg, optArg, exceptionStat
e); | 259 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ
SConstructor(scriptState, executionContext, document, arg, optArg, exceptionStat
e); |
| 260 if (exceptionState.hadException()) { | 260 if (exceptionState.hadException()) { |
| 261 exceptionState.throwIfNeeded(); | 261 exceptionState.throwIfNeeded(); |
| 262 return; | 262 return; |
| 263 } | 263 } |
| 264 v8::Local<v8::Object> wrapper = info.Holder(); | 264 v8::Local<v8::Object> wrapper = info.Holder(); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 { | 345 { |
| 346 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); | 346 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) | 349 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) |
| 350 { | 350 { |
| 351 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); | 351 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); |
| 352 } | 352 } |
| 353 | 353 |
| 354 } // namespace blink | 354 } // namespace blink |
| OLD | NEW |