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 "V8TestDictionary.h" | 8 #include "V8TestDictionary.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 v8::Local<v8::Value> doubleOrNullMemberValue = v8Object->Get(v8String(isolat
e, "doubleOrNullMember")); | 73 v8::Local<v8::Value> doubleOrNullMemberValue = v8Object->Get(v8String(isolat
e, "doubleOrNullMember")); |
74 if (block.HasCaught()) { | 74 if (block.HasCaught()) { |
75 exceptionState.rethrowV8Exception(block.Exception()); | 75 exceptionState.rethrowV8Exception(block.Exception()); |
76 return; | 76 return; |
77 } | 77 } |
78 if (doubleOrNullMemberValue.IsEmpty() || doubleOrNullMemberValue->IsUndefine
d()) { | 78 if (doubleOrNullMemberValue.IsEmpty() || doubleOrNullMemberValue->IsUndefine
d()) { |
79 // Do nothing. | 79 // Do nothing. |
80 } else if (doubleOrNullMemberValue->IsNull()) { | 80 } else if (doubleOrNullMemberValue->IsNull()) { |
81 impl.setDoubleOrNullMemberToNull(); | 81 impl.setDoubleOrNullMemberToNull(); |
82 } else { | 82 } else { |
83 double doubleOrNullMember = toRestrictedDouble(doubleOrNullMemberValue,
exceptionState); | 83 double doubleOrNullMember = toRestrictedDouble(isolate, doubleOrNullMemb
erValue, exceptionState); |
84 if (exceptionState.hadException()) | 84 if (exceptionState.hadException()) |
85 return; | 85 return; |
86 impl.setDoubleOrNullMember(doubleOrNullMember); | 86 impl.setDoubleOrNullMember(doubleOrNullMember); |
87 } | 87 } |
88 | 88 |
89 v8::Local<v8::Value> doubleOrStringMemberValue = v8Object->Get(v8String(isol
ate, "doubleOrStringMember")); | 89 v8::Local<v8::Value> doubleOrStringMemberValue = v8Object->Get(v8String(isol
ate, "doubleOrStringMember")); |
90 if (block.HasCaught()) { | 90 if (block.HasCaught()) { |
91 exceptionState.rethrowV8Exception(block.Exception()); | 91 exceptionState.rethrowV8Exception(block.Exception()); |
92 return; | 92 return; |
93 } | 93 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 169 } |
170 | 170 |
171 v8::Local<v8::Value> longMemberValue = v8Object->Get(v8String(isolate, "long
Member")); | 171 v8::Local<v8::Value> longMemberValue = v8Object->Get(v8String(isolate, "long
Member")); |
172 if (block.HasCaught()) { | 172 if (block.HasCaught()) { |
173 exceptionState.rethrowV8Exception(block.Exception()); | 173 exceptionState.rethrowV8Exception(block.Exception()); |
174 return; | 174 return; |
175 } | 175 } |
176 if (longMemberValue.IsEmpty() || longMemberValue->IsUndefined()) { | 176 if (longMemberValue.IsEmpty() || longMemberValue->IsUndefined()) { |
177 // Do nothing. | 177 // Do nothing. |
178 } else { | 178 } else { |
179 int longMember = toInt32(longMemberValue, exceptionState); | 179 int longMember = toInt32(isolate, longMemberValue, exceptionState); |
180 if (exceptionState.hadException()) | 180 if (exceptionState.hadException()) |
181 return; | 181 return; |
182 impl.setLongMember(longMember); | 182 impl.setLongMember(longMember); |
183 } | 183 } |
184 | 184 |
185 v8::Local<v8::Value> objectMemberValue = v8Object->Get(v8String(isolate, "ob
jectMember")); | 185 v8::Local<v8::Value> objectMemberValue = v8Object->Get(v8String(isolate, "ob
jectMember")); |
186 if (block.HasCaught()) { | 186 if (block.HasCaught()) { |
187 exceptionState.rethrowV8Exception(block.Exception()); | 187 exceptionState.rethrowV8Exception(block.Exception()); |
188 return; | 188 return; |
189 } | 189 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 v8::Local<v8::Value> restrictedDoubleMemberValue = v8Object->Get(v8String(is
olate, "restrictedDoubleMember")); | 234 v8::Local<v8::Value> restrictedDoubleMemberValue = v8Object->Get(v8String(is
olate, "restrictedDoubleMember")); |
235 if (block.HasCaught()) { | 235 if (block.HasCaught()) { |
236 exceptionState.rethrowV8Exception(block.Exception()); | 236 exceptionState.rethrowV8Exception(block.Exception()); |
237 return; | 237 return; |
238 } | 238 } |
239 if (restrictedDoubleMemberValue.IsEmpty() || restrictedDoubleMemberValue->Is
Undefined()) { | 239 if (restrictedDoubleMemberValue.IsEmpty() || restrictedDoubleMemberValue->Is
Undefined()) { |
240 // Do nothing. | 240 // Do nothing. |
241 } else { | 241 } else { |
242 double restrictedDoubleMember = toRestrictedDouble(restrictedDoubleMembe
rValue, exceptionState); | 242 double restrictedDoubleMember = toRestrictedDouble(isolate, restrictedDo
ubleMemberValue, exceptionState); |
243 if (exceptionState.hadException()) | 243 if (exceptionState.hadException()) |
244 return; | 244 return; |
245 impl.setRestrictedDoubleMember(restrictedDoubleMember); | 245 impl.setRestrictedDoubleMember(restrictedDoubleMember); |
246 } | 246 } |
247 | 247 |
248 v8::Local<v8::Value> stringArrayMemberValue = v8Object->Get(v8String(isolate
, "stringArrayMember")); | 248 v8::Local<v8::Value> stringArrayMemberValue = v8Object->Get(v8String(isolate
, "stringArrayMember")); |
249 if (block.HasCaught()) { | 249 if (block.HasCaught()) { |
250 exceptionState.rethrowV8Exception(block.Exception()); | 250 exceptionState.rethrowV8Exception(block.Exception()); |
251 return; | 251 return; |
252 } | 252 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 } | 437 } |
438 | 438 |
439 v8::Local<v8::Value> unrestrictedDoubleMemberValue = v8Object->Get(v8String(
isolate, "unrestrictedDoubleMember")); | 439 v8::Local<v8::Value> unrestrictedDoubleMemberValue = v8Object->Get(v8String(
isolate, "unrestrictedDoubleMember")); |
440 if (block.HasCaught()) { | 440 if (block.HasCaught()) { |
441 exceptionState.rethrowV8Exception(block.Exception()); | 441 exceptionState.rethrowV8Exception(block.Exception()); |
442 return; | 442 return; |
443 } | 443 } |
444 if (unrestrictedDoubleMemberValue.IsEmpty() || unrestrictedDoubleMemberValue
->IsUndefined()) { | 444 if (unrestrictedDoubleMemberValue.IsEmpty() || unrestrictedDoubleMemberValue
->IsUndefined()) { |
445 // Do nothing. | 445 // Do nothing. |
446 } else { | 446 } else { |
447 double unrestrictedDoubleMember = toDouble(unrestrictedDoubleMemberValue
, exceptionState); | 447 double unrestrictedDoubleMember = toDouble(isolate, unrestrictedDoubleMe
mberValue, exceptionState); |
448 if (exceptionState.hadException()) | 448 if (exceptionState.hadException()) |
449 return; | 449 return; |
450 impl.setUnrestrictedDoubleMember(unrestrictedDoubleMember); | 450 impl.setUnrestrictedDoubleMember(unrestrictedDoubleMember); |
451 } | 451 } |
452 | 452 |
453 } | 453 } |
454 | 454 |
455 v8::Local<v8::Value> toV8(const TestDictionary& impl, v8::Local<v8::Object> crea
tionContext, v8::Isolate* isolate) | 455 v8::Local<v8::Value> toV8(const TestDictionary& impl, v8::Local<v8::Object> crea
tionContext, v8::Isolate* isolate) |
456 { | 456 { |
457 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); | 457 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 } | 590 } |
591 | 591 |
592 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(const v8::Local<v8
::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState) | 592 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(const v8::Local<v8
::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState) |
593 { | 593 { |
594 TestDictionary impl; | 594 TestDictionary impl; |
595 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); | 595 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); |
596 return impl; | 596 return impl; |
597 } | 597 } |
598 | 598 |
599 } // namespace blink | 599 } // namespace blink |
OLD | NEW |