| 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" |
| 11 #include "bindings/core/v8/ExceptionState.h" | 11 #include "bindings/core/v8/ExceptionState.h" |
| 12 #include "bindings/core/v8/UnionTypesCore.h" |
| 12 #include "bindings/core/v8/V8DOMConfiguration.h" | 13 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 13 #include "bindings/core/v8/V8ObjectConstructor.h" | 14 #include "bindings/core/v8/V8ObjectConstructor.h" |
| 14 #include "bindings/core/v8/V8TestInterfaceEmpty.h" | 15 #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
| 15 #include "core/dom/ContextFeatures.h" | 16 #include "core/dom/ContextFeatures.h" |
| 16 #include "core/dom/Document.h" | 17 #include "core/dom/Document.h" |
| 17 #include "core/frame/LocalDOMWindow.h" | 18 #include "core/frame/LocalDOMWindow.h" |
| 18 #include "core/frame/UseCounter.h" | 19 #include "core/frame/UseCounter.h" |
| 19 #include "platform/RuntimeEnabledFeatures.h" | 20 #include "platform/RuntimeEnabledFeatures.h" |
| 20 #include "platform/TraceEvent.h" | 21 #include "platform/TraceEvent.h" |
| 21 #include "wtf/GetPtr.h" | 22 #include "wtf/GetPtr.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 | 51 |
| 51 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 52 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 52 { | 53 { |
| 53 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 54 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 54 double doubleArg; | 55 double doubleArg; |
| 55 V8StringResource<> stringArg; | 56 V8StringResource<> stringArg; |
| 56 TestInterfaceEmpty* testInterfaceEmptyArg; | 57 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 57 Dictionary dictionaryArg; | 58 Dictionary dictionaryArg; |
| 58 Vector<String> sequenceStringArg; | 59 Vector<String> sequenceStringArg; |
| 59 Vector<Dictionary> sequenceDictionaryArg; | 60 Vector<Dictionary> sequenceDictionaryArg; |
| 61 Vector<LongOrTestDictionary> sequenceLongOrTestDictionaryArg; |
| 60 Dictionary optionalDictionaryArg; | 62 Dictionary optionalDictionaryArg; |
| 61 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; | 63 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; |
| 62 { | 64 { |
| 63 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 65 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
| 64 if (exceptionState.throwIfNeeded()) | 66 if (exceptionState.throwIfNeeded()) |
| 65 return; | 67 return; |
| 66 stringArg = info[1]; | 68 stringArg = info[1]; |
| 67 if (!stringArg.prepare()) | 69 if (!stringArg.prepare()) |
| 68 return; | 70 return; |
| 69 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[2]); | 71 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[2]); |
| 70 if (!isUndefinedOrNull(info[3]) && !info[3]->IsObject()) { | 72 if (!isUndefinedOrNull(info[3]) && !info[3]->IsObject()) { |
| 71 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not
an object."); | 73 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not
an object."); |
| 72 exceptionState.throwIfNeeded(); | 74 exceptionState.throwIfNeeded(); |
| 73 return; | 75 return; |
| 74 } | 76 } |
| 75 dictionaryArg = Dictionary(info[3], info.GetIsolate(), exceptionState); | 77 dictionaryArg = Dictionary(info[3], info.GetIsolate(), exceptionState); |
| 76 if (exceptionState.throwIfNeeded()) | 78 if (exceptionState.throwIfNeeded()) |
| 77 return; | 79 return; |
| 78 sequenceStringArg = toImplArray<String>(info[4], 5, info.GetIsolate(), e
xceptionState); | 80 sequenceStringArg = toImplArray<String>(info[4], 5, info.GetIsolate(), e
xceptionState); |
| 79 if (exceptionState.throwIfNeeded()) | 81 if (exceptionState.throwIfNeeded()) |
| 80 return; | 82 return; |
| 81 sequenceDictionaryArg = toImplArray<Dictionary>(info[5], 6, info.GetIsol
ate(), exceptionState); | 83 sequenceDictionaryArg = toImplArray<Dictionary>(info[5], 6, info.GetIsol
ate(), exceptionState); |
| 82 if (exceptionState.throwIfNeeded()) | 84 if (exceptionState.throwIfNeeded()) |
| 83 return; | 85 return; |
| 84 if (!isUndefinedOrNull(info[6]) && !info[6]->IsObject()) { | 86 sequenceLongOrTestDictionaryArg = toImplArray<LongOrTestDictionary>(info
[6], 7, info.GetIsolate(), exceptionState); |
| 85 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg')
is not an object."); | 87 if (exceptionState.throwIfNeeded()) |
| 88 return; |
| 89 if (!isUndefinedOrNull(info[7]) && !info[7]->IsObject()) { |
| 90 exceptionState.throwTypeError("parameter 8 ('optionalDictionaryArg')
is not an object."); |
| 86 exceptionState.throwIfNeeded(); | 91 exceptionState.throwIfNeeded(); |
| 87 return; | 92 return; |
| 88 } | 93 } |
| 89 optionalDictionaryArg = Dictionary(info[6], info.GetIsolate(), exception
State); | 94 optionalDictionaryArg = Dictionary(info[7], info.GetIsolate(), exception
State); |
| 90 if (exceptionState.throwIfNeeded()) | 95 if (exceptionState.throwIfNeeded()) |
| 91 return; | 96 return; |
| 92 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec
k(info.GetIsolate(), info[7]); | 97 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec
k(info.GetIsolate(), info[8]); |
| 93 } | 98 } |
| 94 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 99 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 95 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 100 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 96 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 101 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 97 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyAr
g, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryAr
g, optionalTestInterfaceEmptyArg, exceptionState); | 102 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr
iptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyAr
g, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, sequenceLongOrTestDi
ctionaryArg, optionalDictionaryArg, optionalTestInterfaceEmptyArg, exceptionStat
e); |
| 98 if (exceptionState.hadException()) { | 103 if (exceptionState.hadException()) { |
| 99 exceptionState.throwIfNeeded(); | 104 exceptionState.throwIfNeeded(); |
| 100 return; | 105 return; |
| 101 } | 106 } |
| 102 v8::Local<v8::Object> wrapper = info.Holder(); | 107 v8::Local<v8::Object> wrapper = info.Holder(); |
| 103 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); | 108 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 104 v8SetReturnValue(info, wrapper); | 109 v8SetReturnValue(info, wrapper); |
| 105 } | 110 } |
| 106 | 111 |
| 107 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 112 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 return; | 175 return; |
| 171 } | 176 } |
| 172 v8::Local<v8::Object> wrapper = info.Holder(); | 177 v8::Local<v8::Object> wrapper = info.Holder(); |
| 173 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); | 178 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 174 v8SetReturnValue(info, wrapper); | 179 v8SetReturnValue(info, wrapper); |
| 175 } | 180 } |
| 176 | 181 |
| 177 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 182 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 178 { | 183 { |
| 179 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 184 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 180 switch (std::min(8, info.Length())) { | 185 switch (std::min(9, info.Length())) { |
| 181 case 0: | 186 case 0: |
| 182 if (true) { | 187 if (true) { |
| 183 TestInterfaceConstructorV8Internal::constructor1(info); | 188 TestInterfaceConstructorV8Internal::constructor1(info); |
| 184 return; | 189 return; |
| 185 } | 190 } |
| 186 break; | 191 break; |
| 187 case 1: | 192 case 1: |
| 188 if (true) { | 193 if (true) { |
| 189 TestInterfaceConstructorV8Internal::constructor3(info); | 194 TestInterfaceConstructorV8Internal::constructor3(info); |
| 190 return; | 195 return; |
| 191 } | 196 } |
| 192 break; | 197 break; |
| 193 case 2: | 198 case 2: |
| 194 if (true) { | 199 if (true) { |
| 195 TestInterfaceConstructorV8Internal::constructor3(info); | 200 TestInterfaceConstructorV8Internal::constructor3(info); |
| 196 return; | 201 return; |
| 197 } | 202 } |
| 198 break; | 203 break; |
| 199 case 3: | 204 case 3: |
| 200 if (true) { | 205 if (true) { |
| 201 TestInterfaceConstructorV8Internal::constructor4(info); | 206 TestInterfaceConstructorV8Internal::constructor4(info); |
| 202 return; | 207 return; |
| 203 } | 208 } |
| 204 break; | 209 break; |
| 205 case 6: | |
| 206 if (true) { | |
| 207 TestInterfaceConstructorV8Internal::constructor2(info); | |
| 208 return; | |
| 209 } | |
| 210 break; | |
| 211 case 7: | 210 case 7: |
| 212 if (true) { | 211 if (true) { |
| 213 TestInterfaceConstructorV8Internal::constructor2(info); | 212 TestInterfaceConstructorV8Internal::constructor2(info); |
| 214 return; | 213 return; |
| 215 } | 214 } |
| 216 break; | 215 break; |
| 217 case 8: | 216 case 8: |
| 218 if (true) { | 217 if (true) { |
| 219 TestInterfaceConstructorV8Internal::constructor2(info); | 218 TestInterfaceConstructorV8Internal::constructor2(info); |
| 220 return; | 219 return; |
| 220 } |
| 221 break; |
| 222 case 9: |
| 223 if (true) { |
| 224 TestInterfaceConstructorV8Internal::constructor2(info); |
| 225 return; |
| 221 } | 226 } |
| 222 break; | 227 break; |
| 223 default: | 228 default: |
| 224 if (info.Length() >= 0) { | 229 if (info.Length() >= 0) { |
| 225 throwArityTypeError(exceptionState, "[0, 1, 2, 3, 6, 7, 8]", info.Le
ngth()); | 230 throwArityTypeError(exceptionState, "[0, 1, 2, 3, 7, 8, 9]", info.Le
ngth()); |
| 226 return; | 231 return; |
| 227 } | 232 } |
| 228 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | 233 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); |
| 229 exceptionState.throwIfNeeded(); | 234 exceptionState.throwIfNeeded(); |
| 230 return; | 235 return; |
| 231 } | 236 } |
| 232 exceptionState.throwTypeError("No matching constructor signature."); | 237 exceptionState.throwTypeError("No matching constructor signature."); |
| 233 exceptionState.throwIfNeeded(); | 238 exceptionState.throwIfNeeded(); |
| 234 } | 239 } |
| 235 | 240 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 { | 375 { |
| 371 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); | 376 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); |
| 372 } | 377 } |
| 373 | 378 |
| 374 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) | 379 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) |
| 375 { | 380 { |
| 376 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); | 381 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); |
| 377 } | 382 } |
| 378 | 383 |
| 379 } // namespace blink | 384 } // namespace blink |
| OLD | NEW |