| 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 TONATIVE_VOID_EXCEPTIONSTATE(double, doubleOrNullMember, toDouble(double
OrNullMemberValue, exceptionState), exceptionState); | 83 double doubleOrNullMember = toDouble(doubleOrNullMemberValue, exceptionS
tate); |
| 84 if (exceptionState.hadException()) |
| 85 return; |
| 84 impl.setDoubleOrNullMember(doubleOrNullMember); | 86 impl.setDoubleOrNullMember(doubleOrNullMember); |
| 85 } | 87 } |
| 86 | 88 |
| 87 v8::Local<v8::Value> doubleOrStringMemberValue = v8Object->Get(v8String(isol
ate, "doubleOrStringMember")); | 89 v8::Local<v8::Value> doubleOrStringMemberValue = v8Object->Get(v8String(isol
ate, "doubleOrStringMember")); |
| 88 if (block.HasCaught()) { | 90 if (block.HasCaught()) { |
| 89 exceptionState.rethrowV8Exception(block.Exception()); | 91 exceptionState.rethrowV8Exception(block.Exception()); |
| 90 return; | 92 return; |
| 91 } | 93 } |
| 92 if (doubleOrStringMemberValue.IsEmpty() || doubleOrStringMemberValue->IsUnde
fined()) { | 94 if (doubleOrStringMemberValue.IsEmpty() || doubleOrStringMemberValue->IsUnde
fined()) { |
| 93 // Do nothing. | 95 // Do nothing. |
| 94 } else { | 96 } else { |
| 95 DoubleOrString doubleOrStringMember; | 97 DoubleOrString doubleOrStringMember; |
| 96 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrString::toImpl(isolat
e, doubleOrStringMemberValue, doubleOrStringMember, exceptionState), exceptionSt
ate); | 98 V8DoubleOrString::toImpl(isolate, doubleOrStringMemberValue, doubleOrStr
ingMember, exceptionState); |
| 99 if (exceptionState.hadException()) |
| 100 return; |
| 97 impl.setDoubleOrStringMember(doubleOrStringMember); | 101 impl.setDoubleOrStringMember(doubleOrStringMember); |
| 98 } | 102 } |
| 99 | 103 |
| 100 v8::Local<v8::Value> elementOrNullMemberValue = v8Object->Get(v8String(isola
te, "elementOrNullMember")); | 104 v8::Local<v8::Value> elementOrNullMemberValue = v8Object->Get(v8String(isola
te, "elementOrNullMember")); |
| 101 if (block.HasCaught()) { | 105 if (block.HasCaught()) { |
| 102 exceptionState.rethrowV8Exception(block.Exception()); | 106 exceptionState.rethrowV8Exception(block.Exception()); |
| 103 return; | 107 return; |
| 104 } | 108 } |
| 105 if (elementOrNullMemberValue.IsEmpty() || elementOrNullMemberValue->IsUndefi
ned()) { | 109 if (elementOrNullMemberValue.IsEmpty() || elementOrNullMemberValue->IsUndefi
ned()) { |
| 106 // Do nothing. | 110 // Do nothing. |
| 107 } else if (elementOrNullMemberValue->IsNull()) { | 111 } else if (elementOrNullMemberValue->IsNull()) { |
| 108 impl.setElementOrNullMemberToNull(); | 112 impl.setElementOrNullMemberToNull(); |
| 109 } else { | 113 } else { |
| 110 Element* elementOrNullMember = V8Element::toImplWithTypeCheck(isolate, e
lementOrNullMemberValue); | 114 Element* elementOrNullMember = V8Element::toImplWithTypeCheck(isolate, e
lementOrNullMemberValue); |
| 111 if (!elementOrNullMember && !elementOrNullMemberValue->IsNull()) { | 115 if (!elementOrNullMember && !elementOrNullMemberValue->IsNull()) { |
| 112 exceptionState.throwTypeError("member elementOrNullMember is not of
type Element."); | 116 exceptionState.throwTypeError("member elementOrNullMember is not of
type Element."); |
| 113 return; | 117 return; |
| 114 } | 118 } |
| 115 impl.setElementOrNullMember(elementOrNullMember); | 119 impl.setElementOrNullMember(elementOrNullMember); |
| 116 } | 120 } |
| 117 | 121 |
| 118 v8::Local<v8::Value> enumMemberValue = v8Object->Get(v8String(isolate, "enum
Member")); | 122 v8::Local<v8::Value> enumMemberValue = v8Object->Get(v8String(isolate, "enum
Member")); |
| 119 if (block.HasCaught()) { | 123 if (block.HasCaught()) { |
| 120 exceptionState.rethrowV8Exception(block.Exception()); | 124 exceptionState.rethrowV8Exception(block.Exception()); |
| 121 return; | 125 return; |
| 122 } | 126 } |
| 123 if (enumMemberValue.IsEmpty() || enumMemberValue->IsUndefined()) { | 127 if (enumMemberValue.IsEmpty() || enumMemberValue->IsUndefined()) { |
| 124 // Do nothing. | 128 // Do nothing. |
| 125 } else { | 129 } else { |
| 126 TOSTRING_VOID(V8StringResource<>, enumMember, enumMemberValue); | 130 V8StringResource<> enumMember = enumMemberValue; |
| 131 if (!enumMember.prepare(exceptionState)) |
| 132 return; |
| 127 String string = enumMember; | 133 String string = enumMember; |
| 128 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { | 134 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { |
| 129 exceptionState.throwTypeError("member enumMember ('" + string + "')
is not a valid enum value."); | 135 exceptionState.throwTypeError("member enumMember ('" + string + "')
is not a valid enum value."); |
| 130 return; | 136 return; |
| 131 } | 137 } |
| 132 impl.setEnumMember(enumMember); | 138 impl.setEnumMember(enumMember); |
| 133 } | 139 } |
| 134 | 140 |
| 135 v8::Local<v8::Value> eventTargetMemberValue = v8Object->Get(v8String(isolate
, "eventTargetMember")); | 141 v8::Local<v8::Value> eventTargetMemberValue = v8Object->Get(v8String(isolate
, "eventTargetMember")); |
| 136 if (block.HasCaught()) { | 142 if (block.HasCaught()) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 149 } | 155 } |
| 150 | 156 |
| 151 v8::Local<v8::Value> internalDictionarySequenceMemberValue = v8Object->Get(v
8String(isolate, "internalDictionarySequenceMember")); | 157 v8::Local<v8::Value> internalDictionarySequenceMemberValue = v8Object->Get(v
8String(isolate, "internalDictionarySequenceMember")); |
| 152 if (block.HasCaught()) { | 158 if (block.HasCaught()) { |
| 153 exceptionState.rethrowV8Exception(block.Exception()); | 159 exceptionState.rethrowV8Exception(block.Exception()); |
| 154 return; | 160 return; |
| 155 } | 161 } |
| 156 if (internalDictionarySequenceMemberValue.IsEmpty() || internalDictionarySeq
uenceMemberValue->IsUndefined()) { | 162 if (internalDictionarySequenceMemberValue.IsEmpty() || internalDictionarySeq
uenceMemberValue->IsUndefined()) { |
| 157 // Do nothing. | 163 // Do nothing. |
| 158 } else { | 164 } else { |
| 159 TONATIVE_VOID_EXCEPTIONSTATE(Vector<InternalDictionary>, internalDiction
arySequenceMember, toImplArray<InternalDictionary>(internalDictionarySequenceMem
berValue, 0, isolate, exceptionState), exceptionState); | 165 Vector<InternalDictionary> internalDictionarySequenceMember = toImplArra
y<InternalDictionary>(internalDictionarySequenceMemberValue, 0, isolate, excepti
onState); |
| 166 if (exceptionState.hadException()) |
| 167 return; |
| 160 impl.setInternalDictionarySequenceMember(internalDictionarySequenceMembe
r); | 168 impl.setInternalDictionarySequenceMember(internalDictionarySequenceMembe
r); |
| 161 } | 169 } |
| 162 | 170 |
| 163 v8::Local<v8::Value> longMemberValue = v8Object->Get(v8String(isolate, "long
Member")); | 171 v8::Local<v8::Value> longMemberValue = v8Object->Get(v8String(isolate, "long
Member")); |
| 164 if (block.HasCaught()) { | 172 if (block.HasCaught()) { |
| 165 exceptionState.rethrowV8Exception(block.Exception()); | 173 exceptionState.rethrowV8Exception(block.Exception()); |
| 166 return; | 174 return; |
| 167 } | 175 } |
| 168 if (longMemberValue.IsEmpty() || longMemberValue->IsUndefined()) { | 176 if (longMemberValue.IsEmpty() || longMemberValue->IsUndefined()) { |
| 169 // Do nothing. | 177 // Do nothing. |
| 170 } else { | 178 } else { |
| 171 TONATIVE_VOID_EXCEPTIONSTATE(int, longMember, toInt32(longMemberValue, e
xceptionState), exceptionState); | 179 int longMember = toInt32(longMemberValue, exceptionState); |
| 180 if (exceptionState.hadException()) |
| 181 return; |
| 172 impl.setLongMember(longMember); | 182 impl.setLongMember(longMember); |
| 173 } | 183 } |
| 174 | 184 |
| 175 v8::Local<v8::Value> objectMemberValue = v8Object->Get(v8String(isolate, "ob
jectMember")); | 185 v8::Local<v8::Value> objectMemberValue = v8Object->Get(v8String(isolate, "ob
jectMember")); |
| 176 if (block.HasCaught()) { | 186 if (block.HasCaught()) { |
| 177 exceptionState.rethrowV8Exception(block.Exception()); | 187 exceptionState.rethrowV8Exception(block.Exception()); |
| 178 return; | 188 return; |
| 179 } | 189 } |
| 180 if (objectMemberValue.IsEmpty() || objectMemberValue->IsUndefined()) { | 190 if (objectMemberValue.IsEmpty() || objectMemberValue->IsUndefined()) { |
| 181 // Do nothing. | 191 // Do nothing. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 208 | 218 |
| 209 v8::Local<v8::Value> otherDoubleOrStringMemberValue = v8Object->Get(v8String
(isolate, "otherDoubleOrStringMember")); | 219 v8::Local<v8::Value> otherDoubleOrStringMemberValue = v8Object->Get(v8String
(isolate, "otherDoubleOrStringMember")); |
| 210 if (block.HasCaught()) { | 220 if (block.HasCaught()) { |
| 211 exceptionState.rethrowV8Exception(block.Exception()); | 221 exceptionState.rethrowV8Exception(block.Exception()); |
| 212 return; | 222 return; |
| 213 } | 223 } |
| 214 if (otherDoubleOrStringMemberValue.IsEmpty() || otherDoubleOrStringMemberVal
ue->IsUndefined()) { | 224 if (otherDoubleOrStringMemberValue.IsEmpty() || otherDoubleOrStringMemberVal
ue->IsUndefined()) { |
| 215 // Do nothing. | 225 // Do nothing. |
| 216 } else { | 226 } else { |
| 217 DoubleOrString otherDoubleOrStringMember; | 227 DoubleOrString otherDoubleOrStringMember; |
| 218 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrString::toImpl(isolat
e, otherDoubleOrStringMemberValue, otherDoubleOrStringMember, exceptionState), e
xceptionState); | 228 V8DoubleOrString::toImpl(isolate, otherDoubleOrStringMemberValue, otherD
oubleOrStringMember, exceptionState); |
| 229 if (exceptionState.hadException()) |
| 230 return; |
| 219 impl.setOtherDoubleOrStringMember(otherDoubleOrStringMember); | 231 impl.setOtherDoubleOrStringMember(otherDoubleOrStringMember); |
| 220 } | 232 } |
| 221 | 233 |
| 222 v8::Local<v8::Value> restrictedDoubleMemberValue = v8Object->Get(v8String(is
olate, "restrictedDoubleMember")); | 234 v8::Local<v8::Value> restrictedDoubleMemberValue = v8Object->Get(v8String(is
olate, "restrictedDoubleMember")); |
| 223 if (block.HasCaught()) { | 235 if (block.HasCaught()) { |
| 224 exceptionState.rethrowV8Exception(block.Exception()); | 236 exceptionState.rethrowV8Exception(block.Exception()); |
| 225 return; | 237 return; |
| 226 } | 238 } |
| 227 if (restrictedDoubleMemberValue.IsEmpty() || restrictedDoubleMemberValue->Is
Undefined()) { | 239 if (restrictedDoubleMemberValue.IsEmpty() || restrictedDoubleMemberValue->Is
Undefined()) { |
| 228 // Do nothing. | 240 // Do nothing. |
| 229 } else { | 241 } else { |
| 230 TONATIVE_VOID_EXCEPTIONSTATE(double, restrictedDoubleMember, toRestricte
dDouble(restrictedDoubleMemberValue, exceptionState), exceptionState); | 242 double restrictedDoubleMember = toRestrictedDouble(restrictedDoubleMembe
rValue, exceptionState); |
| 243 if (exceptionState.hadException()) |
| 244 return; |
| 231 impl.setRestrictedDoubleMember(restrictedDoubleMember); | 245 impl.setRestrictedDoubleMember(restrictedDoubleMember); |
| 232 } | 246 } |
| 233 | 247 |
| 234 v8::Local<v8::Value> stringArrayMemberValue = v8Object->Get(v8String(isolate
, "stringArrayMember")); | 248 v8::Local<v8::Value> stringArrayMemberValue = v8Object->Get(v8String(isolate
, "stringArrayMember")); |
| 235 if (block.HasCaught()) { | 249 if (block.HasCaught()) { |
| 236 exceptionState.rethrowV8Exception(block.Exception()); | 250 exceptionState.rethrowV8Exception(block.Exception()); |
| 237 return; | 251 return; |
| 238 } | 252 } |
| 239 if (stringArrayMemberValue.IsEmpty() || stringArrayMemberValue->IsUndefined(
)) { | 253 if (stringArrayMemberValue.IsEmpty() || stringArrayMemberValue->IsUndefined(
)) { |
| 240 // Do nothing. | 254 // Do nothing. |
| 241 } else { | 255 } else { |
| 242 TONATIVE_VOID_EXCEPTIONSTATE(Vector<String>, stringArrayMember, toImplAr
ray<String>(stringArrayMemberValue, 0, isolate, exceptionState), exceptionState)
; | 256 Vector<String> stringArrayMember = toImplArray<String>(stringArrayMember
Value, 0, isolate, exceptionState); |
| 257 if (exceptionState.hadException()) |
| 258 return; |
| 243 impl.setStringArrayMember(stringArrayMember); | 259 impl.setStringArrayMember(stringArrayMember); |
| 244 } | 260 } |
| 245 | 261 |
| 246 v8::Local<v8::Value> stringMemberValue = v8Object->Get(v8String(isolate, "st
ringMember")); | 262 v8::Local<v8::Value> stringMemberValue = v8Object->Get(v8String(isolate, "st
ringMember")); |
| 247 if (block.HasCaught()) { | 263 if (block.HasCaught()) { |
| 248 exceptionState.rethrowV8Exception(block.Exception()); | 264 exceptionState.rethrowV8Exception(block.Exception()); |
| 249 return; | 265 return; |
| 250 } | 266 } |
| 251 if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) { | 267 if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) { |
| 252 // Do nothing. | 268 // Do nothing. |
| 253 } else { | 269 } else { |
| 254 TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue); | 270 V8StringResource<> stringMember = stringMemberValue; |
| 271 if (!stringMember.prepare(exceptionState)) |
| 272 return; |
| 255 impl.setStringMember(stringMember); | 273 impl.setStringMember(stringMember); |
| 256 } | 274 } |
| 257 | 275 |
| 258 v8::Local<v8::Value> stringOrNullMemberValue = v8Object->Get(v8String(isolat
e, "stringOrNullMember")); | 276 v8::Local<v8::Value> stringOrNullMemberValue = v8Object->Get(v8String(isolat
e, "stringOrNullMember")); |
| 259 if (block.HasCaught()) { | 277 if (block.HasCaught()) { |
| 260 exceptionState.rethrowV8Exception(block.Exception()); | 278 exceptionState.rethrowV8Exception(block.Exception()); |
| 261 return; | 279 return; |
| 262 } | 280 } |
| 263 if (stringOrNullMemberValue.IsEmpty() || stringOrNullMemberValue->IsUndefine
d()) { | 281 if (stringOrNullMemberValue.IsEmpty() || stringOrNullMemberValue->IsUndefine
d()) { |
| 264 // Do nothing. | 282 // Do nothing. |
| 265 } else if (stringOrNullMemberValue->IsNull()) { | 283 } else if (stringOrNullMemberValue->IsNull()) { |
| 266 impl.setStringOrNullMemberToNull(); | 284 impl.setStringOrNullMemberToNull(); |
| 267 } else { | 285 } else { |
| 268 TOSTRING_VOID(V8StringResource<>, stringOrNullMember, stringOrNullMember
Value); | 286 V8StringResource<> stringOrNullMember = stringOrNullMemberValue; |
| 287 if (!stringOrNullMember.prepare(exceptionState)) |
| 288 return; |
| 269 impl.setStringOrNullMember(stringOrNullMember); | 289 impl.setStringOrNullMember(stringOrNullMember); |
| 270 } | 290 } |
| 271 | 291 |
| 272 v8::Local<v8::Value> stringSequenceMemberValue = v8Object->Get(v8String(isol
ate, "stringSequenceMember")); | 292 v8::Local<v8::Value> stringSequenceMemberValue = v8Object->Get(v8String(isol
ate, "stringSequenceMember")); |
| 273 if (block.HasCaught()) { | 293 if (block.HasCaught()) { |
| 274 exceptionState.rethrowV8Exception(block.Exception()); | 294 exceptionState.rethrowV8Exception(block.Exception()); |
| 275 return; | 295 return; |
| 276 } | 296 } |
| 277 if (stringSequenceMemberValue.IsEmpty() || stringSequenceMemberValue->IsUnde
fined()) { | 297 if (stringSequenceMemberValue.IsEmpty() || stringSequenceMemberValue->IsUnde
fined()) { |
| 278 // Do nothing. | 298 // Do nothing. |
| 279 } else { | 299 } else { |
| 280 TONATIVE_VOID_EXCEPTIONSTATE(Vector<String>, stringSequenceMember, toImp
lArray<String>(stringSequenceMemberValue, 0, isolate, exceptionState), exception
State); | 300 Vector<String> stringSequenceMember = toImplArray<String>(stringSequence
MemberValue, 0, isolate, exceptionState); |
| 301 if (exceptionState.hadException()) |
| 302 return; |
| 281 impl.setStringSequenceMember(stringSequenceMember); | 303 impl.setStringSequenceMember(stringSequenceMember); |
| 282 } | 304 } |
| 283 | 305 |
| 284 v8::Local<v8::Value> testInterface2OrUint8ArrayMemberValue = v8Object->Get(v
8String(isolate, "testInterface2OrUint8ArrayMember")); | 306 v8::Local<v8::Value> testInterface2OrUint8ArrayMemberValue = v8Object->Get(v
8String(isolate, "testInterface2OrUint8ArrayMember")); |
| 285 if (block.HasCaught()) { | 307 if (block.HasCaught()) { |
| 286 exceptionState.rethrowV8Exception(block.Exception()); | 308 exceptionState.rethrowV8Exception(block.Exception()); |
| 287 return; | 309 return; |
| 288 } | 310 } |
| 289 if (testInterface2OrUint8ArrayMemberValue.IsEmpty() || testInterface2OrUint8
ArrayMemberValue->IsUndefined()) { | 311 if (testInterface2OrUint8ArrayMemberValue.IsEmpty() || testInterface2OrUint8
ArrayMemberValue->IsUndefined()) { |
| 290 // Do nothing. | 312 // Do nothing. |
| 291 } else { | 313 } else { |
| 292 TestInterface2OrUint8Array testInterface2OrUint8ArrayMember; | 314 TestInterface2OrUint8Array testInterface2OrUint8ArrayMember; |
| 293 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8TestInterface2OrUint8Array::t
oImpl(isolate, testInterface2OrUint8ArrayMemberValue, testInterface2OrUint8Array
Member, exceptionState), exceptionState); | 315 V8TestInterface2OrUint8Array::toImpl(isolate, testInterface2OrUint8Array
MemberValue, testInterface2OrUint8ArrayMember, exceptionState); |
| 316 if (exceptionState.hadException()) |
| 317 return; |
| 294 impl.setTestInterface2OrUint8ArrayMember(testInterface2OrUint8ArrayMembe
r); | 318 impl.setTestInterface2OrUint8ArrayMember(testInterface2OrUint8ArrayMembe
r); |
| 295 } | 319 } |
| 296 | 320 |
| 297 v8::Local<v8::Value> testInterfaceGarbageCollectedMemberValue = v8Object->Ge
t(v8String(isolate, "testInterfaceGarbageCollectedMember")); | 321 v8::Local<v8::Value> testInterfaceGarbageCollectedMemberValue = v8Object->Ge
t(v8String(isolate, "testInterfaceGarbageCollectedMember")); |
| 298 if (block.HasCaught()) { | 322 if (block.HasCaught()) { |
| 299 exceptionState.rethrowV8Exception(block.Exception()); | 323 exceptionState.rethrowV8Exception(block.Exception()); |
| 300 return; | 324 return; |
| 301 } | 325 } |
| 302 if (testInterfaceGarbageCollectedMemberValue.IsEmpty() || testInterfaceGarba
geCollectedMemberValue->IsUndefined()) { | 326 if (testInterfaceGarbageCollectedMemberValue.IsEmpty() || testInterfaceGarba
geCollectedMemberValue->IsUndefined()) { |
| 303 // Do nothing. | 327 // Do nothing. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 437 } |
| 414 | 438 |
| 415 v8::Local<v8::Value> unrestrictedDoubleMemberValue = v8Object->Get(v8String(
isolate, "unrestrictedDoubleMember")); | 439 v8::Local<v8::Value> unrestrictedDoubleMemberValue = v8Object->Get(v8String(
isolate, "unrestrictedDoubleMember")); |
| 416 if (block.HasCaught()) { | 440 if (block.HasCaught()) { |
| 417 exceptionState.rethrowV8Exception(block.Exception()); | 441 exceptionState.rethrowV8Exception(block.Exception()); |
| 418 return; | 442 return; |
| 419 } | 443 } |
| 420 if (unrestrictedDoubleMemberValue.IsEmpty() || unrestrictedDoubleMemberValue
->IsUndefined()) { | 444 if (unrestrictedDoubleMemberValue.IsEmpty() || unrestrictedDoubleMemberValue
->IsUndefined()) { |
| 421 // Do nothing. | 445 // Do nothing. |
| 422 } else { | 446 } else { |
| 423 TONATIVE_VOID_EXCEPTIONSTATE(double, unrestrictedDoubleMember, toDouble(
unrestrictedDoubleMemberValue, exceptionState), exceptionState); | 447 double unrestrictedDoubleMember = toDouble(unrestrictedDoubleMemberValue
, exceptionState); |
| 448 if (exceptionState.hadException()) |
| 449 return; |
| 424 impl.setUnrestrictedDoubleMember(unrestrictedDoubleMember); | 450 impl.setUnrestrictedDoubleMember(unrestrictedDoubleMember); |
| 425 } | 451 } |
| 426 | 452 |
| 427 } | 453 } |
| 428 | 454 |
| 429 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) |
| 430 { | 456 { |
| 431 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); | 457 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); |
| 432 toV8TestDictionary(impl, v8Object, creationContext, isolate); | 458 toV8TestDictionary(impl, v8Object, creationContext, isolate); |
| 433 return v8Object; | 459 return v8Object; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 } | 590 } |
| 565 | 591 |
| 566 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) |
| 567 { | 593 { |
| 568 TestDictionary impl; | 594 TestDictionary impl; |
| 569 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); | 595 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); |
| 570 return impl; | 596 return impl; |
| 571 } | 597 } |
| 572 | 598 |
| 573 } // namespace blink | 599 } // namespace blink |
| OLD | NEW |