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 "bindings/core/v8/UnionTypesCore.h" | 8 #include "bindings/core/v8/UnionTypesCore.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 { | 217 { |
218 if (v8Value.IsEmpty()) | 218 if (v8Value.IsEmpty()) |
219 return; | 219 return; |
220 | 220 |
221 if (v8Value->IsBoolean()) { | 221 if (v8Value->IsBoolean()) { |
222 impl.setBoolean(v8Value->ToBoolean()->Value()); | 222 impl.setBoolean(v8Value->ToBoolean()->Value()); |
223 return; | 223 return; |
224 } | 224 } |
225 | 225 |
226 if (v8Value->IsNumber()) { | 226 if (v8Value->IsNumber()) { |
227 double cppValue = toDouble(v8Value, exceptionState); | 227 double cppValue = toDouble(isolate, v8Value, exceptionState); |
228 if (exceptionState.hadException()) | 228 if (exceptionState.hadException()) |
229 return; | 229 return; |
230 impl.setUnrestrictedDouble(cppValue); | 230 impl.setUnrestrictedDouble(cppValue); |
231 return; | 231 return; |
232 } | 232 } |
233 | 233 |
234 { | 234 { |
235 V8StringResource<> cppValue = v8Value; | 235 V8StringResource<> cppValue = v8Value; |
236 if (!cppValue.prepare(exceptionState)) | 236 if (!cppValue.prepare(exceptionState)) |
237 return; | 237 return; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 container.setString(value); | 309 container.setString(value); |
310 return container; | 310 return container; |
311 } | 311 } |
312 | 312 |
313 void V8DoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, DoubleOrString& impl, ExceptionState& exceptionState) | 313 void V8DoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, DoubleOrString& impl, ExceptionState& exceptionState) |
314 { | 314 { |
315 if (v8Value.IsEmpty()) | 315 if (v8Value.IsEmpty()) |
316 return; | 316 return; |
317 | 317 |
318 if (v8Value->IsNumber()) { | 318 if (v8Value->IsNumber()) { |
319 double cppValue = toRestrictedDouble(v8Value, exceptionState); | 319 double cppValue = toRestrictedDouble(isolate, v8Value, exceptionState); |
320 if (exceptionState.hadException()) | 320 if (exceptionState.hadException()) |
321 return; | 321 return; |
322 impl.setDouble(cppValue); | 322 impl.setDouble(cppValue); |
323 return; | 323 return; |
324 } | 324 } |
325 | 325 |
326 { | 326 { |
327 V8StringResource<> cppValue = v8Value; | 327 V8StringResource<> cppValue = v8Value; |
328 if (!cppValue.prepare(exceptionState)) | 328 if (!cppValue.prepare(exceptionState)) |
329 return; | 329 return; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 container.setDouble(value); | 608 container.setDouble(value); |
609 return container; | 609 return container; |
610 } | 610 } |
611 | 611 |
612 void V8StringOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, StringOrDouble& impl, ExceptionState& exceptionState) | 612 void V8StringOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, StringOrDouble& impl, ExceptionState& exceptionState) |
613 { | 613 { |
614 if (v8Value.IsEmpty()) | 614 if (v8Value.IsEmpty()) |
615 return; | 615 return; |
616 | 616 |
617 if (v8Value->IsNumber()) { | 617 if (v8Value->IsNumber()) { |
618 double cppValue = toRestrictedDouble(v8Value, exceptionState); | 618 double cppValue = toRestrictedDouble(isolate, v8Value, exceptionState); |
619 if (exceptionState.hadException()) | 619 if (exceptionState.hadException()) |
620 return; | 620 return; |
621 impl.setDouble(cppValue); | 621 impl.setDouble(cppValue); |
622 return; | 622 return; |
623 } | 623 } |
624 | 624 |
625 { | 625 { |
626 V8StringResource<> cppValue = v8Value; | 626 V8StringResource<> cppValue = v8Value; |
627 if (!cppValue.prepare(exceptionState)) | 627 if (!cppValue.prepare(exceptionState)) |
628 return; | 628 return; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 container.setDouble(value); | 793 container.setDouble(value); |
794 return container; | 794 return container; |
795 } | 795 } |
796 | 796 |
797 void V8TestEnumOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Val
ue, TestEnumOrDouble& impl, ExceptionState& exceptionState) | 797 void V8TestEnumOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Val
ue, TestEnumOrDouble& impl, ExceptionState& exceptionState) |
798 { | 798 { |
799 if (v8Value.IsEmpty()) | 799 if (v8Value.IsEmpty()) |
800 return; | 800 return; |
801 | 801 |
802 if (v8Value->IsNumber()) { | 802 if (v8Value->IsNumber()) { |
803 double cppValue = toRestrictedDouble(v8Value, exceptionState); | 803 double cppValue = toRestrictedDouble(isolate, v8Value, exceptionState); |
804 if (exceptionState.hadException()) | 804 if (exceptionState.hadException()) |
805 return; | 805 return; |
806 impl.setDouble(cppValue); | 806 impl.setDouble(cppValue); |
807 return; | 807 return; |
808 } | 808 } |
809 | 809 |
810 { | 810 { |
811 V8StringResource<> cppValue = v8Value; | 811 V8StringResource<> cppValue = v8Value; |
812 if (!cppValue.prepare(exceptionState)) | 812 if (!cppValue.prepare(exceptionState)) |
813 return; | 813 return; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 if (v8Value.IsEmpty()) | 1074 if (v8Value.IsEmpty()) |
1075 return; | 1075 return; |
1076 | 1076 |
1077 if (V8TestInterface::hasInstance(v8Value, isolate)) { | 1077 if (V8TestInterface::hasInstance(v8Value, isolate)) { |
1078 RefPtr<TestInterfaceImplementation> cppValue = V8TestInterface::toImpl(v
8::Local<v8::Object>::Cast(v8Value)); | 1078 RefPtr<TestInterfaceImplementation> cppValue = V8TestInterface::toImpl(v
8::Local<v8::Object>::Cast(v8Value)); |
1079 impl.setTestInterface(cppValue); | 1079 impl.setTestInterface(cppValue); |
1080 return; | 1080 return; |
1081 } | 1081 } |
1082 | 1082 |
1083 if (v8Value->IsNumber()) { | 1083 if (v8Value->IsNumber()) { |
1084 int cppValue = toInt32(v8Value, exceptionState); | 1084 int cppValue = toInt32(isolate, v8Value, exceptionState); |
1085 if (exceptionState.hadException()) | 1085 if (exceptionState.hadException()) |
1086 return; | 1086 return; |
1087 impl.setLong(cppValue); | 1087 impl.setLong(cppValue); |
1088 return; | 1088 return; |
1089 } | 1089 } |
1090 | 1090 |
1091 { | 1091 { |
1092 int cppValue = toInt32(v8Value, exceptionState); | 1092 int cppValue = toInt32(isolate, v8Value, exceptionState); |
1093 if (exceptionState.hadException()) | 1093 if (exceptionState.hadException()) |
1094 return; | 1094 return; |
1095 impl.setLong(cppValue); | 1095 impl.setLong(cppValue); |
1096 return; | 1096 return; |
1097 } | 1097 } |
1098 | 1098 |
1099 } | 1099 } |
1100 | 1100 |
1101 v8::Local<v8::Value> toV8(const TestInterfaceOrLong& impl, v8::Local<v8::Object>
creationContext, v8::Isolate* isolate) | 1101 v8::Local<v8::Value> toV8(const TestInterfaceOrLong& impl, v8::Local<v8::Object>
creationContext, v8::Isolate* isolate) |
1102 { | 1102 { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 container.setString(value); | 1347 container.setString(value); |
1348 return container; | 1348 return container; |
1349 } | 1349 } |
1350 | 1350 |
1351 void V8UnrestrictedDoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Va
lue> v8Value, UnrestrictedDoubleOrString& impl, ExceptionState& exceptionState) | 1351 void V8UnrestrictedDoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Va
lue> v8Value, UnrestrictedDoubleOrString& impl, ExceptionState& exceptionState) |
1352 { | 1352 { |
1353 if (v8Value.IsEmpty()) | 1353 if (v8Value.IsEmpty()) |
1354 return; | 1354 return; |
1355 | 1355 |
1356 if (v8Value->IsNumber()) { | 1356 if (v8Value->IsNumber()) { |
1357 double cppValue = toDouble(v8Value, exceptionState); | 1357 double cppValue = toDouble(isolate, v8Value, exceptionState); |
1358 if (exceptionState.hadException()) | 1358 if (exceptionState.hadException()) |
1359 return; | 1359 return; |
1360 impl.setUnrestrictedDouble(cppValue); | 1360 impl.setUnrestrictedDouble(cppValue); |
1361 return; | 1361 return; |
1362 } | 1362 } |
1363 | 1363 |
1364 { | 1364 { |
1365 V8StringResource<> cppValue = v8Value; | 1365 V8StringResource<> cppValue = v8Value; |
1366 if (!cppValue.prepare(exceptionState)) | 1366 if (!cppValue.prepare(exceptionState)) |
1367 return; | 1367 return; |
(...skipping 19 matching lines...) Expand all Loading... |
1387 } | 1387 } |
1388 | 1388 |
1389 UnrestrictedDoubleOrString NativeValueTraits<UnrestrictedDoubleOrString>::native
Value(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& e
xceptionState) | 1389 UnrestrictedDoubleOrString NativeValueTraits<UnrestrictedDoubleOrString>::native
Value(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& e
xceptionState) |
1390 { | 1390 { |
1391 UnrestrictedDoubleOrString impl; | 1391 UnrestrictedDoubleOrString impl; |
1392 V8UnrestrictedDoubleOrString::toImpl(isolate, value, impl, exceptionState); | 1392 V8UnrestrictedDoubleOrString::toImpl(isolate, value, impl, exceptionState); |
1393 return impl; | 1393 return impl; |
1394 } | 1394 } |
1395 | 1395 |
1396 } // namespace blink | 1396 } // namespace blink |
OLD | NEW |