| 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 "V8TestInterfaceNamedConstructor.h" | 7 #include "V8TestInterfaceNamedConstructor.h" |
| 8 | 8 |
| 9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 #include "bindings/core/v8/V8DOMConfiguration.h" | 10 #include "bindings/core/v8/V8DOMConfiguration.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 return; | 80 return; |
| 81 } | 81 } |
| 82 | 82 |
| 83 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 83 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
| 84 v8SetReturnValue(info, info.Holder()); | 84 v8SetReturnValue(info, info.Holder()); |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceNamedConstructor", info.Holder(), info.GetIsolate()); | 87 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceNamedConstructor", info.Holder(), info.GetIsolate()); |
| 88 if (UNLIKELY(info.Length() < 1)) { | 88 if (UNLIKELY(info.Length() < 1)) { |
| 89 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 89 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 90 exceptionState.throwIfNeeded(); | |
| 91 return; | 90 return; |
| 92 } | 91 } |
| 93 V8StringResource<> stringArg; | 92 V8StringResource<> stringArg; |
| 94 bool defaultUndefinedOptionalBooleanArg; | 93 bool defaultUndefinedOptionalBooleanArg; |
| 95 int defaultUndefinedOptionalLongArg; | 94 int defaultUndefinedOptionalLongArg; |
| 96 V8StringResource<> defaultUndefinedOptionalStringArg; | 95 V8StringResource<> defaultUndefinedOptionalStringArg; |
| 97 V8StringResource<> defaultNullStringOptionalstringArg; | 96 V8StringResource<> defaultNullStringOptionalstringArg; |
| 98 V8StringResource<> optionalStringArg; | 97 V8StringResource<> optionalStringArg; |
| 99 { | 98 { |
| 100 int numArgsPassed = info.Length(); | 99 int numArgsPassed = info.Length(); |
| 101 while (numArgsPassed > 0) { | 100 while (numArgsPassed > 0) { |
| 102 if (!info[numArgsPassed - 1]->IsUndefined()) | 101 if (!info[numArgsPassed - 1]->IsUndefined()) |
| 103 break; | 102 break; |
| 104 --numArgsPassed; | 103 --numArgsPassed; |
| 105 } | 104 } |
| 106 stringArg = info[0]; | 105 stringArg = info[0]; |
| 107 if (!stringArg.prepare()) | 106 if (!stringArg.prepare()) |
| 108 return; | 107 return; |
| 109 defaultUndefinedOptionalBooleanArg = toBoolean(info.GetIsolate(), info[1
], exceptionState); | 108 defaultUndefinedOptionalBooleanArg = toBoolean(info.GetIsolate(), info[1
], exceptionState); |
| 110 if (exceptionState.throwIfNeeded()) | 109 if (exceptionState.hadException()) |
| 111 return; | 110 return; |
| 112 defaultUndefinedOptionalLongArg = toInt32(info.GetIsolate(), info[2], No
rmalConversion, exceptionState); | 111 defaultUndefinedOptionalLongArg = toInt32(info.GetIsolate(), info[2], No
rmalConversion, exceptionState); |
| 113 if (exceptionState.throwIfNeeded()) | 112 if (exceptionState.hadException()) |
| 114 return; | 113 return; |
| 115 defaultUndefinedOptionalStringArg = info[3]; | 114 defaultUndefinedOptionalStringArg = info[3]; |
| 116 if (!defaultUndefinedOptionalStringArg.prepare()) | 115 if (!defaultUndefinedOptionalStringArg.prepare()) |
| 117 return; | 116 return; |
| 118 if (!info[4]->IsUndefined()) { | 117 if (!info[4]->IsUndefined()) { |
| 119 defaultNullStringOptionalstringArg = info[4]; | 118 defaultNullStringOptionalstringArg = info[4]; |
| 120 if (!defaultNullStringOptionalstringArg.prepare()) | 119 if (!defaultNullStringOptionalstringArg.prepare()) |
| 121 return; | 120 return; |
| 122 } else { | 121 } else { |
| 123 defaultNullStringOptionalstringArg = nullptr; | 122 defaultNullStringOptionalstringArg = nullptr; |
| 124 } | 123 } |
| 125 if (UNLIKELY(numArgsPassed <= 5)) { | 124 if (UNLIKELY(numArgsPassed <= 5)) { |
| 126 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); | 125 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); |
| 127 TestInterfaceNamedConstructor* impl = TestInterfaceNamedConstructor:
:createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg,
defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull
StringOptionalstringArg, exceptionState); | 126 TestInterfaceNamedConstructor* impl = TestInterfaceNamedConstructor:
:createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg,
defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull
StringOptionalstringArg, exceptionState); |
| 128 if (exceptionState.hadException()) { | 127 if (exceptionState.hadException()) { |
| 129 exceptionState.throwIfNeeded(); | |
| 130 return; | 128 return; |
| 131 } | 129 } |
| 132 v8::Local<v8::Object> wrapper = info.Holder(); | 130 v8::Local<v8::Object> wrapper = info.Holder(); |
| 133 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInter
faceNamedConstructorConstructor::wrapperTypeInfo, wrapper); | 131 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInter
faceNamedConstructorConstructor::wrapperTypeInfo, wrapper); |
| 134 v8SetReturnValue(info, wrapper); | 132 v8SetReturnValue(info, wrapper); |
| 135 return; | 133 return; |
| 136 } | 134 } |
| 137 optionalStringArg = info[5]; | 135 optionalStringArg = info[5]; |
| 138 if (!optionalStringArg.prepare()) | 136 if (!optionalStringArg.prepare()) |
| 139 return; | 137 return; |
| 140 } | 138 } |
| 141 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 139 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 142 TestInterfaceNamedConstructor* impl = TestInterfaceNamedConstructor::createF
orJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg, default
UndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullStringOp
tionalstringArg, optionalStringArg, exceptionState); | 140 TestInterfaceNamedConstructor* impl = TestInterfaceNamedConstructor::createF
orJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg, default
UndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullStringOp
tionalstringArg, optionalStringArg, exceptionState); |
| 143 if (exceptionState.hadException()) { | 141 if (exceptionState.hadException()) { |
| 144 exceptionState.throwIfNeeded(); | |
| 145 return; | 142 return; |
| 146 } | 143 } |
| 147 v8::Local<v8::Object> wrapper = info.Holder(); | 144 v8::Local<v8::Object> wrapper = info.Holder(); |
| 148 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceName
dConstructorConstructor::wrapperTypeInfo, wrapper); | 145 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceName
dConstructorConstructor::wrapperTypeInfo, wrapper); |
| 149 v8SetReturnValue(info, wrapper); | 146 v8SetReturnValue(info, wrapper); |
| 150 } | 147 } |
| 151 | 148 |
| 152 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::domT
emplate(v8::Isolate* isolate, const DOMWrapperWorld& world) | 149 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::domT
emplate(v8::Isolate* isolate, const DOMWrapperWorld& world) |
| 153 { | 150 { |
| 154 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 151 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 { | 191 { |
| 195 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 192 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 196 } | 193 } |
| 197 | 194 |
| 198 TestInterfaceNamedConstructor* V8TestInterfaceNamedConstructor::toImplWithTypeCh
eck(v8::Isolate* isolate, v8::Local<v8::Value> value) | 195 TestInterfaceNamedConstructor* V8TestInterfaceNamedConstructor::toImplWithTypeCh
eck(v8::Isolate* isolate, v8::Local<v8::Value> value) |
| 199 { | 196 { |
| 200 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 197 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
| 201 } | 198 } |
| 202 | 199 |
| 203 } // namespace blink | 200 } // namespace blink |
| OLD | NEW |