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 "V8TestInterfaceOriginTrialEnabled.h" | 7 #include "V8TestInterfaceOriginTrialEnabled.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 { | 58 { |
59 TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeGetter(in
fo); | 59 TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeGetter(in
fo); |
60 } | 60 } |
61 | 61 |
62 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) | 62 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) |
63 { | 63 { |
64 v8::Local<v8::Object> holder = info.Holder(); | 64 v8::Local<v8::Object> holder = info.Holder(); |
65 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterfaceOriginTrialEnabled", holder, info.GetIsolate()); | 65 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterfaceOriginTrialEnabled", holder, info.GetIsolate()); |
66 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(holder); | 66 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(holder); |
67 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); | 67 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); |
68 if (exceptionState.throwIfNeeded()) | 68 if (exceptionState.hadException()) |
69 return; | 69 return; |
70 impl->setDoubleAttribute(cppValue); | 70 impl->setDoubleAttribute(cppValue); |
71 } | 71 } |
72 | 72 |
73 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 73 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
74 { | 74 { |
75 v8::Local<v8::Value> v8Value = info[0]; | 75 v8::Local<v8::Value> v8Value = info[0]; |
76 TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeSetter(v8
Value, info); | 76 TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeSetter(v8
Value, info); |
77 } | 77 } |
78 | 78 |
79 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 79 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
80 { | 80 { |
81 v8::Local<v8::Object> holder = info.Holder(); | 81 v8::Local<v8::Object> holder = info.Holder(); |
82 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(holder); | 82 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(holder); |
83 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); | 83 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); |
84 } | 84 } |
85 | 85 |
86 static void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 86 static void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
87 { | 87 { |
88 TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttribute
Getter(info); | 88 TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttribute
Getter(info); |
89 } | 89 } |
90 | 90 |
91 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) | 91 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) |
92 { | 92 { |
93 v8::Local<v8::Object> holder = info.Holder(); | 93 v8::Local<v8::Object> holder = info.Holder(); |
94 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestInterfaceOriginTrialEnabled", holder, info.GetIsolate()); | 94 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestInterfaceOriginTrialEnabled", holder, info.GetIsolate()); |
95 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(holder); | 95 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(holder); |
96 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 96 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
97 if (exceptionState.throwIfNeeded()) | 97 if (exceptionState.hadException()) |
98 return; | 98 return; |
99 impl->setConditionalLongAttribute(cppValue); | 99 impl->setConditionalLongAttribute(cppValue); |
100 } | 100 } |
101 | 101 |
102 static void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 102 static void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
103 { | 103 { |
104 v8::Local<v8::Value> v8Value = info[0]; | 104 v8::Local<v8::Value> v8Value = info[0]; |
105 TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttribute
Setter(v8Value, info); | 105 TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttribute
Setter(v8Value, info); |
106 } | 106 } |
107 | 107 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 static void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 149 static void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
150 { | 150 { |
151 TestInterfaceOriginTrialEnabledV8Internal::staticConditionalReadOnlyLongAttr
ibuteAttributeGetter(info); | 151 TestInterfaceOriginTrialEnabledV8Internal::staticConditionalReadOnlyLongAttr
ibuteAttributeGetter(info); |
152 } | 152 } |
153 | 153 |
154 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 154 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
155 { | 155 { |
156 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIso
late()); | 156 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIso
late()); |
157 if (UNLIKELY(info.Length() < 2)) { | 157 if (UNLIKELY(info.Length() < 2)) { |
158 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 158 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
159 exceptionState.throwIfNeeded(); | |
160 return; | 159 return; |
161 } | 160 } |
162 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); | 161 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); |
163 double doubleArg; | 162 double doubleArg; |
164 float floatArg; | 163 float floatArg; |
165 { | 164 { |
166 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 165 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
167 if (exceptionState.throwIfNeeded()) | 166 if (exceptionState.hadException()) |
168 return; | 167 return; |
169 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState)
; | 168 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState)
; |
170 if (exceptionState.throwIfNeeded()) | 169 if (exceptionState.hadException()) |
171 return; | 170 return; |
172 } | 171 } |
173 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 172 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
174 } | 173 } |
175 | 174 |
176 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 175 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
177 { | 176 { |
178 TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethod
(info); | 177 TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethod
(info); |
179 } | 178 } |
180 | 179 |
181 static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 180 static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
182 { | 181 { |
183 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); | 182 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); |
184 impl->voidMethodPartialOverload(); | 183 impl->voidMethodPartialOverload(); |
185 } | 184 } |
186 | 185 |
187 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 186 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
188 { | 187 { |
189 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIsola
te()); | 188 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIsola
te()); |
190 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); | 189 TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::t
oImpl(info.Holder()); |
191 double doubleArg; | 190 double doubleArg; |
192 { | 191 { |
193 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 192 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
194 if (exceptionState.throwIfNeeded()) | 193 if (exceptionState.hadException()) |
195 return; | 194 return; |
196 } | 195 } |
197 impl->voidMethodPartialOverload(doubleArg); | 196 impl->voidMethodPartialOverload(doubleArg); |
198 } | 197 } |
199 | 198 |
200 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 199 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
201 { | 200 { |
202 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIsola
te()); | 201 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIsola
te()); |
203 switch (std::min(1, info.Length())) { | 202 switch (std::min(1, info.Length())) { |
204 case 0: | 203 case 0: |
205 if (true) { | 204 if (true) { |
206 voidMethodPartialOverload1Method(info); | 205 voidMethodPartialOverload1Method(info); |
207 return; | 206 return; |
208 } | 207 } |
209 break; | 208 break; |
210 case 1: | 209 case 1: |
211 if (true) { | 210 if (true) { |
212 voidMethodPartialOverload2Method(info); | 211 voidMethodPartialOverload2Method(info); |
213 return; | 212 return; |
214 } | 213 } |
215 break; | 214 break; |
216 default: | 215 default: |
217 break; | 216 break; |
218 } | 217 } |
219 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 218 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
220 exceptionState.throwIfNeeded(); | |
221 return; | 219 return; |
222 } | 220 } |
223 | 221 |
224 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 222 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
225 { | 223 { |
226 TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethod(i
nfo); | 224 TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethod(i
nfo); |
227 } | 225 } |
228 | 226 |
229 } // namespace TestInterfaceOriginTrialEnabledV8Internal | 227 } // namespace TestInterfaceOriginTrialEnabledV8Internal |
230 | 228 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 { | 284 { |
287 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 285 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
288 } | 286 } |
289 | 287 |
290 TestInterfaceOriginTrialEnabled* V8TestInterfaceOriginTrialEnabled::toImplWithTy
peCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) | 288 TestInterfaceOriginTrialEnabled* V8TestInterfaceOriginTrialEnabled::toImplWithTy
peCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) |
291 { | 289 { |
292 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 290 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
293 } | 291 } |
294 | 292 |
295 } // namespace blink | 293 } // namespace blink |
OLD | NEW |