| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 return m_arrayBuffer; | 42 return m_arrayBuffer; |
| 43 } | 43 } |
| 44 | 44 |
| 45 void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBuffer(PassRefPtr<TestArr
ayBuffer> value) | 45 void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBuffer(PassRefPtr<TestArr
ayBuffer> value) |
| 46 { | 46 { |
| 47 ASSERT(isNull()); | 47 ASSERT(isNull()); |
| 48 m_arrayBuffer = value; | 48 m_arrayBuffer = value; |
| 49 m_type = SpecificTypeArrayBuffer; | 49 m_type = SpecificTypeArrayBuffer; |
| 50 } | 50 } |
| 51 | 51 |
| 52 ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionar
y::fromArrayBuffer(PassRefPtr<TestArrayBuffer> value) |
| 53 { |
| 54 ArrayBufferOrArrayBufferViewOrDictionary container; |
| 55 container.setArrayBuffer(value); |
| 56 return container; |
| 57 } |
| 58 |
| 52 PassRefPtr<TestArrayBufferView> ArrayBufferOrArrayBufferViewOrDictionary::getAsA
rrayBufferView() const | 59 PassRefPtr<TestArrayBufferView> ArrayBufferOrArrayBufferViewOrDictionary::getAsA
rrayBufferView() const |
| 53 { | 60 { |
| 54 ASSERT(isArrayBufferView()); | 61 ASSERT(isArrayBufferView()); |
| 55 return m_arrayBufferView; | 62 return m_arrayBufferView; |
| 56 } | 63 } |
| 57 | 64 |
| 58 void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBufferView(PassRefPtr<Tes
tArrayBufferView> value) | 65 void ArrayBufferOrArrayBufferViewOrDictionary::setArrayBufferView(PassRefPtr<Tes
tArrayBufferView> value) |
| 59 { | 66 { |
| 60 ASSERT(isNull()); | 67 ASSERT(isNull()); |
| 61 m_arrayBufferView = value; | 68 m_arrayBufferView = value; |
| 62 m_type = SpecificTypeArrayBufferView; | 69 m_type = SpecificTypeArrayBufferView; |
| 63 } | 70 } |
| 64 | 71 |
| 72 ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionar
y::fromArrayBufferView(PassRefPtr<TestArrayBufferView> value) |
| 73 { |
| 74 ArrayBufferOrArrayBufferViewOrDictionary container; |
| 75 container.setArrayBufferView(value); |
| 76 return container; |
| 77 } |
| 78 |
| 65 Dictionary ArrayBufferOrArrayBufferViewOrDictionary::getAsDictionary() const | 79 Dictionary ArrayBufferOrArrayBufferViewOrDictionary::getAsDictionary() const |
| 66 { | 80 { |
| 67 ASSERT(isDictionary()); | 81 ASSERT(isDictionary()); |
| 68 return m_dictionary; | 82 return m_dictionary; |
| 69 } | 83 } |
| 70 | 84 |
| 71 void ArrayBufferOrArrayBufferViewOrDictionary::setDictionary(Dictionary value) | 85 void ArrayBufferOrArrayBufferViewOrDictionary::setDictionary(Dictionary value) |
| 72 { | 86 { |
| 73 ASSERT(isNull()); | 87 ASSERT(isNull()); |
| 74 m_dictionary = value; | 88 m_dictionary = value; |
| 75 m_type = SpecificTypeDictionary; | 89 m_type = SpecificTypeDictionary; |
| 76 } | 90 } |
| 77 | 91 |
| 92 ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionar
y::fromDictionary(Dictionary value) |
| 93 { |
| 94 ArrayBufferOrArrayBufferViewOrDictionary container; |
| 95 container.setDictionary(value); |
| 96 return container; |
| 97 } |
| 98 |
| 78 void V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(v8::Isolate* isolate, v8
::Local<v8::Value> v8Value, ArrayBufferOrArrayBufferViewOrDictionary& impl, Exce
ptionState& exceptionState) | 99 void V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(v8::Isolate* isolate, v8
::Local<v8::Value> v8Value, ArrayBufferOrArrayBufferViewOrDictionary& impl, Exce
ptionState& exceptionState) |
| 79 { | 100 { |
| 80 if (v8Value.IsEmpty()) | 101 if (v8Value.IsEmpty()) |
| 81 return; | 102 return; |
| 82 | 103 |
| 83 if (V8ArrayBuffer::hasInstance(v8Value, isolate)) { | 104 if (V8ArrayBuffer::hasInstance(v8Value, isolate)) { |
| 84 RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::O
bject>::Cast(v8Value)); | 105 RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::O
bject>::Cast(v8Value)); |
| 85 impl.setArrayBuffer(cppValue); | 106 impl.setArrayBuffer(cppValue); |
| 86 return; | 107 return; |
| 87 } | 108 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 return m_boolean; | 157 return m_boolean; |
| 137 } | 158 } |
| 138 | 159 |
| 139 void BooleanOrStringOrUnrestrictedDouble::setBoolean(bool value) | 160 void BooleanOrStringOrUnrestrictedDouble::setBoolean(bool value) |
| 140 { | 161 { |
| 141 ASSERT(isNull()); | 162 ASSERT(isNull()); |
| 142 m_boolean = value; | 163 m_boolean = value; |
| 143 m_type = SpecificTypeBoolean; | 164 m_type = SpecificTypeBoolean; |
| 144 } | 165 } |
| 145 | 166 |
| 167 BooleanOrStringOrUnrestrictedDouble BooleanOrStringOrUnrestrictedDouble::fromBoo
lean(bool value) |
| 168 { |
| 169 BooleanOrStringOrUnrestrictedDouble container; |
| 170 container.setBoolean(value); |
| 171 return container; |
| 172 } |
| 173 |
| 146 String BooleanOrStringOrUnrestrictedDouble::getAsString() const | 174 String BooleanOrStringOrUnrestrictedDouble::getAsString() const |
| 147 { | 175 { |
| 148 ASSERT(isString()); | 176 ASSERT(isString()); |
| 149 return m_string; | 177 return m_string; |
| 150 } | 178 } |
| 151 | 179 |
| 152 void BooleanOrStringOrUnrestrictedDouble::setString(String value) | 180 void BooleanOrStringOrUnrestrictedDouble::setString(String value) |
| 153 { | 181 { |
| 154 ASSERT(isNull()); | 182 ASSERT(isNull()); |
| 155 m_string = value; | 183 m_string = value; |
| 156 m_type = SpecificTypeString; | 184 m_type = SpecificTypeString; |
| 157 } | 185 } |
| 158 | 186 |
| 187 BooleanOrStringOrUnrestrictedDouble BooleanOrStringOrUnrestrictedDouble::fromStr
ing(String value) |
| 188 { |
| 189 BooleanOrStringOrUnrestrictedDouble container; |
| 190 container.setString(value); |
| 191 return container; |
| 192 } |
| 193 |
| 159 double BooleanOrStringOrUnrestrictedDouble::getAsUnrestrictedDouble() const | 194 double BooleanOrStringOrUnrestrictedDouble::getAsUnrestrictedDouble() const |
| 160 { | 195 { |
| 161 ASSERT(isUnrestrictedDouble()); | 196 ASSERT(isUnrestrictedDouble()); |
| 162 return m_unrestrictedDouble; | 197 return m_unrestrictedDouble; |
| 163 } | 198 } |
| 164 | 199 |
| 165 void BooleanOrStringOrUnrestrictedDouble::setUnrestrictedDouble(double value) | 200 void BooleanOrStringOrUnrestrictedDouble::setUnrestrictedDouble(double value) |
| 166 { | 201 { |
| 167 ASSERT(isNull()); | 202 ASSERT(isNull()); |
| 168 m_unrestrictedDouble = value; | 203 m_unrestrictedDouble = value; |
| 169 m_type = SpecificTypeUnrestrictedDouble; | 204 m_type = SpecificTypeUnrestrictedDouble; |
| 170 } | 205 } |
| 171 | 206 |
| 207 BooleanOrStringOrUnrestrictedDouble BooleanOrStringOrUnrestrictedDouble::fromUnr
estrictedDouble(double value) |
| 208 { |
| 209 BooleanOrStringOrUnrestrictedDouble container; |
| 210 container.setUnrestrictedDouble(value); |
| 211 return container; |
| 212 } |
| 213 |
| 172 void V8BooleanOrStringOrUnrestrictedDouble::toImpl(v8::Isolate* isolate, v8::Loc
al<v8::Value> v8Value, BooleanOrStringOrUnrestrictedDouble& impl, ExceptionState
& exceptionState) | 214 void V8BooleanOrStringOrUnrestrictedDouble::toImpl(v8::Isolate* isolate, v8::Loc
al<v8::Value> v8Value, BooleanOrStringOrUnrestrictedDouble& impl, ExceptionState
& exceptionState) |
| 173 { | 215 { |
| 174 if (v8Value.IsEmpty()) | 216 if (v8Value.IsEmpty()) |
| 175 return; | 217 return; |
| 176 | 218 |
| 177 if (v8Value->IsBoolean()) { | 219 if (v8Value->IsBoolean()) { |
| 178 impl.setBoolean(v8Value->ToBoolean()->Value()); | 220 impl.setBoolean(v8Value->ToBoolean()->Value()); |
| 179 return; | 221 return; |
| 180 } | 222 } |
| 181 | 223 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 return m_double; | 270 return m_double; |
| 229 } | 271 } |
| 230 | 272 |
| 231 void DoubleOrString::setDouble(double value) | 273 void DoubleOrString::setDouble(double value) |
| 232 { | 274 { |
| 233 ASSERT(isNull()); | 275 ASSERT(isNull()); |
| 234 m_double = value; | 276 m_double = value; |
| 235 m_type = SpecificTypeDouble; | 277 m_type = SpecificTypeDouble; |
| 236 } | 278 } |
| 237 | 279 |
| 280 DoubleOrString DoubleOrString::fromDouble(double value) |
| 281 { |
| 282 DoubleOrString container; |
| 283 container.setDouble(value); |
| 284 return container; |
| 285 } |
| 286 |
| 238 String DoubleOrString::getAsString() const | 287 String DoubleOrString::getAsString() const |
| 239 { | 288 { |
| 240 ASSERT(isString()); | 289 ASSERT(isString()); |
| 241 return m_string; | 290 return m_string; |
| 242 } | 291 } |
| 243 | 292 |
| 244 void DoubleOrString::setString(String value) | 293 void DoubleOrString::setString(String value) |
| 245 { | 294 { |
| 246 ASSERT(isNull()); | 295 ASSERT(isNull()); |
| 247 m_string = value; | 296 m_string = value; |
| 248 m_type = SpecificTypeString; | 297 m_type = SpecificTypeString; |
| 249 } | 298 } |
| 250 | 299 |
| 300 DoubleOrString DoubleOrString::fromString(String value) |
| 301 { |
| 302 DoubleOrString container; |
| 303 container.setString(value); |
| 304 return container; |
| 305 } |
| 306 |
| 251 void V8DoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, DoubleOrString& impl, ExceptionState& exceptionState) | 307 void V8DoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, DoubleOrString& impl, ExceptionState& exceptionState) |
| 252 { | 308 { |
| 253 if (v8Value.IsEmpty()) | 309 if (v8Value.IsEmpty()) |
| 254 return; | 310 return; |
| 255 | 311 |
| 256 if (v8Value->IsNumber()) { | 312 if (v8Value->IsNumber()) { |
| 257 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Valu
e, exceptionState), exceptionState); | 313 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Valu
e, exceptionState), exceptionState); |
| 258 impl.setDouble(cppValue); | 314 impl.setDouble(cppValue); |
| 259 return; | 315 return; |
| 260 } | 316 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 return m_node; | 356 return m_node; |
| 301 } | 357 } |
| 302 | 358 |
| 303 void NodeOrNodeList::setNode(PassRefPtrWillBeRawPtr<Node> value) | 359 void NodeOrNodeList::setNode(PassRefPtrWillBeRawPtr<Node> value) |
| 304 { | 360 { |
| 305 ASSERT(isNull()); | 361 ASSERT(isNull()); |
| 306 m_node = value; | 362 m_node = value; |
| 307 m_type = SpecificTypeNode; | 363 m_type = SpecificTypeNode; |
| 308 } | 364 } |
| 309 | 365 |
| 366 NodeOrNodeList NodeOrNodeList::fromNode(PassRefPtrWillBeRawPtr<Node> value) |
| 367 { |
| 368 NodeOrNodeList container; |
| 369 container.setNode(value); |
| 370 return container; |
| 371 } |
| 372 |
| 310 PassRefPtrWillBeRawPtr<NodeList> NodeOrNodeList::getAsNodeList() const | 373 PassRefPtrWillBeRawPtr<NodeList> NodeOrNodeList::getAsNodeList() const |
| 311 { | 374 { |
| 312 ASSERT(isNodeList()); | 375 ASSERT(isNodeList()); |
| 313 return m_nodeList; | 376 return m_nodeList; |
| 314 } | 377 } |
| 315 | 378 |
| 316 void NodeOrNodeList::setNodeList(PassRefPtrWillBeRawPtr<NodeList> value) | 379 void NodeOrNodeList::setNodeList(PassRefPtrWillBeRawPtr<NodeList> value) |
| 317 { | 380 { |
| 318 ASSERT(isNull()); | 381 ASSERT(isNull()); |
| 319 m_nodeList = value; | 382 m_nodeList = value; |
| 320 m_type = SpecificTypeNodeList; | 383 m_type = SpecificTypeNodeList; |
| 321 } | 384 } |
| 322 | 385 |
| 386 NodeOrNodeList NodeOrNodeList::fromNodeList(PassRefPtrWillBeRawPtr<NodeList> val
ue) |
| 387 { |
| 388 NodeOrNodeList container; |
| 389 container.setNodeList(value); |
| 390 return container; |
| 391 } |
| 392 |
| 323 void NodeOrNodeList::trace(Visitor* visitor) | 393 void NodeOrNodeList::trace(Visitor* visitor) |
| 324 { | 394 { |
| 325 visitor->trace(m_node); | 395 visitor->trace(m_node); |
| 326 visitor->trace(m_nodeList); | 396 visitor->trace(m_nodeList); |
| 327 } | 397 } |
| 328 | 398 |
| 329 void V8NodeOrNodeList::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, NodeOrNodeList& impl, ExceptionState& exceptionState) | 399 void V8NodeOrNodeList::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, NodeOrNodeList& impl, ExceptionState& exceptionState) |
| 330 { | 400 { |
| 331 if (v8Value.IsEmpty()) | 401 if (v8Value.IsEmpty()) |
| 332 return; | 402 return; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 return m_string; | 449 return m_string; |
| 380 } | 450 } |
| 381 | 451 |
| 382 void StringOrArrayBufferOrArrayBufferView::setString(String value) | 452 void StringOrArrayBufferOrArrayBufferView::setString(String value) |
| 383 { | 453 { |
| 384 ASSERT(isNull()); | 454 ASSERT(isNull()); |
| 385 m_string = value; | 455 m_string = value; |
| 386 m_type = SpecificTypeString; | 456 m_type = SpecificTypeString; |
| 387 } | 457 } |
| 388 | 458 |
| 459 StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromS
tring(String value) |
| 460 { |
| 461 StringOrArrayBufferOrArrayBufferView container; |
| 462 container.setString(value); |
| 463 return container; |
| 464 } |
| 465 |
| 389 PassRefPtr<TestArrayBuffer> StringOrArrayBufferOrArrayBufferView::getAsArrayBuff
er() const | 466 PassRefPtr<TestArrayBuffer> StringOrArrayBufferOrArrayBufferView::getAsArrayBuff
er() const |
| 390 { | 467 { |
| 391 ASSERT(isArrayBuffer()); | 468 ASSERT(isArrayBuffer()); |
| 392 return m_arrayBuffer; | 469 return m_arrayBuffer; |
| 393 } | 470 } |
| 394 | 471 |
| 395 void StringOrArrayBufferOrArrayBufferView::setArrayBuffer(PassRefPtr<TestArrayBu
ffer> value) | 472 void StringOrArrayBufferOrArrayBufferView::setArrayBuffer(PassRefPtr<TestArrayBu
ffer> value) |
| 396 { | 473 { |
| 397 ASSERT(isNull()); | 474 ASSERT(isNull()); |
| 398 m_arrayBuffer = value; | 475 m_arrayBuffer = value; |
| 399 m_type = SpecificTypeArrayBuffer; | 476 m_type = SpecificTypeArrayBuffer; |
| 400 } | 477 } |
| 401 | 478 |
| 479 StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromA
rrayBuffer(PassRefPtr<TestArrayBuffer> value) |
| 480 { |
| 481 StringOrArrayBufferOrArrayBufferView container; |
| 482 container.setArrayBuffer(value); |
| 483 return container; |
| 484 } |
| 485 |
| 402 PassRefPtr<TestArrayBufferView> StringOrArrayBufferOrArrayBufferView::getAsArray
BufferView() const | 486 PassRefPtr<TestArrayBufferView> StringOrArrayBufferOrArrayBufferView::getAsArray
BufferView() const |
| 403 { | 487 { |
| 404 ASSERT(isArrayBufferView()); | 488 ASSERT(isArrayBufferView()); |
| 405 return m_arrayBufferView; | 489 return m_arrayBufferView; |
| 406 } | 490 } |
| 407 | 491 |
| 408 void StringOrArrayBufferOrArrayBufferView::setArrayBufferView(PassRefPtr<TestArr
ayBufferView> value) | 492 void StringOrArrayBufferOrArrayBufferView::setArrayBufferView(PassRefPtr<TestArr
ayBufferView> value) |
| 409 { | 493 { |
| 410 ASSERT(isNull()); | 494 ASSERT(isNull()); |
| 411 m_arrayBufferView = value; | 495 m_arrayBufferView = value; |
| 412 m_type = SpecificTypeArrayBufferView; | 496 m_type = SpecificTypeArrayBufferView; |
| 413 } | 497 } |
| 414 | 498 |
| 499 StringOrArrayBufferOrArrayBufferView StringOrArrayBufferOrArrayBufferView::fromA
rrayBufferView(PassRefPtr<TestArrayBufferView> value) |
| 500 { |
| 501 StringOrArrayBufferOrArrayBufferView container; |
| 502 container.setArrayBufferView(value); |
| 503 return container; |
| 504 } |
| 505 |
| 415 void V8StringOrArrayBufferOrArrayBufferView::toImpl(v8::Isolate* isolate, v8::Lo
cal<v8::Value> v8Value, StringOrArrayBufferOrArrayBufferView& impl, ExceptionSta
te& exceptionState) | 506 void V8StringOrArrayBufferOrArrayBufferView::toImpl(v8::Isolate* isolate, v8::Lo
cal<v8::Value> v8Value, StringOrArrayBufferOrArrayBufferView& impl, ExceptionSta
te& exceptionState) |
| 416 { | 507 { |
| 417 if (v8Value.IsEmpty()) | 508 if (v8Value.IsEmpty()) |
| 418 return; | 509 return; |
| 419 | 510 |
| 420 if (V8ArrayBuffer::hasInstance(v8Value, isolate)) { | 511 if (V8ArrayBuffer::hasInstance(v8Value, isolate)) { |
| 421 RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::O
bject>::Cast(v8Value)); | 512 RefPtr<TestArrayBuffer> cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::O
bject>::Cast(v8Value)); |
| 422 impl.setArrayBuffer(cppValue); | 513 impl.setArrayBuffer(cppValue); |
| 423 return; | 514 return; |
| 424 } | 515 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 return m_string; | 563 return m_string; |
| 473 } | 564 } |
| 474 | 565 |
| 475 void StringOrDouble::setString(String value) | 566 void StringOrDouble::setString(String value) |
| 476 { | 567 { |
| 477 ASSERT(isNull()); | 568 ASSERT(isNull()); |
| 478 m_string = value; | 569 m_string = value; |
| 479 m_type = SpecificTypeString; | 570 m_type = SpecificTypeString; |
| 480 } | 571 } |
| 481 | 572 |
| 573 StringOrDouble StringOrDouble::fromString(String value) |
| 574 { |
| 575 StringOrDouble container; |
| 576 container.setString(value); |
| 577 return container; |
| 578 } |
| 579 |
| 482 double StringOrDouble::getAsDouble() const | 580 double StringOrDouble::getAsDouble() const |
| 483 { | 581 { |
| 484 ASSERT(isDouble()); | 582 ASSERT(isDouble()); |
| 485 return m_double; | 583 return m_double; |
| 486 } | 584 } |
| 487 | 585 |
| 488 void StringOrDouble::setDouble(double value) | 586 void StringOrDouble::setDouble(double value) |
| 489 { | 587 { |
| 490 ASSERT(isNull()); | 588 ASSERT(isNull()); |
| 491 m_double = value; | 589 m_double = value; |
| 492 m_type = SpecificTypeDouble; | 590 m_type = SpecificTypeDouble; |
| 493 } | 591 } |
| 494 | 592 |
| 593 StringOrDouble StringOrDouble::fromDouble(double value) |
| 594 { |
| 595 StringOrDouble container; |
| 596 container.setDouble(value); |
| 597 return container; |
| 598 } |
| 599 |
| 495 void V8StringOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, StringOrDouble& impl, ExceptionState& exceptionState) | 600 void V8StringOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
, StringOrDouble& impl, ExceptionState& exceptionState) |
| 496 { | 601 { |
| 497 if (v8Value.IsEmpty()) | 602 if (v8Value.IsEmpty()) |
| 498 return; | 603 return; |
| 499 | 604 |
| 500 if (v8Value->IsNumber()) { | 605 if (v8Value->IsNumber()) { |
| 501 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Valu
e, exceptionState), exceptionState); | 606 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Valu
e, exceptionState), exceptionState); |
| 502 impl.setDouble(cppValue); | 607 impl.setDouble(cppValue); |
| 503 return; | 608 return; |
| 504 } | 609 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 return m_string; | 649 return m_string; |
| 545 } | 650 } |
| 546 | 651 |
| 547 void StringOrStringSequence::setString(String value) | 652 void StringOrStringSequence::setString(String value) |
| 548 { | 653 { |
| 549 ASSERT(isNull()); | 654 ASSERT(isNull()); |
| 550 m_string = value; | 655 m_string = value; |
| 551 m_type = SpecificTypeString; | 656 m_type = SpecificTypeString; |
| 552 } | 657 } |
| 553 | 658 |
| 659 StringOrStringSequence StringOrStringSequence::fromString(String value) |
| 660 { |
| 661 StringOrStringSequence container; |
| 662 container.setString(value); |
| 663 return container; |
| 664 } |
| 665 |
| 554 const Vector<String>& StringOrStringSequence::getAsStringSequence() const | 666 const Vector<String>& StringOrStringSequence::getAsStringSequence() const |
| 555 { | 667 { |
| 556 ASSERT(isStringSequence()); | 668 ASSERT(isStringSequence()); |
| 557 return m_stringSequence; | 669 return m_stringSequence; |
| 558 } | 670 } |
| 559 | 671 |
| 560 void StringOrStringSequence::setStringSequence(const Vector<String>& value) | 672 void StringOrStringSequence::setStringSequence(const Vector<String>& value) |
| 561 { | 673 { |
| 562 ASSERT(isNull()); | 674 ASSERT(isNull()); |
| 563 m_stringSequence = value; | 675 m_stringSequence = value; |
| 564 m_type = SpecificTypeStringSequence; | 676 m_type = SpecificTypeStringSequence; |
| 565 } | 677 } |
| 566 | 678 |
| 679 StringOrStringSequence StringOrStringSequence::fromStringSequence(const Vector<S
tring>& value) |
| 680 { |
| 681 StringOrStringSequence container; |
| 682 container.setStringSequence(value); |
| 683 return container; |
| 684 } |
| 685 |
| 567 void V8StringOrStringSequence::toImpl(v8::Isolate* isolate, v8::Local<v8::Value>
v8Value, StringOrStringSequence& impl, ExceptionState& exceptionState) | 686 void V8StringOrStringSequence::toImpl(v8::Isolate* isolate, v8::Local<v8::Value>
v8Value, StringOrStringSequence& impl, ExceptionState& exceptionState) |
| 568 { | 687 { |
| 569 if (v8Value.IsEmpty()) | 688 if (v8Value.IsEmpty()) |
| 570 return; | 689 return; |
| 571 | 690 |
| 572 if (v8Value->IsArray()) { | 691 if (v8Value->IsArray()) { |
| 573 TONATIVE_VOID_EXCEPTIONSTATE(Vector<String>, cppValue, toImplArray<Strin
g>(v8Value, 0, isolate, exceptionState), exceptionState); | 692 TONATIVE_VOID_EXCEPTIONSTATE(Vector<String>, cppValue, toImplArray<Strin
g>(v8Value, 0, isolate, exceptionState), exceptionState); |
| 574 impl.setStringSequence(cppValue); | 693 impl.setStringSequence(cppValue); |
| 575 return; | 694 return; |
| 576 } | 695 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 ASSERT(isNull()); | 740 ASSERT(isNull()); |
| 622 String string = value; | 741 String string = value; |
| 623 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { | 742 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { |
| 624 ASSERT_NOT_REACHED(); | 743 ASSERT_NOT_REACHED(); |
| 625 return; | 744 return; |
| 626 } | 745 } |
| 627 m_testEnum = value; | 746 m_testEnum = value; |
| 628 m_type = SpecificTypeTestEnum; | 747 m_type = SpecificTypeTestEnum; |
| 629 } | 748 } |
| 630 | 749 |
| 750 TestEnumOrDouble TestEnumOrDouble::fromTestEnum(String value) |
| 751 { |
| 752 TestEnumOrDouble container; |
| 753 container.setTestEnum(value); |
| 754 return container; |
| 755 } |
| 756 |
| 631 double TestEnumOrDouble::getAsDouble() const | 757 double TestEnumOrDouble::getAsDouble() const |
| 632 { | 758 { |
| 633 ASSERT(isDouble()); | 759 ASSERT(isDouble()); |
| 634 return m_double; | 760 return m_double; |
| 635 } | 761 } |
| 636 | 762 |
| 637 void TestEnumOrDouble::setDouble(double value) | 763 void TestEnumOrDouble::setDouble(double value) |
| 638 { | 764 { |
| 639 ASSERT(isNull()); | 765 ASSERT(isNull()); |
| 640 m_double = value; | 766 m_double = value; |
| 641 m_type = SpecificTypeDouble; | 767 m_type = SpecificTypeDouble; |
| 642 } | 768 } |
| 643 | 769 |
| 770 TestEnumOrDouble TestEnumOrDouble::fromDouble(double value) |
| 771 { |
| 772 TestEnumOrDouble container; |
| 773 container.setDouble(value); |
| 774 return container; |
| 775 } |
| 776 |
| 644 void V8TestEnumOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Val
ue, TestEnumOrDouble& impl, ExceptionState& exceptionState) | 777 void V8TestEnumOrDouble::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Val
ue, TestEnumOrDouble& impl, ExceptionState& exceptionState) |
| 645 { | 778 { |
| 646 if (v8Value.IsEmpty()) | 779 if (v8Value.IsEmpty()) |
| 647 return; | 780 return; |
| 648 | 781 |
| 649 if (v8Value->IsNumber()) { | 782 if (v8Value->IsNumber()) { |
| 650 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Valu
e, exceptionState), exceptionState); | 783 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Valu
e, exceptionState), exceptionState); |
| 651 impl.setDouble(cppValue); | 784 impl.setDouble(cppValue); |
| 652 return; | 785 return; |
| 653 } | 786 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 return m_testInterface2; | 831 return m_testInterface2; |
| 699 } | 832 } |
| 700 | 833 |
| 701 void TestInterface2OrUint8Array::setTestInterface2(PassRefPtr<TestInterface2> va
lue) | 834 void TestInterface2OrUint8Array::setTestInterface2(PassRefPtr<TestInterface2> va
lue) |
| 702 { | 835 { |
| 703 ASSERT(isNull()); | 836 ASSERT(isNull()); |
| 704 m_testInterface2 = value; | 837 m_testInterface2 = value; |
| 705 m_type = SpecificTypeTestInterface2; | 838 m_type = SpecificTypeTestInterface2; |
| 706 } | 839 } |
| 707 | 840 |
| 841 TestInterface2OrUint8Array TestInterface2OrUint8Array::fromTestInterface2(PassRe
fPtr<TestInterface2> value) |
| 842 { |
| 843 TestInterface2OrUint8Array container; |
| 844 container.setTestInterface2(value); |
| 845 return container; |
| 846 } |
| 847 |
| 708 PassRefPtr<DOMUint8Array> TestInterface2OrUint8Array::getAsUint8Array() const | 848 PassRefPtr<DOMUint8Array> TestInterface2OrUint8Array::getAsUint8Array() const |
| 709 { | 849 { |
| 710 ASSERT(isUint8Array()); | 850 ASSERT(isUint8Array()); |
| 711 return m_uint8Array; | 851 return m_uint8Array; |
| 712 } | 852 } |
| 713 | 853 |
| 714 void TestInterface2OrUint8Array::setUint8Array(PassRefPtr<DOMUint8Array> value) | 854 void TestInterface2OrUint8Array::setUint8Array(PassRefPtr<DOMUint8Array> value) |
| 715 { | 855 { |
| 716 ASSERT(isNull()); | 856 ASSERT(isNull()); |
| 717 m_uint8Array = value; | 857 m_uint8Array = value; |
| 718 m_type = SpecificTypeUint8Array; | 858 m_type = SpecificTypeUint8Array; |
| 719 } | 859 } |
| 720 | 860 |
| 861 TestInterface2OrUint8Array TestInterface2OrUint8Array::fromUint8Array(PassRefPtr
<DOMUint8Array> value) |
| 862 { |
| 863 TestInterface2OrUint8Array container; |
| 864 container.setUint8Array(value); |
| 865 return container; |
| 866 } |
| 867 |
| 721 void V8TestInterface2OrUint8Array::toImpl(v8::Isolate* isolate, v8::Local<v8::Va
lue> v8Value, TestInterface2OrUint8Array& impl, ExceptionState& exceptionState) | 868 void V8TestInterface2OrUint8Array::toImpl(v8::Isolate* isolate, v8::Local<v8::Va
lue> v8Value, TestInterface2OrUint8Array& impl, ExceptionState& exceptionState) |
| 722 { | 869 { |
| 723 if (v8Value.IsEmpty()) | 870 if (v8Value.IsEmpty()) |
| 724 return; | 871 return; |
| 725 | 872 |
| 726 if (V8TestInterface2::hasInstance(v8Value, isolate)) { | 873 if (V8TestInterface2::hasInstance(v8Value, isolate)) { |
| 727 RefPtr<TestInterface2> cppValue = V8TestInterface2::toImpl(v8::Local<v8:
:Object>::Cast(v8Value)); | 874 RefPtr<TestInterface2> cppValue = V8TestInterface2::toImpl(v8::Local<v8:
:Object>::Cast(v8Value)); |
| 728 impl.setTestInterface2(cppValue); | 875 impl.setTestInterface2(cppValue); |
| 729 return; | 876 return; |
| 730 } | 877 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 return m_testInterfaceGarbageCollected; | 918 return m_testInterfaceGarbageCollected; |
| 772 } | 919 } |
| 773 | 920 |
| 774 void TestInterfaceGarbageCollectedOrString::setTestInterfaceGarbageCollected(Tes
tInterfaceGarbageCollected* value) | 921 void TestInterfaceGarbageCollectedOrString::setTestInterfaceGarbageCollected(Tes
tInterfaceGarbageCollected* value) |
| 775 { | 922 { |
| 776 ASSERT(isNull()); | 923 ASSERT(isNull()); |
| 777 m_testInterfaceGarbageCollected = value; | 924 m_testInterfaceGarbageCollected = value; |
| 778 m_type = SpecificTypeTestInterfaceGarbageCollected; | 925 m_type = SpecificTypeTestInterfaceGarbageCollected; |
| 779 } | 926 } |
| 780 | 927 |
| 928 TestInterfaceGarbageCollectedOrString TestInterfaceGarbageCollectedOrString::fro
mTestInterfaceGarbageCollected(TestInterfaceGarbageCollected* value) |
| 929 { |
| 930 TestInterfaceGarbageCollectedOrString container; |
| 931 container.setTestInterfaceGarbageCollected(value); |
| 932 return container; |
| 933 } |
| 934 |
| 781 String TestInterfaceGarbageCollectedOrString::getAsString() const | 935 String TestInterfaceGarbageCollectedOrString::getAsString() const |
| 782 { | 936 { |
| 783 ASSERT(isString()); | 937 ASSERT(isString()); |
| 784 return m_string; | 938 return m_string; |
| 785 } | 939 } |
| 786 | 940 |
| 787 void TestInterfaceGarbageCollectedOrString::setString(String value) | 941 void TestInterfaceGarbageCollectedOrString::setString(String value) |
| 788 { | 942 { |
| 789 ASSERT(isNull()); | 943 ASSERT(isNull()); |
| 790 m_string = value; | 944 m_string = value; |
| 791 m_type = SpecificTypeString; | 945 m_type = SpecificTypeString; |
| 792 } | 946 } |
| 793 | 947 |
| 948 TestInterfaceGarbageCollectedOrString TestInterfaceGarbageCollectedOrString::fro
mString(String value) |
| 949 { |
| 950 TestInterfaceGarbageCollectedOrString container; |
| 951 container.setString(value); |
| 952 return container; |
| 953 } |
| 954 |
| 794 void TestInterfaceGarbageCollectedOrString::trace(Visitor* visitor) | 955 void TestInterfaceGarbageCollectedOrString::trace(Visitor* visitor) |
| 795 { | 956 { |
| 796 visitor->trace(m_testInterfaceGarbageCollected); | 957 visitor->trace(m_testInterfaceGarbageCollected); |
| 797 } | 958 } |
| 798 | 959 |
| 799 void V8TestInterfaceGarbageCollectedOrString::toImpl(v8::Isolate* isolate, v8::L
ocal<v8::Value> v8Value, TestInterfaceGarbageCollectedOrString& impl, ExceptionS
tate& exceptionState) | 960 void V8TestInterfaceGarbageCollectedOrString::toImpl(v8::Isolate* isolate, v8::L
ocal<v8::Value> v8Value, TestInterfaceGarbageCollectedOrString& impl, ExceptionS
tate& exceptionState) |
| 800 { | 961 { |
| 801 if (v8Value.IsEmpty()) | 962 if (v8Value.IsEmpty()) |
| 802 return; | 963 return; |
| 803 | 964 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 return m_testInterface; | 1009 return m_testInterface; |
| 849 } | 1010 } |
| 850 | 1011 |
| 851 void TestInterfaceOrLong::setTestInterface(PassRefPtr<TestInterfaceImplementatio
n> value) | 1012 void TestInterfaceOrLong::setTestInterface(PassRefPtr<TestInterfaceImplementatio
n> value) |
| 852 { | 1013 { |
| 853 ASSERT(isNull()); | 1014 ASSERT(isNull()); |
| 854 m_testInterface = value; | 1015 m_testInterface = value; |
| 855 m_type = SpecificTypeTestInterface; | 1016 m_type = SpecificTypeTestInterface; |
| 856 } | 1017 } |
| 857 | 1018 |
| 1019 TestInterfaceOrLong TestInterfaceOrLong::fromTestInterface(PassRefPtr<TestInterf
aceImplementation> value) |
| 1020 { |
| 1021 TestInterfaceOrLong container; |
| 1022 container.setTestInterface(value); |
| 1023 return container; |
| 1024 } |
| 1025 |
| 858 int TestInterfaceOrLong::getAsLong() const | 1026 int TestInterfaceOrLong::getAsLong() const |
| 859 { | 1027 { |
| 860 ASSERT(isLong()); | 1028 ASSERT(isLong()); |
| 861 return m_long; | 1029 return m_long; |
| 862 } | 1030 } |
| 863 | 1031 |
| 864 void TestInterfaceOrLong::setLong(int value) | 1032 void TestInterfaceOrLong::setLong(int value) |
| 865 { | 1033 { |
| 866 ASSERT(isNull()); | 1034 ASSERT(isNull()); |
| 867 m_long = value; | 1035 m_long = value; |
| 868 m_type = SpecificTypeLong; | 1036 m_type = SpecificTypeLong; |
| 869 } | 1037 } |
| 870 | 1038 |
| 1039 TestInterfaceOrLong TestInterfaceOrLong::fromLong(int value) |
| 1040 { |
| 1041 TestInterfaceOrLong container; |
| 1042 container.setLong(value); |
| 1043 return container; |
| 1044 } |
| 1045 |
| 871 void V8TestInterfaceOrLong::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8
Value, TestInterfaceOrLong& impl, ExceptionState& exceptionState) | 1046 void V8TestInterfaceOrLong::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8
Value, TestInterfaceOrLong& impl, ExceptionState& exceptionState) |
| 872 { | 1047 { |
| 873 if (v8Value.IsEmpty()) | 1048 if (v8Value.IsEmpty()) |
| 874 return; | 1049 return; |
| 875 | 1050 |
| 876 if (V8TestInterface::hasInstance(v8Value, isolate)) { | 1051 if (V8TestInterface::hasInstance(v8Value, isolate)) { |
| 877 RefPtr<TestInterfaceImplementation> cppValue = V8TestInterface::toImpl(v
8::Local<v8::Object>::Cast(v8Value)); | 1052 RefPtr<TestInterfaceImplementation> cppValue = V8TestInterface::toImpl(v
8::Local<v8::Object>::Cast(v8Value)); |
| 878 impl.setTestInterface(cppValue); | 1053 impl.setTestInterface(cppValue); |
| 879 return; | 1054 return; |
| 880 } | 1055 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 return m_testInterface; | 1101 return m_testInterface; |
| 927 } | 1102 } |
| 928 | 1103 |
| 929 void TestInterfaceOrTestInterfaceEmpty::setTestInterface(PassRefPtr<TestInterfac
eImplementation> value) | 1104 void TestInterfaceOrTestInterfaceEmpty::setTestInterface(PassRefPtr<TestInterfac
eImplementation> value) |
| 930 { | 1105 { |
| 931 ASSERT(isNull()); | 1106 ASSERT(isNull()); |
| 932 m_testInterface = value; | 1107 m_testInterface = value; |
| 933 m_type = SpecificTypeTestInterface; | 1108 m_type = SpecificTypeTestInterface; |
| 934 } | 1109 } |
| 935 | 1110 |
| 1111 TestInterfaceOrTestInterfaceEmpty TestInterfaceOrTestInterfaceEmpty::fromTestInt
erface(PassRefPtr<TestInterfaceImplementation> value) |
| 1112 { |
| 1113 TestInterfaceOrTestInterfaceEmpty container; |
| 1114 container.setTestInterface(value); |
| 1115 return container; |
| 1116 } |
| 1117 |
| 936 PassRefPtr<TestInterfaceEmpty> TestInterfaceOrTestInterfaceEmpty::getAsTestInter
faceEmpty() const | 1118 PassRefPtr<TestInterfaceEmpty> TestInterfaceOrTestInterfaceEmpty::getAsTestInter
faceEmpty() const |
| 937 { | 1119 { |
| 938 ASSERT(isTestInterfaceEmpty()); | 1120 ASSERT(isTestInterfaceEmpty()); |
| 939 return m_testInterfaceEmpty; | 1121 return m_testInterfaceEmpty; |
| 940 } | 1122 } |
| 941 | 1123 |
| 942 void TestInterfaceOrTestInterfaceEmpty::setTestInterfaceEmpty(PassRefPtr<TestInt
erfaceEmpty> value) | 1124 void TestInterfaceOrTestInterfaceEmpty::setTestInterfaceEmpty(PassRefPtr<TestInt
erfaceEmpty> value) |
| 943 { | 1125 { |
| 944 ASSERT(isNull()); | 1126 ASSERT(isNull()); |
| 945 m_testInterfaceEmpty = value; | 1127 m_testInterfaceEmpty = value; |
| 946 m_type = SpecificTypeTestInterfaceEmpty; | 1128 m_type = SpecificTypeTestInterfaceEmpty; |
| 947 } | 1129 } |
| 948 | 1130 |
| 1131 TestInterfaceOrTestInterfaceEmpty TestInterfaceOrTestInterfaceEmpty::fromTestInt
erfaceEmpty(PassRefPtr<TestInterfaceEmpty> value) |
| 1132 { |
| 1133 TestInterfaceOrTestInterfaceEmpty container; |
| 1134 container.setTestInterfaceEmpty(value); |
| 1135 return container; |
| 1136 } |
| 1137 |
| 949 void V8TestInterfaceOrTestInterfaceEmpty::toImpl(v8::Isolate* isolate, v8::Local
<v8::Value> v8Value, TestInterfaceOrTestInterfaceEmpty& impl, ExceptionState& ex
ceptionState) | 1138 void V8TestInterfaceOrTestInterfaceEmpty::toImpl(v8::Isolate* isolate, v8::Local
<v8::Value> v8Value, TestInterfaceOrTestInterfaceEmpty& impl, ExceptionState& ex
ceptionState) |
| 950 { | 1139 { |
| 951 if (v8Value.IsEmpty()) | 1140 if (v8Value.IsEmpty()) |
| 952 return; | 1141 return; |
| 953 | 1142 |
| 954 if (V8TestInterface::hasInstance(v8Value, isolate)) { | 1143 if (V8TestInterface::hasInstance(v8Value, isolate)) { |
| 955 RefPtr<TestInterfaceImplementation> cppValue = V8TestInterface::toImpl(v
8::Local<v8::Object>::Cast(v8Value)); | 1144 RefPtr<TestInterfaceImplementation> cppValue = V8TestInterface::toImpl(v
8::Local<v8::Object>::Cast(v8Value)); |
| 956 impl.setTestInterface(cppValue); | 1145 impl.setTestInterface(cppValue); |
| 957 return; | 1146 return; |
| 958 } | 1147 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 return m_testInterfaceWillBeGarbageCollected; | 1188 return m_testInterfaceWillBeGarbageCollected; |
| 1000 } | 1189 } |
| 1001 | 1190 |
| 1002 void TestInterfaceWillBeGarbageCollectedOrTestDictionary::setTestInterfaceWillBe
GarbageCollected(PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> val
ue) | 1191 void TestInterfaceWillBeGarbageCollectedOrTestDictionary::setTestInterfaceWillBe
GarbageCollected(PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> val
ue) |
| 1003 { | 1192 { |
| 1004 ASSERT(isNull()); | 1193 ASSERT(isNull()); |
| 1005 m_testInterfaceWillBeGarbageCollected = value; | 1194 m_testInterfaceWillBeGarbageCollected = value; |
| 1006 m_type = SpecificTypeTestInterfaceWillBeGarbageCollected; | 1195 m_type = SpecificTypeTestInterfaceWillBeGarbageCollected; |
| 1007 } | 1196 } |
| 1008 | 1197 |
| 1198 TestInterfaceWillBeGarbageCollectedOrTestDictionary TestInterfaceWillBeGarbageCo
llectedOrTestDictionary::fromTestInterfaceWillBeGarbageCollected(PassRefPtrWillB
eRawPtr<TestInterfaceWillBeGarbageCollected> value) |
| 1199 { |
| 1200 TestInterfaceWillBeGarbageCollectedOrTestDictionary container; |
| 1201 container.setTestInterfaceWillBeGarbageCollected(value); |
| 1202 return container; |
| 1203 } |
| 1204 |
| 1009 TestDictionary TestInterfaceWillBeGarbageCollectedOrTestDictionary::getAsTestDic
tionary() const | 1205 TestDictionary TestInterfaceWillBeGarbageCollectedOrTestDictionary::getAsTestDic
tionary() const |
| 1010 { | 1206 { |
| 1011 ASSERT(isTestDictionary()); | 1207 ASSERT(isTestDictionary()); |
| 1012 return m_testDictionary; | 1208 return m_testDictionary; |
| 1013 } | 1209 } |
| 1014 | 1210 |
| 1015 void TestInterfaceWillBeGarbageCollectedOrTestDictionary::setTestDictionary(Test
Dictionary value) | 1211 void TestInterfaceWillBeGarbageCollectedOrTestDictionary::setTestDictionary(Test
Dictionary value) |
| 1016 { | 1212 { |
| 1017 ASSERT(isNull()); | 1213 ASSERT(isNull()); |
| 1018 m_testDictionary = value; | 1214 m_testDictionary = value; |
| 1019 m_type = SpecificTypeTestDictionary; | 1215 m_type = SpecificTypeTestDictionary; |
| 1020 } | 1216 } |
| 1021 | 1217 |
| 1218 TestInterfaceWillBeGarbageCollectedOrTestDictionary TestInterfaceWillBeGarbageCo
llectedOrTestDictionary::fromTestDictionary(TestDictionary value) |
| 1219 { |
| 1220 TestInterfaceWillBeGarbageCollectedOrTestDictionary container; |
| 1221 container.setTestDictionary(value); |
| 1222 return container; |
| 1223 } |
| 1224 |
| 1022 void TestInterfaceWillBeGarbageCollectedOrTestDictionary::trace(Visitor* visitor
) | 1225 void TestInterfaceWillBeGarbageCollectedOrTestDictionary::trace(Visitor* visitor
) |
| 1023 { | 1226 { |
| 1024 visitor->trace(m_testInterfaceWillBeGarbageCollected); | 1227 visitor->trace(m_testInterfaceWillBeGarbageCollected); |
| 1025 visitor->trace(m_testDictionary); | 1228 visitor->trace(m_testDictionary); |
| 1026 } | 1229 } |
| 1027 | 1230 |
| 1028 void V8TestInterfaceWillBeGarbageCollectedOrTestDictionary::toImpl(v8::Isolate*
isolate, v8::Local<v8::Value> v8Value, TestInterfaceWillBeGarbageCollectedOrTest
Dictionary& impl, ExceptionState& exceptionState) | 1231 void V8TestInterfaceWillBeGarbageCollectedOrTestDictionary::toImpl(v8::Isolate*
isolate, v8::Local<v8::Value> v8Value, TestInterfaceWillBeGarbageCollectedOrTest
Dictionary& impl, ExceptionState& exceptionState) |
| 1029 { | 1232 { |
| 1030 if (v8Value.IsEmpty()) | 1233 if (v8Value.IsEmpty()) |
| 1031 return; | 1234 return; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 return m_unrestrictedDouble; | 1282 return m_unrestrictedDouble; |
| 1080 } | 1283 } |
| 1081 | 1284 |
| 1082 void UnrestrictedDoubleOrString::setUnrestrictedDouble(double value) | 1285 void UnrestrictedDoubleOrString::setUnrestrictedDouble(double value) |
| 1083 { | 1286 { |
| 1084 ASSERT(isNull()); | 1287 ASSERT(isNull()); |
| 1085 m_unrestrictedDouble = value; | 1288 m_unrestrictedDouble = value; |
| 1086 m_type = SpecificTypeUnrestrictedDouble; | 1289 m_type = SpecificTypeUnrestrictedDouble; |
| 1087 } | 1290 } |
| 1088 | 1291 |
| 1292 UnrestrictedDoubleOrString UnrestrictedDoubleOrString::fromUnrestrictedDouble(do
uble value) |
| 1293 { |
| 1294 UnrestrictedDoubleOrString container; |
| 1295 container.setUnrestrictedDouble(value); |
| 1296 return container; |
| 1297 } |
| 1298 |
| 1089 String UnrestrictedDoubleOrString::getAsString() const | 1299 String UnrestrictedDoubleOrString::getAsString() const |
| 1090 { | 1300 { |
| 1091 ASSERT(isString()); | 1301 ASSERT(isString()); |
| 1092 return m_string; | 1302 return m_string; |
| 1093 } | 1303 } |
| 1094 | 1304 |
| 1095 void UnrestrictedDoubleOrString::setString(String value) | 1305 void UnrestrictedDoubleOrString::setString(String value) |
| 1096 { | 1306 { |
| 1097 ASSERT(isNull()); | 1307 ASSERT(isNull()); |
| 1098 m_string = value; | 1308 m_string = value; |
| 1099 m_type = SpecificTypeString; | 1309 m_type = SpecificTypeString; |
| 1100 } | 1310 } |
| 1101 | 1311 |
| 1312 UnrestrictedDoubleOrString UnrestrictedDoubleOrString::fromString(String value) |
| 1313 { |
| 1314 UnrestrictedDoubleOrString container; |
| 1315 container.setString(value); |
| 1316 return container; |
| 1317 } |
| 1318 |
| 1102 void V8UnrestrictedDoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Va
lue> v8Value, UnrestrictedDoubleOrString& impl, ExceptionState& exceptionState) | 1319 void V8UnrestrictedDoubleOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Va
lue> v8Value, UnrestrictedDoubleOrString& impl, ExceptionState& exceptionState) |
| 1103 { | 1320 { |
| 1104 if (v8Value.IsEmpty()) | 1321 if (v8Value.IsEmpty()) |
| 1105 return; | 1322 return; |
| 1106 | 1323 |
| 1107 if (v8Value->IsNumber()) { | 1324 if (v8Value->IsNumber()) { |
| 1108 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, excepti
onState), exceptionState); | 1325 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, excepti
onState), exceptionState); |
| 1109 impl.setUnrestrictedDouble(cppValue); | 1326 impl.setUnrestrictedDouble(cppValue); |
| 1110 return; | 1327 return; |
| 1111 } | 1328 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1134 } | 1351 } |
| 1135 | 1352 |
| 1136 UnrestrictedDoubleOrString NativeValueTraits<UnrestrictedDoubleOrString>::native
Value(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& e
xceptionState) | 1353 UnrestrictedDoubleOrString NativeValueTraits<UnrestrictedDoubleOrString>::native
Value(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& e
xceptionState) |
| 1137 { | 1354 { |
| 1138 UnrestrictedDoubleOrString impl; | 1355 UnrestrictedDoubleOrString impl; |
| 1139 V8UnrestrictedDoubleOrString::toImpl(isolate, value, impl, exceptionState); | 1356 V8UnrestrictedDoubleOrString::toImpl(isolate, value, impl, exceptionState); |
| 1140 return impl; | 1357 return impl; |
| 1141 } | 1358 } |
| 1142 | 1359 |
| 1143 } // namespace blink | 1360 } // namespace blink |
| OLD | NEW |