| 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 #ifndef UnionTypeCore_h | 7 #ifndef UnionTypeCore_h |
| 8 #define UnionTypeCore_h | 8 #define UnionTypeCore_h |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 v8::Local<v8::Value> toV8(const ArrayBufferOrArrayBufferViewOrDictionary&, v8::L
ocal<v8::Object>, v8::Isolate*); | 71 v8::Local<v8::Value> toV8(const ArrayBufferOrArrayBufferViewOrDictionary&, v8::L
ocal<v8::Object>, v8::Isolate*); |
| 72 | 72 |
| 73 template <class CallbackInfo> | 73 template <class CallbackInfo> |
| 74 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ArrayBufferOrArra
yBufferViewOrDictionary& impl) | 74 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ArrayBufferOrArra
yBufferViewOrDictionary& impl) |
| 75 { | 75 { |
| 76 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 76 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 77 } | 77 } |
| 78 | 78 |
| 79 template <> | 79 template <> |
| 80 struct NativeValueTraits<ArrayBufferOrArrayBufferViewOrDictionary> { | 80 struct NativeValueTraits<ArrayBufferOrArrayBufferViewOrDictionary> { |
| 81 static ArrayBufferOrArrayBufferViewOrDictionary nativeValue(const v8::Local<
v8::Value>&, v8::Isolate*, ExceptionState&); | 81 static ArrayBufferOrArrayBufferViewOrDictionary nativeValue(v8::Local<v8::Va
lue>, v8::Isolate*, ExceptionState&); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 class BooleanOrStringOrUnrestrictedDouble final { | 84 class BooleanOrStringOrUnrestrictedDouble final { |
| 85 ALLOW_ONLY_INLINE_ALLOCATION(); | 85 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 86 public: | 86 public: |
| 87 BooleanOrStringOrUnrestrictedDouble(); | 87 BooleanOrStringOrUnrestrictedDouble(); |
| 88 bool isNull() const { return m_type == SpecificTypeNone; } | 88 bool isNull() const { return m_type == SpecificTypeNone; } |
| 89 | 89 |
| 90 bool isBoolean() const { return m_type == SpecificTypeBoolean; } | 90 bool isBoolean() const { return m_type == SpecificTypeBoolean; } |
| 91 bool getAsBoolean() const; | 91 bool getAsBoolean() const; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 v8::Local<v8::Value> toV8(const BooleanOrStringOrUnrestrictedDouble&, v8::Local<
v8::Object>, v8::Isolate*); | 126 v8::Local<v8::Value> toV8(const BooleanOrStringOrUnrestrictedDouble&, v8::Local<
v8::Object>, v8::Isolate*); |
| 127 | 127 |
| 128 template <class CallbackInfo> | 128 template <class CallbackInfo> |
| 129 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrStringOr
UnrestrictedDouble& impl) | 129 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrStringOr
UnrestrictedDouble& impl) |
| 130 { | 130 { |
| 131 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 131 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 132 } | 132 } |
| 133 | 133 |
| 134 template <> | 134 template <> |
| 135 struct NativeValueTraits<BooleanOrStringOrUnrestrictedDouble> { | 135 struct NativeValueTraits<BooleanOrStringOrUnrestrictedDouble> { |
| 136 static BooleanOrStringOrUnrestrictedDouble nativeValue(const v8::Local<v8::V
alue>&, v8::Isolate*, ExceptionState&); | 136 static BooleanOrStringOrUnrestrictedDouble nativeValue(v8::Local<v8::Value>,
v8::Isolate*, ExceptionState&); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 class DoubleOrString final { | 139 class DoubleOrString final { |
| 140 ALLOW_ONLY_INLINE_ALLOCATION(); | 140 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 141 public: | 141 public: |
| 142 DoubleOrString(); | 142 DoubleOrString(); |
| 143 bool isNull() const { return m_type == SpecificTypeNone; } | 143 bool isNull() const { return m_type == SpecificTypeNone; } |
| 144 | 144 |
| 145 bool isDouble() const { return m_type == SpecificTypeDouble; } | 145 bool isDouble() const { return m_type == SpecificTypeDouble; } |
| 146 double getAsDouble() const; | 146 double getAsDouble() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 174 v8::Local<v8::Value> toV8(const DoubleOrString&, v8::Local<v8::Object>, v8::Isol
ate*); | 174 v8::Local<v8::Value> toV8(const DoubleOrString&, v8::Local<v8::Object>, v8::Isol
ate*); |
| 175 | 175 |
| 176 template <class CallbackInfo> | 176 template <class CallbackInfo> |
| 177 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, DoubleOrString& i
mpl) | 177 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, DoubleOrString& i
mpl) |
| 178 { | 178 { |
| 179 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 179 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 180 } | 180 } |
| 181 | 181 |
| 182 template <> | 182 template <> |
| 183 struct NativeValueTraits<DoubleOrString> { | 183 struct NativeValueTraits<DoubleOrString> { |
| 184 static DoubleOrString nativeValue(const v8::Local<v8::Value>&, v8::Isolate*,
ExceptionState&); | 184 static DoubleOrString nativeValue(v8::Local<v8::Value>, v8::Isolate*, Except
ionState&); |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 class NodeOrNodeList final { | 187 class NodeOrNodeList final { |
| 188 ALLOW_ONLY_INLINE_ALLOCATION(); | 188 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 189 public: | 189 public: |
| 190 NodeOrNodeList(); | 190 NodeOrNodeList(); |
| 191 bool isNull() const { return m_type == SpecificTypeNone; } | 191 bool isNull() const { return m_type == SpecificTypeNone; } |
| 192 | 192 |
| 193 bool isNode() const { return m_type == SpecificTypeNode; } | 193 bool isNode() const { return m_type == SpecificTypeNode; } |
| 194 PassRefPtrWillBeRawPtr<Node> getAsNode() const; | 194 PassRefPtrWillBeRawPtr<Node> getAsNode() const; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 224 v8::Local<v8::Value> toV8(const NodeOrNodeList&, v8::Local<v8::Object>, v8::Isol
ate*); | 224 v8::Local<v8::Value> toV8(const NodeOrNodeList&, v8::Local<v8::Object>, v8::Isol
ate*); |
| 225 | 225 |
| 226 template <class CallbackInfo> | 226 template <class CallbackInfo> |
| 227 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, NodeOrNodeList& i
mpl) | 227 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, NodeOrNodeList& i
mpl) |
| 228 { | 228 { |
| 229 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 229 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 230 } | 230 } |
| 231 | 231 |
| 232 template <> | 232 template <> |
| 233 struct NativeValueTraits<NodeOrNodeList> { | 233 struct NativeValueTraits<NodeOrNodeList> { |
| 234 static NodeOrNodeList nativeValue(const v8::Local<v8::Value>&, v8::Isolate*,
ExceptionState&); | 234 static NodeOrNodeList nativeValue(v8::Local<v8::Value>, v8::Isolate*, Except
ionState&); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 class StringOrArrayBufferOrArrayBufferView final { | 237 class StringOrArrayBufferOrArrayBufferView final { |
| 238 ALLOW_ONLY_INLINE_ALLOCATION(); | 238 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 239 public: | 239 public: |
| 240 StringOrArrayBufferOrArrayBufferView(); | 240 StringOrArrayBufferOrArrayBufferView(); |
| 241 bool isNull() const { return m_type == SpecificTypeNone; } | 241 bool isNull() const { return m_type == SpecificTypeNone; } |
| 242 | 242 |
| 243 bool isString() const { return m_type == SpecificTypeString; } | 243 bool isString() const { return m_type == SpecificTypeString; } |
| 244 String getAsString() const; | 244 String getAsString() const; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 v8::Local<v8::Value> toV8(const StringOrArrayBufferOrArrayBufferView&, v8::Local
<v8::Object>, v8::Isolate*); | 279 v8::Local<v8::Value> toV8(const StringOrArrayBufferOrArrayBufferView&, v8::Local
<v8::Object>, v8::Isolate*); |
| 280 | 280 |
| 281 template <class CallbackInfo> | 281 template <class CallbackInfo> |
| 282 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrArrayBuff
erOrArrayBufferView& impl) | 282 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrArrayBuff
erOrArrayBufferView& impl) |
| 283 { | 283 { |
| 284 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 284 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 285 } | 285 } |
| 286 | 286 |
| 287 template <> | 287 template <> |
| 288 struct NativeValueTraits<StringOrArrayBufferOrArrayBufferView> { | 288 struct NativeValueTraits<StringOrArrayBufferOrArrayBufferView> { |
| 289 static StringOrArrayBufferOrArrayBufferView nativeValue(const v8::Local<v8::
Value>&, v8::Isolate*, ExceptionState&); | 289 static StringOrArrayBufferOrArrayBufferView nativeValue(v8::Local<v8::Value>
, v8::Isolate*, ExceptionState&); |
| 290 }; | 290 }; |
| 291 | 291 |
| 292 class StringOrDouble final { | 292 class StringOrDouble final { |
| 293 ALLOW_ONLY_INLINE_ALLOCATION(); | 293 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 294 public: | 294 public: |
| 295 StringOrDouble(); | 295 StringOrDouble(); |
| 296 bool isNull() const { return m_type == SpecificTypeNone; } | 296 bool isNull() const { return m_type == SpecificTypeNone; } |
| 297 | 297 |
| 298 bool isString() const { return m_type == SpecificTypeString; } | 298 bool isString() const { return m_type == SpecificTypeString; } |
| 299 String getAsString() const; | 299 String getAsString() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 327 v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isol
ate*); | 327 v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isol
ate*); |
| 328 | 328 |
| 329 template <class CallbackInfo> | 329 template <class CallbackInfo> |
| 330 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& i
mpl) | 330 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& i
mpl) |
| 331 { | 331 { |
| 332 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 332 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 333 } | 333 } |
| 334 | 334 |
| 335 template <> | 335 template <> |
| 336 struct NativeValueTraits<StringOrDouble> { | 336 struct NativeValueTraits<StringOrDouble> { |
| 337 static StringOrDouble nativeValue(const v8::Local<v8::Value>&, v8::Isolate*,
ExceptionState&); | 337 static StringOrDouble nativeValue(v8::Local<v8::Value>, v8::Isolate*, Except
ionState&); |
| 338 }; | 338 }; |
| 339 | 339 |
| 340 class StringOrStringSequence final { | 340 class StringOrStringSequence final { |
| 341 ALLOW_ONLY_INLINE_ALLOCATION(); | 341 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 342 public: | 342 public: |
| 343 StringOrStringSequence(); | 343 StringOrStringSequence(); |
| 344 bool isNull() const { return m_type == SpecificTypeNone; } | 344 bool isNull() const { return m_type == SpecificTypeNone; } |
| 345 | 345 |
| 346 bool isString() const { return m_type == SpecificTypeString; } | 346 bool isString() const { return m_type == SpecificTypeString; } |
| 347 String getAsString() const; | 347 String getAsString() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 375 v8::Local<v8::Value> toV8(const StringOrStringSequence&, v8::Local<v8::Object>,
v8::Isolate*); | 375 v8::Local<v8::Value> toV8(const StringOrStringSequence&, v8::Local<v8::Object>,
v8::Isolate*); |
| 376 | 376 |
| 377 template <class CallbackInfo> | 377 template <class CallbackInfo> |
| 378 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrStringSeq
uence& impl) | 378 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrStringSeq
uence& impl) |
| 379 { | 379 { |
| 380 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 380 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 381 } | 381 } |
| 382 | 382 |
| 383 template <> | 383 template <> |
| 384 struct NativeValueTraits<StringOrStringSequence> { | 384 struct NativeValueTraits<StringOrStringSequence> { |
| 385 static StringOrStringSequence nativeValue(const v8::Local<v8::Value>&, v8::I
solate*, ExceptionState&); | 385 static StringOrStringSequence nativeValue(v8::Local<v8::Value>, v8::Isolate*
, ExceptionState&); |
| 386 }; | 386 }; |
| 387 | 387 |
| 388 class TestEnumOrDouble final { | 388 class TestEnumOrDouble final { |
| 389 ALLOW_ONLY_INLINE_ALLOCATION(); | 389 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 390 public: | 390 public: |
| 391 TestEnumOrDouble(); | 391 TestEnumOrDouble(); |
| 392 bool isNull() const { return m_type == SpecificTypeNone; } | 392 bool isNull() const { return m_type == SpecificTypeNone; } |
| 393 | 393 |
| 394 bool isTestEnum() const { return m_type == SpecificTypeTestEnum; } | 394 bool isTestEnum() const { return m_type == SpecificTypeTestEnum; } |
| 395 String getAsTestEnum() const; | 395 String getAsTestEnum() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 423 v8::Local<v8::Value> toV8(const TestEnumOrDouble&, v8::Local<v8::Object>, v8::Is
olate*); | 423 v8::Local<v8::Value> toV8(const TestEnumOrDouble&, v8::Local<v8::Object>, v8::Is
olate*); |
| 424 | 424 |
| 425 template <class CallbackInfo> | 425 template <class CallbackInfo> |
| 426 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestEnumOrDouble&
impl) | 426 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestEnumOrDouble&
impl) |
| 427 { | 427 { |
| 428 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 428 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 429 } | 429 } |
| 430 | 430 |
| 431 template <> | 431 template <> |
| 432 struct NativeValueTraits<TestEnumOrDouble> { | 432 struct NativeValueTraits<TestEnumOrDouble> { |
| 433 static TestEnumOrDouble nativeValue(const v8::Local<v8::Value>&, v8::Isolate
*, ExceptionState&); | 433 static TestEnumOrDouble nativeValue(v8::Local<v8::Value>, v8::Isolate*, Exce
ptionState&); |
| 434 }; | 434 }; |
| 435 | 435 |
| 436 class TestInterface2OrUint8Array final { | 436 class TestInterface2OrUint8Array final { |
| 437 ALLOW_ONLY_INLINE_ALLOCATION(); | 437 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 438 public: | 438 public: |
| 439 TestInterface2OrUint8Array(); | 439 TestInterface2OrUint8Array(); |
| 440 bool isNull() const { return m_type == SpecificTypeNone; } | 440 bool isNull() const { return m_type == SpecificTypeNone; } |
| 441 | 441 |
| 442 bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2;
} | 442 bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2;
} |
| 443 PassRefPtr<TestInterface2> getAsTestInterface2() const; | 443 PassRefPtr<TestInterface2> getAsTestInterface2() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 471 v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Local<v8::Objec
t>, v8::Isolate*); | 471 v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Local<v8::Objec
t>, v8::Isolate*); |
| 472 | 472 |
| 473 template <class CallbackInfo> | 473 template <class CallbackInfo> |
| 474 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrU
int8Array& impl) | 474 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrU
int8Array& impl) |
| 475 { | 475 { |
| 476 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 476 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 477 } | 477 } |
| 478 | 478 |
| 479 template <> | 479 template <> |
| 480 struct NativeValueTraits<TestInterface2OrUint8Array> { | 480 struct NativeValueTraits<TestInterface2OrUint8Array> { |
| 481 static TestInterface2OrUint8Array nativeValue(const v8::Local<v8::Value>&, v
8::Isolate*, ExceptionState&); | 481 static TestInterface2OrUint8Array nativeValue(v8::Local<v8::Value>, v8::Isol
ate*, ExceptionState&); |
| 482 }; | 482 }; |
| 483 | 483 |
| 484 class TestInterfaceGarbageCollectedOrString final { | 484 class TestInterfaceGarbageCollectedOrString final { |
| 485 ALLOW_ONLY_INLINE_ALLOCATION(); | 485 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 486 public: | 486 public: |
| 487 TestInterfaceGarbageCollectedOrString(); | 487 TestInterfaceGarbageCollectedOrString(); |
| 488 bool isNull() const { return m_type == SpecificTypeNone; } | 488 bool isNull() const { return m_type == SpecificTypeNone; } |
| 489 | 489 |
| 490 bool isTestInterfaceGarbageCollected() const { return m_type == SpecificType
TestInterfaceGarbageCollected; } | 490 bool isTestInterfaceGarbageCollected() const { return m_type == SpecificType
TestInterfaceGarbageCollected; } |
| 491 TestInterfaceGarbageCollected* getAsTestInterfaceGarbageCollected() const; | 491 TestInterfaceGarbageCollected* getAsTestInterfaceGarbageCollected() const; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 521 v8::Local<v8::Value> toV8(const TestInterfaceGarbageCollectedOrString&, v8::Loca
l<v8::Object>, v8::Isolate*); | 521 v8::Local<v8::Value> toV8(const TestInterfaceGarbageCollectedOrString&, v8::Loca
l<v8::Object>, v8::Isolate*); |
| 522 | 522 |
| 523 template <class CallbackInfo> | 523 template <class CallbackInfo> |
| 524 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceGarb
ageCollectedOrString& impl) | 524 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceGarb
ageCollectedOrString& impl) |
| 525 { | 525 { |
| 526 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 526 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 527 } | 527 } |
| 528 | 528 |
| 529 template <> | 529 template <> |
| 530 struct NativeValueTraits<TestInterfaceGarbageCollectedOrString> { | 530 struct NativeValueTraits<TestInterfaceGarbageCollectedOrString> { |
| 531 static TestInterfaceGarbageCollectedOrString nativeValue(const v8::Local<v8:
:Value>&, v8::Isolate*, ExceptionState&); | 531 static TestInterfaceGarbageCollectedOrString nativeValue(v8::Local<v8::Value
>, v8::Isolate*, ExceptionState&); |
| 532 }; | 532 }; |
| 533 | 533 |
| 534 class TestInterfaceOrLong final { | 534 class TestInterfaceOrLong final { |
| 535 ALLOW_ONLY_INLINE_ALLOCATION(); | 535 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 536 public: | 536 public: |
| 537 TestInterfaceOrLong(); | 537 TestInterfaceOrLong(); |
| 538 bool isNull() const { return m_type == SpecificTypeNone; } | 538 bool isNull() const { return m_type == SpecificTypeNone; } |
| 539 | 539 |
| 540 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } | 540 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } |
| 541 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; | 541 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 569 v8::Local<v8::Value> toV8(const TestInterfaceOrLong&, v8::Local<v8::Object>, v8:
:Isolate*); | 569 v8::Local<v8::Value> toV8(const TestInterfaceOrLong&, v8::Local<v8::Object>, v8:
:Isolate*); |
| 570 | 570 |
| 571 template <class CallbackInfo> | 571 template <class CallbackInfo> |
| 572 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrLo
ng& impl) | 572 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrLo
ng& impl) |
| 573 { | 573 { |
| 574 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 574 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 575 } | 575 } |
| 576 | 576 |
| 577 template <> | 577 template <> |
| 578 struct NativeValueTraits<TestInterfaceOrLong> { | 578 struct NativeValueTraits<TestInterfaceOrLong> { |
| 579 static TestInterfaceOrLong nativeValue(const v8::Local<v8::Value>&, v8::Isol
ate*, ExceptionState&); | 579 static TestInterfaceOrLong nativeValue(v8::Local<v8::Value>, v8::Isolate*, E
xceptionState&); |
| 580 }; | 580 }; |
| 581 | 581 |
| 582 class TestInterfaceOrTestInterfaceEmpty final { | 582 class TestInterfaceOrTestInterfaceEmpty final { |
| 583 ALLOW_ONLY_INLINE_ALLOCATION(); | 583 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 584 public: | 584 public: |
| 585 TestInterfaceOrTestInterfaceEmpty(); | 585 TestInterfaceOrTestInterfaceEmpty(); |
| 586 bool isNull() const { return m_type == SpecificTypeNone; } | 586 bool isNull() const { return m_type == SpecificTypeNone; } |
| 587 | 587 |
| 588 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } | 588 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } |
| 589 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; | 589 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 617 v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&, v8::Local<v8
::Object>, v8::Isolate*); | 617 v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&, v8::Local<v8
::Object>, v8::Isolate*); |
| 618 | 618 |
| 619 template <class CallbackInfo> | 619 template <class CallbackInfo> |
| 620 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe
stInterfaceEmpty& impl) | 620 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe
stInterfaceEmpty& impl) |
| 621 { | 621 { |
| 622 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 622 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 623 } | 623 } |
| 624 | 624 |
| 625 template <> | 625 template <> |
| 626 struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> { | 626 struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> { |
| 627 static TestInterfaceOrTestInterfaceEmpty nativeValue(const v8::Local<v8::Val
ue>&, v8::Isolate*, ExceptionState&); | 627 static TestInterfaceOrTestInterfaceEmpty nativeValue(v8::Local<v8::Value>, v
8::Isolate*, ExceptionState&); |
| 628 }; | 628 }; |
| 629 | 629 |
| 630 class TestInterfaceWillBeGarbageCollectedOrTestDictionary final { | 630 class TestInterfaceWillBeGarbageCollectedOrTestDictionary final { |
| 631 ALLOW_ONLY_INLINE_ALLOCATION(); | 631 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 632 public: | 632 public: |
| 633 TestInterfaceWillBeGarbageCollectedOrTestDictionary(); | 633 TestInterfaceWillBeGarbageCollectedOrTestDictionary(); |
| 634 bool isNull() const { return m_type == SpecificTypeNone; } | 634 bool isNull() const { return m_type == SpecificTypeNone; } |
| 635 | 635 |
| 636 bool isTestInterfaceWillBeGarbageCollected() const { return m_type == Specif
icTypeTestInterfaceWillBeGarbageCollected; } | 636 bool isTestInterfaceWillBeGarbageCollected() const { return m_type == Specif
icTypeTestInterfaceWillBeGarbageCollected; } |
| 637 PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> getAsTestInterfa
ceWillBeGarbageCollected() const; | 637 PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> getAsTestInterfa
ceWillBeGarbageCollected() const; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 667 v8::Local<v8::Value> toV8(const TestInterfaceWillBeGarbageCollectedOrTestDiction
ary&, v8::Local<v8::Object>, v8::Isolate*); | 667 v8::Local<v8::Value> toV8(const TestInterfaceWillBeGarbageCollectedOrTestDiction
ary&, v8::Local<v8::Object>, v8::Isolate*); |
| 668 | 668 |
| 669 template <class CallbackInfo> | 669 template <class CallbackInfo> |
| 670 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceWill
BeGarbageCollectedOrTestDictionary& impl) | 670 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceWill
BeGarbageCollectedOrTestDictionary& impl) |
| 671 { | 671 { |
| 672 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 672 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 673 } | 673 } |
| 674 | 674 |
| 675 template <> | 675 template <> |
| 676 struct NativeValueTraits<TestInterfaceWillBeGarbageCollectedOrTestDictionary> { | 676 struct NativeValueTraits<TestInterfaceWillBeGarbageCollectedOrTestDictionary> { |
| 677 static TestInterfaceWillBeGarbageCollectedOrTestDictionary nativeValue(const
v8::Local<v8::Value>&, v8::Isolate*, ExceptionState&); | 677 static TestInterfaceWillBeGarbageCollectedOrTestDictionary nativeValue(v8::L
ocal<v8::Value>, v8::Isolate*, ExceptionState&); |
| 678 }; | 678 }; |
| 679 | 679 |
| 680 class UnrestrictedDoubleOrString final { | 680 class UnrestrictedDoubleOrString final { |
| 681 ALLOW_ONLY_INLINE_ALLOCATION(); | 681 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 682 public: | 682 public: |
| 683 UnrestrictedDoubleOrString(); | 683 UnrestrictedDoubleOrString(); |
| 684 bool isNull() const { return m_type == SpecificTypeNone; } | 684 bool isNull() const { return m_type == SpecificTypeNone; } |
| 685 | 685 |
| 686 bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestricte
dDouble; } | 686 bool isUnrestrictedDouble() const { return m_type == SpecificTypeUnrestricte
dDouble; } |
| 687 double getAsUnrestrictedDouble() const; | 687 double getAsUnrestrictedDouble() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 715 v8::Local<v8::Value> toV8(const UnrestrictedDoubleOrString&, v8::Local<v8::Objec
t>, v8::Isolate*); | 715 v8::Local<v8::Value> toV8(const UnrestrictedDoubleOrString&, v8::Local<v8::Objec
t>, v8::Isolate*); |
| 716 | 716 |
| 717 template <class CallbackInfo> | 717 template <class CallbackInfo> |
| 718 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, UnrestrictedDoubl
eOrString& impl) | 718 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, UnrestrictedDoubl
eOrString& impl) |
| 719 { | 719 { |
| 720 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 720 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 721 } | 721 } |
| 722 | 722 |
| 723 template <> | 723 template <> |
| 724 struct NativeValueTraits<UnrestrictedDoubleOrString> { | 724 struct NativeValueTraits<UnrestrictedDoubleOrString> { |
| 725 static UnrestrictedDoubleOrString nativeValue(const v8::Local<v8::Value>&, v
8::Isolate*, ExceptionState&); | 725 static UnrestrictedDoubleOrString nativeValue(v8::Local<v8::Value>, v8::Isol
ate*, ExceptionState&); |
| 726 }; | 726 }; |
| 727 | 727 |
| 728 class V8DoubleOrStringOrNull final { | 728 class V8DoubleOrStringOrNull final { |
| 729 public: | 729 public: |
| 730 static void toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, Doubl
eOrString& impl, ExceptionState& exceptionState) | 730 static void toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, Doubl
eOrString& impl, ExceptionState& exceptionState) |
| 731 { | 731 { |
| 732 if (isUndefinedOrNull(v8Value)) | 732 if (isUndefinedOrNull(v8Value)) |
| 733 return; | 733 return; |
| 734 V8DoubleOrString::toImpl(isolate, v8Value, impl, exceptionState); | 734 V8DoubleOrString::toImpl(isolate, v8Value, impl, exceptionState); |
| 735 } | 735 } |
| 736 }; | 736 }; |
| 737 | 737 |
| 738 } // namespace blink | 738 } // namespace blink |
| 739 | 739 |
| 740 #endif // UnionTypeCore_h | 740 #endif // UnionTypeCore_h |
| OLD | NEW |