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 "V8TestInterfaceNamedConstructor.h" | 8 #include "V8TestInterfaceNamedConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| 11 #include "bindings/core/v8/Optional.h" |
11 #include "bindings/core/v8/V8DOMConfiguration.h" | 12 #include "bindings/core/v8/V8DOMConfiguration.h" |
12 #include "bindings/core/v8/V8HiddenValue.h" | 13 #include "bindings/core/v8/V8HiddenValue.h" |
13 #include "bindings/core/v8/V8ObjectConstructor.h" | 14 #include "bindings/core/v8/V8ObjectConstructor.h" |
14 #include "core/dom/ContextFeatures.h" | 15 #include "core/dom/ContextFeatures.h" |
15 #include "core/dom/Document.h" | 16 #include "core/dom/Document.h" |
16 #include "core/frame/LocalDOMWindow.h" | 17 #include "core/frame/LocalDOMWindow.h" |
17 #include "platform/RuntimeEnabledFeatures.h" | 18 #include "platform/RuntimeEnabledFeatures.h" |
18 #include "platform/TraceEvent.h" | 19 #include "platform/TraceEvent.h" |
19 #include "wtf/GetPtr.h" | 20 #include "wtf/GetPtr.h" |
20 #include "wtf/RefPtr.h" | 21 #include "wtf/RefPtr.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 v8SetReturnValue(info, info.Holder()); | 84 v8SetReturnValue(info, info.Holder()); |
84 return; | 85 return; |
85 } | 86 } |
86 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceNamedConstructor", info.Holder(), info.GetIsolate()); | 87 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceNamedConstructor", info.Holder(), info.GetIsolate()); |
87 if (UNLIKELY(info.Length() < 1)) { | 88 if (UNLIKELY(info.Length() < 1)) { |
88 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 89 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
89 exceptionState.throwIfNeeded(); | 90 exceptionState.throwIfNeeded(); |
90 return; | 91 return; |
91 } | 92 } |
92 V8StringResource<> stringArg; | 93 V8StringResource<> stringArg; |
93 bool defaultUndefinedOptionalBooleanArg; | 94 bool optionalBooleanArg = false; |
94 int defaultUndefinedOptionalLongArg; | 95 bool optionalBooleanArgMissing = false; |
95 V8StringResource<> defaultUndefinedOptionalStringArg; | 96 int optionalLongArg = 0; |
| 97 bool optionalLongArgMissing = false; |
| 98 V8StringResource<> optionalStringArg; |
| 99 bool optionalStringArgMissing = false; |
96 V8StringResource<> defaultNullStringOptionalstringArg; | 100 V8StringResource<> defaultNullStringOptionalstringArg; |
97 V8StringResource<> optionalStringArg; | 101 V8StringResource<> optionalStringArg; |
| 102 bool optionalStringArgMissing = false; |
98 { | 103 { |
99 v8::TryCatch block; | 104 v8::TryCatch block; |
100 V8RethrowTryCatchScope rethrow(block); | 105 V8RethrowTryCatchScope rethrow(block); |
101 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 106 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
102 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalBooleanArg, info[1]->Bool
eanValue()); | 107 if (!info[1]->IsUndefined()) { |
103 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalLongArg, t
oInt32(info[2], exceptionState), exceptionState); | 108 TONATIVE_VOID_INTERNAL(optionalBooleanArg, info[1]->BooleanValue()); |
104 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[3]); | 109 } else { |
| 110 optionalBooleanArgMissing = true; |
| 111 } |
| 112 if (!info[2]->IsUndefined()) { |
| 113 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[
2], exceptionState), exceptionState); |
| 114 } else { |
| 115 optionalLongArgMissing = true; |
| 116 } |
| 117 if (!info[3]->IsUndefined()) { |
| 118 TOSTRING_VOID_INTERNAL(optionalStringArg, info[3]); |
| 119 } else { |
| 120 optionalStringArgMissing = true; |
| 121 } |
105 if (!info[4]->IsUndefined()) { | 122 if (!info[4]->IsUndefined()) { |
106 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalstringArg, info[4]); | 123 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalstringArg, info[4]); |
107 } else { | 124 } else { |
108 defaultNullStringOptionalstringArg = nullptr; | 125 defaultNullStringOptionalstringArg = nullptr; |
109 } | 126 } |
110 if (UNLIKELY(info.Length() <= 5)) { | 127 if (!info[5]->IsUndefined()) { |
111 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); | 128 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); |
112 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConst
ructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBool
eanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defa
ultNullStringOptionalstringArg, exceptionState); | 129 } else { |
113 if (exceptionState.hadException()) { | 130 optionalStringArgMissing = true; |
114 exceptionState.throwIfNeeded(); | |
115 return; | |
116 } | |
117 v8::Handle<v8::Object> wrapper = info.Holder(); | |
118 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstru
ctor>(impl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeIn
fo, wrapper, info.GetIsolate(), WrapperConfiguration::Dependent); | |
119 v8SetReturnValue(info, wrapper); | |
120 return; | |
121 } | 131 } |
122 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); | |
123 } | 132 } |
124 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 133 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
125 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::
createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg,
defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullS
tringOptionalstringArg, optionalStringArg, exceptionState); | 134 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::
createForJSConstructor(document, stringArg, Optional<bool>(optionalBooleanArg, o
ptionalBooleanArgMissing), Optional<int>(optionalLongArg, optionalLongArgMissing
), Optional<V8StringResource<> >(optionalStringArg, optionalStringArgMissing), d
efaultNullStringOptionalstringArg, Optional<V8StringResource<> >(optionalStringA
rg, optionalStringArgMissing), exceptionState); |
126 if (exceptionState.hadException()) { | 135 if (exceptionState.hadException()) { |
127 exceptionState.throwIfNeeded(); | 136 exceptionState.throwIfNeeded(); |
128 return; | 137 return; |
129 } | 138 } |
130 v8::Handle<v8::Object> wrapper = info.Holder(); | 139 v8::Handle<v8::Object> wrapper = info.Holder(); |
131 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrap
per, info.GetIsolate(), WrapperConfiguration::Dependent); | 140 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrap
per, info.GetIsolate(), WrapperConfiguration::Dependent); |
132 v8SetReturnValue(info, wrapper); | 141 v8SetReturnValue(info, wrapper); |
133 } | 142 } |
134 | 143 |
135 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::dom
Template(v8::Isolate* isolate) | 144 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::dom
Template(v8::Isolate* isolate) |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 fromInternalPointer(internalPointer)->deref(); | 233 fromInternalPointer(internalPointer)->deref(); |
225 } | 234 } |
226 | 235 |
227 template<> | 236 template<> |
228 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 237 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
229 { | 238 { |
230 return toV8(impl, creationContext, isolate); | 239 return toV8(impl, creationContext, isolate); |
231 } | 240 } |
232 | 241 |
233 } // namespace blink | 242 } // namespace blink |
OLD | NEW |