| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 SpecificTypeArrayBuffer, | 50 SpecificTypeArrayBuffer, |
| 51 SpecificTypeArrayBufferView, | 51 SpecificTypeArrayBufferView, |
| 52 SpecificTypeDictionary, | 52 SpecificTypeDictionary, |
| 53 }; | 53 }; |
| 54 SpecificTypes m_type; | 54 SpecificTypes m_type; |
| 55 | 55 |
| 56 RefPtr<TestArrayBuffer> m_arrayBuffer; | 56 RefPtr<TestArrayBuffer> m_arrayBuffer; |
| 57 RefPtr<TestArrayBufferView> m_arrayBufferView; | 57 RefPtr<TestArrayBufferView> m_arrayBufferView; |
| 58 Dictionary m_dictionary; | 58 Dictionary m_dictionary; |
| 59 | 59 |
| 60 friend v8::Handle<v8::Value> toV8(const ArrayBufferOrArrayBufferViewOrDictio
nary&, v8::Handle<v8::Object>, v8::Isolate*); | 60 friend v8::Local<v8::Value> toV8(const ArrayBufferOrArrayBufferViewOrDiction
ary&, v8::Local<v8::Object>, v8::Isolate*); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class V8ArrayBufferOrArrayBufferViewOrDictionary final { | 63 class V8ArrayBufferOrArrayBufferViewOrDictionary final { |
| 64 public: | 64 public: |
| 65 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, ArrayBufferOrArrayBu
fferViewOrDictionary&, ExceptionState&); | 65 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, ArrayBufferOrArrayBuf
ferViewOrDictionary&, ExceptionState&); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 v8::Handle<v8::Value> toV8(const ArrayBufferOrArrayBufferViewOrDictionary&, v8::
Handle<v8::Object>, v8::Isolate*); | 68 v8::Local<v8::Value> toV8(const ArrayBufferOrArrayBufferViewOrDictionary&, v8::L
ocal<v8::Object>, v8::Isolate*); |
| 69 | 69 |
| 70 template <class CallbackInfo> | 70 template <class CallbackInfo> |
| 71 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ArrayBufferOrArra
yBufferViewOrDictionary& impl) | 71 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ArrayBufferOrArra
yBufferViewOrDictionary& impl) |
| 72 { | 72 { |
| 73 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 73 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 74 } | 74 } |
| 75 | 75 |
| 76 template <> | 76 template <> |
| 77 struct NativeValueTraits<ArrayBufferOrArrayBufferViewOrDictionary> { | 77 struct NativeValueTraits<ArrayBufferOrArrayBufferViewOrDictionary> { |
| 78 static ArrayBufferOrArrayBufferViewOrDictionary nativeValue(const v8::Handle
<v8::Value>&, v8::Isolate*, ExceptionState&); | 78 static ArrayBufferOrArrayBufferViewOrDictionary nativeValue(const v8::Local<
v8::Value>&, v8::Isolate*, ExceptionState&); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 class BooleanOrStringOrUnrestrictedDouble final { | 81 class BooleanOrStringOrUnrestrictedDouble final { |
| 82 ALLOW_ONLY_INLINE_ALLOCATION(); | 82 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 83 public: | 83 public: |
| 84 BooleanOrStringOrUnrestrictedDouble(); | 84 BooleanOrStringOrUnrestrictedDouble(); |
| 85 bool isNull() const { return m_type == SpecificTypeNone; } | 85 bool isNull() const { return m_type == SpecificTypeNone; } |
| 86 | 86 |
| 87 bool isBoolean() const { return m_type == SpecificTypeBoolean; } | 87 bool isBoolean() const { return m_type == SpecificTypeBoolean; } |
| 88 bool getAsBoolean() const; | 88 bool getAsBoolean() const; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 102 SpecificTypeBoolean, | 102 SpecificTypeBoolean, |
| 103 SpecificTypeString, | 103 SpecificTypeString, |
| 104 SpecificTypeUnrestrictedDouble, | 104 SpecificTypeUnrestrictedDouble, |
| 105 }; | 105 }; |
| 106 SpecificTypes m_type; | 106 SpecificTypes m_type; |
| 107 | 107 |
| 108 bool m_boolean; | 108 bool m_boolean; |
| 109 String m_string; | 109 String m_string; |
| 110 double m_unrestrictedDouble; | 110 double m_unrestrictedDouble; |
| 111 | 111 |
| 112 friend v8::Handle<v8::Value> toV8(const BooleanOrStringOrUnrestrictedDouble&
, v8::Handle<v8::Object>, v8::Isolate*); | 112 friend v8::Local<v8::Value> toV8(const BooleanOrStringOrUnrestrictedDouble&,
v8::Local<v8::Object>, v8::Isolate*); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 class V8BooleanOrStringOrUnrestrictedDouble final { | 115 class V8BooleanOrStringOrUnrestrictedDouble final { |
| 116 public: | 116 public: |
| 117 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, BooleanOrStringOrUnr
estrictedDouble&, ExceptionState&); | 117 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, BooleanOrStringOrUnre
strictedDouble&, ExceptionState&); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 v8::Handle<v8::Value> toV8(const BooleanOrStringOrUnrestrictedDouble&, v8::Handl
e<v8::Object>, v8::Isolate*); | 120 v8::Local<v8::Value> toV8(const BooleanOrStringOrUnrestrictedDouble&, v8::Local<
v8::Object>, v8::Isolate*); |
| 121 | 121 |
| 122 template <class CallbackInfo> | 122 template <class CallbackInfo> |
| 123 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrStringOr
UnrestrictedDouble& impl) | 123 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrStringOr
UnrestrictedDouble& impl) |
| 124 { | 124 { |
| 125 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 125 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 126 } | 126 } |
| 127 | 127 |
| 128 template <> | 128 template <> |
| 129 struct NativeValueTraits<BooleanOrStringOrUnrestrictedDouble> { | 129 struct NativeValueTraits<BooleanOrStringOrUnrestrictedDouble> { |
| 130 static BooleanOrStringOrUnrestrictedDouble nativeValue(const v8::Handle<v8::
Value>&, v8::Isolate*, ExceptionState&); | 130 static BooleanOrStringOrUnrestrictedDouble nativeValue(const v8::Local<v8::V
alue>&, v8::Isolate*, ExceptionState&); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 class DoubleOrString final { | 133 class DoubleOrString final { |
| 134 ALLOW_ONLY_INLINE_ALLOCATION(); | 134 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 135 public: | 135 public: |
| 136 DoubleOrString(); | 136 DoubleOrString(); |
| 137 bool isNull() const { return m_type == SpecificTypeNone; } | 137 bool isNull() const { return m_type == SpecificTypeNone; } |
| 138 | 138 |
| 139 bool isDouble() const { return m_type == SpecificTypeDouble; } | 139 bool isDouble() const { return m_type == SpecificTypeDouble; } |
| 140 double getAsDouble() const; | 140 double getAsDouble() const; |
| 141 void setDouble(double); | 141 void setDouble(double); |
| 142 | 142 |
| 143 bool isString() const { return m_type == SpecificTypeString; } | 143 bool isString() const { return m_type == SpecificTypeString; } |
| 144 String getAsString() const; | 144 String getAsString() const; |
| 145 void setString(String); | 145 void setString(String); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 enum SpecificTypes { | 148 enum SpecificTypes { |
| 149 SpecificTypeNone, | 149 SpecificTypeNone, |
| 150 SpecificTypeDouble, | 150 SpecificTypeDouble, |
| 151 SpecificTypeString, | 151 SpecificTypeString, |
| 152 }; | 152 }; |
| 153 SpecificTypes m_type; | 153 SpecificTypes m_type; |
| 154 | 154 |
| 155 double m_double; | 155 double m_double; |
| 156 String m_string; | 156 String m_string; |
| 157 | 157 |
| 158 friend v8::Handle<v8::Value> toV8(const DoubleOrString&, v8::Handle<v8::Obje
ct>, v8::Isolate*); | 158 friend v8::Local<v8::Value> toV8(const DoubleOrString&, v8::Local<v8::Object
>, v8::Isolate*); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 class V8DoubleOrString final { | 161 class V8DoubleOrString final { |
| 162 public: | 162 public: |
| 163 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, DoubleOrString&, Exc
eptionState&); | 163 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, DoubleOrString&, Exce
ptionState&); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 v8::Handle<v8::Value> toV8(const DoubleOrString&, v8::Handle<v8::Object>, v8::Is
olate*); | 166 v8::Local<v8::Value> toV8(const DoubleOrString&, v8::Local<v8::Object>, v8::Isol
ate*); |
| 167 | 167 |
| 168 template <class CallbackInfo> | 168 template <class CallbackInfo> |
| 169 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, DoubleOrString& i
mpl) | 169 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, DoubleOrString& i
mpl) |
| 170 { | 170 { |
| 171 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 171 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 172 } | 172 } |
| 173 | 173 |
| 174 template <> | 174 template <> |
| 175 struct NativeValueTraits<DoubleOrString> { | 175 struct NativeValueTraits<DoubleOrString> { |
| 176 static DoubleOrString nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*
, ExceptionState&); | 176 static DoubleOrString nativeValue(const v8::Local<v8::Value>&, v8::Isolate*,
ExceptionState&); |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 class NodeOrNodeList final { | 179 class NodeOrNodeList final { |
| 180 ALLOW_ONLY_INLINE_ALLOCATION(); | 180 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 181 public: | 181 public: |
| 182 NodeOrNodeList(); | 182 NodeOrNodeList(); |
| 183 bool isNull() const { return m_type == SpecificTypeNone; } | 183 bool isNull() const { return m_type == SpecificTypeNone; } |
| 184 | 184 |
| 185 bool isNode() const { return m_type == SpecificTypeNode; } | 185 bool isNode() const { return m_type == SpecificTypeNode; } |
| 186 PassRefPtrWillBeRawPtr<Node> getAsNode() const; | 186 PassRefPtrWillBeRawPtr<Node> getAsNode() const; |
| 187 void setNode(PassRefPtrWillBeRawPtr<Node>); | 187 void setNode(PassRefPtrWillBeRawPtr<Node>); |
| 188 | 188 |
| 189 bool isNodeList() const { return m_type == SpecificTypeNodeList; } | 189 bool isNodeList() const { return m_type == SpecificTypeNodeList; } |
| 190 PassRefPtrWillBeRawPtr<NodeList> getAsNodeList() const; | 190 PassRefPtrWillBeRawPtr<NodeList> getAsNodeList() const; |
| 191 void setNodeList(PassRefPtrWillBeRawPtr<NodeList>); | 191 void setNodeList(PassRefPtrWillBeRawPtr<NodeList>); |
| 192 | 192 |
| 193 void trace(Visitor*); | 193 void trace(Visitor*); |
| 194 | 194 |
| 195 private: | 195 private: |
| 196 enum SpecificTypes { | 196 enum SpecificTypes { |
| 197 SpecificTypeNone, | 197 SpecificTypeNone, |
| 198 SpecificTypeNode, | 198 SpecificTypeNode, |
| 199 SpecificTypeNodeList, | 199 SpecificTypeNodeList, |
| 200 }; | 200 }; |
| 201 SpecificTypes m_type; | 201 SpecificTypes m_type; |
| 202 | 202 |
| 203 RefPtrWillBeMember<Node> m_node; | 203 RefPtrWillBeMember<Node> m_node; |
| 204 RefPtrWillBeMember<NodeList> m_nodeList; | 204 RefPtrWillBeMember<NodeList> m_nodeList; |
| 205 | 205 |
| 206 friend v8::Handle<v8::Value> toV8(const NodeOrNodeList&, v8::Handle<v8::Obje
ct>, v8::Isolate*); | 206 friend v8::Local<v8::Value> toV8(const NodeOrNodeList&, v8::Local<v8::Object
>, v8::Isolate*); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 class V8NodeOrNodeList final { | 209 class V8NodeOrNodeList final { |
| 210 public: | 210 public: |
| 211 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, NodeOrNodeList&, Exc
eptionState&); | 211 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, NodeOrNodeList&, Exce
ptionState&); |
| 212 }; | 212 }; |
| 213 | 213 |
| 214 v8::Handle<v8::Value> toV8(const NodeOrNodeList&, v8::Handle<v8::Object>, v8::Is
olate*); | 214 v8::Local<v8::Value> toV8(const NodeOrNodeList&, v8::Local<v8::Object>, v8::Isol
ate*); |
| 215 | 215 |
| 216 template <class CallbackInfo> | 216 template <class CallbackInfo> |
| 217 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, NodeOrNodeList& i
mpl) | 217 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, NodeOrNodeList& i
mpl) |
| 218 { | 218 { |
| 219 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 219 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 220 } | 220 } |
| 221 | 221 |
| 222 template <> | 222 template <> |
| 223 struct NativeValueTraits<NodeOrNodeList> { | 223 struct NativeValueTraits<NodeOrNodeList> { |
| 224 static NodeOrNodeList nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*
, ExceptionState&); | 224 static NodeOrNodeList nativeValue(const v8::Local<v8::Value>&, v8::Isolate*,
ExceptionState&); |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 class StringOrArrayBufferOrArrayBufferView final { | 227 class StringOrArrayBufferOrArrayBufferView final { |
| 228 ALLOW_ONLY_INLINE_ALLOCATION(); | 228 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 229 public: | 229 public: |
| 230 StringOrArrayBufferOrArrayBufferView(); | 230 StringOrArrayBufferOrArrayBufferView(); |
| 231 bool isNull() const { return m_type == SpecificTypeNone; } | 231 bool isNull() const { return m_type == SpecificTypeNone; } |
| 232 | 232 |
| 233 bool isString() const { return m_type == SpecificTypeString; } | 233 bool isString() const { return m_type == SpecificTypeString; } |
| 234 String getAsString() const; | 234 String getAsString() const; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 248 SpecificTypeString, | 248 SpecificTypeString, |
| 249 SpecificTypeArrayBuffer, | 249 SpecificTypeArrayBuffer, |
| 250 SpecificTypeArrayBufferView, | 250 SpecificTypeArrayBufferView, |
| 251 }; | 251 }; |
| 252 SpecificTypes m_type; | 252 SpecificTypes m_type; |
| 253 | 253 |
| 254 String m_string; | 254 String m_string; |
| 255 RefPtr<TestArrayBuffer> m_arrayBuffer; | 255 RefPtr<TestArrayBuffer> m_arrayBuffer; |
| 256 RefPtr<TestArrayBufferView> m_arrayBufferView; | 256 RefPtr<TestArrayBufferView> m_arrayBufferView; |
| 257 | 257 |
| 258 friend v8::Handle<v8::Value> toV8(const StringOrArrayBufferOrArrayBufferView
&, v8::Handle<v8::Object>, v8::Isolate*); | 258 friend v8::Local<v8::Value> toV8(const StringOrArrayBufferOrArrayBufferView&
, v8::Local<v8::Object>, v8::Isolate*); |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 class V8StringOrArrayBufferOrArrayBufferView final { | 261 class V8StringOrArrayBufferOrArrayBufferView final { |
| 262 public: | 262 public: |
| 263 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, StringOrArrayBufferO
rArrayBufferView&, ExceptionState&); | 263 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, StringOrArrayBufferOr
ArrayBufferView&, ExceptionState&); |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 v8::Handle<v8::Value> toV8(const StringOrArrayBufferOrArrayBufferView&, v8::Hand
le<v8::Object>, v8::Isolate*); | 266 v8::Local<v8::Value> toV8(const StringOrArrayBufferOrArrayBufferView&, v8::Local
<v8::Object>, v8::Isolate*); |
| 267 | 267 |
| 268 template <class CallbackInfo> | 268 template <class CallbackInfo> |
| 269 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrArrayBuff
erOrArrayBufferView& impl) | 269 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrArrayBuff
erOrArrayBufferView& impl) |
| 270 { | 270 { |
| 271 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 271 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 272 } | 272 } |
| 273 | 273 |
| 274 template <> | 274 template <> |
| 275 struct NativeValueTraits<StringOrArrayBufferOrArrayBufferView> { | 275 struct NativeValueTraits<StringOrArrayBufferOrArrayBufferView> { |
| 276 static StringOrArrayBufferOrArrayBufferView nativeValue(const v8::Handle<v8:
:Value>&, v8::Isolate*, ExceptionState&); | 276 static StringOrArrayBufferOrArrayBufferView nativeValue(const v8::Local<v8::
Value>&, v8::Isolate*, ExceptionState&); |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 class StringOrDouble final { | 279 class StringOrDouble final { |
| 280 ALLOW_ONLY_INLINE_ALLOCATION(); | 280 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 281 public: | 281 public: |
| 282 StringOrDouble(); | 282 StringOrDouble(); |
| 283 bool isNull() const { return m_type == SpecificTypeNone; } | 283 bool isNull() const { return m_type == SpecificTypeNone; } |
| 284 | 284 |
| 285 bool isString() const { return m_type == SpecificTypeString; } | 285 bool isString() const { return m_type == SpecificTypeString; } |
| 286 String getAsString() const; | 286 String getAsString() const; |
| 287 void setString(String); | 287 void setString(String); |
| 288 | 288 |
| 289 bool isDouble() const { return m_type == SpecificTypeDouble; } | 289 bool isDouble() const { return m_type == SpecificTypeDouble; } |
| 290 double getAsDouble() const; | 290 double getAsDouble() const; |
| 291 void setDouble(double); | 291 void setDouble(double); |
| 292 | 292 |
| 293 private: | 293 private: |
| 294 enum SpecificTypes { | 294 enum SpecificTypes { |
| 295 SpecificTypeNone, | 295 SpecificTypeNone, |
| 296 SpecificTypeString, | 296 SpecificTypeString, |
| 297 SpecificTypeDouble, | 297 SpecificTypeDouble, |
| 298 }; | 298 }; |
| 299 SpecificTypes m_type; | 299 SpecificTypes m_type; |
| 300 | 300 |
| 301 String m_string; | 301 String m_string; |
| 302 double m_double; | 302 double m_double; |
| 303 | 303 |
| 304 friend v8::Handle<v8::Value> toV8(const StringOrDouble&, v8::Handle<v8::Obje
ct>, v8::Isolate*); | 304 friend v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object
>, v8::Isolate*); |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 class V8StringOrDouble final { | 307 class V8StringOrDouble final { |
| 308 public: | 308 public: |
| 309 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, StringOrDouble&, Exc
eptionState&); | 309 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, StringOrDouble&, Exce
ptionState&); |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 v8::Handle<v8::Value> toV8(const StringOrDouble&, v8::Handle<v8::Object>, v8::Is
olate*); | 312 v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isol
ate*); |
| 313 | 313 |
| 314 template <class CallbackInfo> | 314 template <class CallbackInfo> |
| 315 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& i
mpl) | 315 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& i
mpl) |
| 316 { | 316 { |
| 317 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 317 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 318 } | 318 } |
| 319 | 319 |
| 320 template <> | 320 template <> |
| 321 struct NativeValueTraits<StringOrDouble> { | 321 struct NativeValueTraits<StringOrDouble> { |
| 322 static StringOrDouble nativeValue(const v8::Handle<v8::Value>&, v8::Isolate*
, ExceptionState&); | 322 static StringOrDouble nativeValue(const v8::Local<v8::Value>&, v8::Isolate*,
ExceptionState&); |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 class TestInterface2OrUint8Array final { | 325 class TestInterface2OrUint8Array final { |
| 326 ALLOW_ONLY_INLINE_ALLOCATION(); | 326 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 327 public: | 327 public: |
| 328 TestInterface2OrUint8Array(); | 328 TestInterface2OrUint8Array(); |
| 329 bool isNull() const { return m_type == SpecificTypeNone; } | 329 bool isNull() const { return m_type == SpecificTypeNone; } |
| 330 | 330 |
| 331 bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2;
} | 331 bool isTestInterface2() const { return m_type == SpecificTypeTestInterface2;
} |
| 332 PassRefPtr<TestInterface2> getAsTestInterface2() const; | 332 PassRefPtr<TestInterface2> getAsTestInterface2() const; |
| 333 void setTestInterface2(PassRefPtr<TestInterface2>); | 333 void setTestInterface2(PassRefPtr<TestInterface2>); |
| 334 | 334 |
| 335 bool isUint8Array() const { return m_type == SpecificTypeUint8Array; } | 335 bool isUint8Array() const { return m_type == SpecificTypeUint8Array; } |
| 336 PassRefPtr<DOMUint8Array> getAsUint8Array() const; | 336 PassRefPtr<DOMUint8Array> getAsUint8Array() const; |
| 337 void setUint8Array(PassRefPtr<DOMUint8Array>); | 337 void setUint8Array(PassRefPtr<DOMUint8Array>); |
| 338 | 338 |
| 339 private: | 339 private: |
| 340 enum SpecificTypes { | 340 enum SpecificTypes { |
| 341 SpecificTypeNone, | 341 SpecificTypeNone, |
| 342 SpecificTypeTestInterface2, | 342 SpecificTypeTestInterface2, |
| 343 SpecificTypeUint8Array, | 343 SpecificTypeUint8Array, |
| 344 }; | 344 }; |
| 345 SpecificTypes m_type; | 345 SpecificTypes m_type; |
| 346 | 346 |
| 347 RefPtr<TestInterface2> m_testInterface2; | 347 RefPtr<TestInterface2> m_testInterface2; |
| 348 RefPtr<DOMUint8Array> m_uint8Array; | 348 RefPtr<DOMUint8Array> m_uint8Array; |
| 349 | 349 |
| 350 friend v8::Handle<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Han
dle<v8::Object>, v8::Isolate*); | 350 friend v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Loca
l<v8::Object>, v8::Isolate*); |
| 351 }; | 351 }; |
| 352 | 352 |
| 353 class V8TestInterface2OrUint8Array final { | 353 class V8TestInterface2OrUint8Array final { |
| 354 public: | 354 public: |
| 355 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterface2OrUint
8Array&, ExceptionState&); | 355 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterface2OrUint8
Array&, ExceptionState&); |
| 356 }; | 356 }; |
| 357 | 357 |
| 358 v8::Handle<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Handle<v8::Obj
ect>, v8::Isolate*); | 358 v8::Local<v8::Value> toV8(const TestInterface2OrUint8Array&, v8::Local<v8::Objec
t>, v8::Isolate*); |
| 359 | 359 |
| 360 template <class CallbackInfo> | 360 template <class CallbackInfo> |
| 361 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrU
int8Array& impl) | 361 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrU
int8Array& impl) |
| 362 { | 362 { |
| 363 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 363 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 364 } | 364 } |
| 365 | 365 |
| 366 template <> | 366 template <> |
| 367 struct NativeValueTraits<TestInterface2OrUint8Array> { | 367 struct NativeValueTraits<TestInterface2OrUint8Array> { |
| 368 static TestInterface2OrUint8Array nativeValue(const v8::Handle<v8::Value>&,
v8::Isolate*, ExceptionState&); | 368 static TestInterface2OrUint8Array nativeValue(const v8::Local<v8::Value>&, v
8::Isolate*, ExceptionState&); |
| 369 }; | 369 }; |
| 370 | 370 |
| 371 class TestInterfaceGarbageCollectedOrString final { | 371 class TestInterfaceGarbageCollectedOrString final { |
| 372 ALLOW_ONLY_INLINE_ALLOCATION(); | 372 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 373 public: | 373 public: |
| 374 TestInterfaceGarbageCollectedOrString(); | 374 TestInterfaceGarbageCollectedOrString(); |
| 375 bool isNull() const { return m_type == SpecificTypeNone; } | 375 bool isNull() const { return m_type == SpecificTypeNone; } |
| 376 | 376 |
| 377 bool isTestInterfaceGarbageCollected() const { return m_type == SpecificType
TestInterfaceGarbageCollected; } | 377 bool isTestInterfaceGarbageCollected() const { return m_type == SpecificType
TestInterfaceGarbageCollected; } |
| 378 TestInterfaceGarbageCollected* getAsTestInterfaceGarbageCollected() const; | 378 TestInterfaceGarbageCollected* getAsTestInterfaceGarbageCollected() const; |
| 379 void setTestInterfaceGarbageCollected(TestInterfaceGarbageCollected*); | 379 void setTestInterfaceGarbageCollected(TestInterfaceGarbageCollected*); |
| 380 | 380 |
| 381 bool isString() const { return m_type == SpecificTypeString; } | 381 bool isString() const { return m_type == SpecificTypeString; } |
| 382 String getAsString() const; | 382 String getAsString() const; |
| 383 void setString(String); | 383 void setString(String); |
| 384 | 384 |
| 385 void trace(Visitor*); | 385 void trace(Visitor*); |
| 386 | 386 |
| 387 private: | 387 private: |
| 388 enum SpecificTypes { | 388 enum SpecificTypes { |
| 389 SpecificTypeNone, | 389 SpecificTypeNone, |
| 390 SpecificTypeTestInterfaceGarbageCollected, | 390 SpecificTypeTestInterfaceGarbageCollected, |
| 391 SpecificTypeString, | 391 SpecificTypeString, |
| 392 }; | 392 }; |
| 393 SpecificTypes m_type; | 393 SpecificTypes m_type; |
| 394 | 394 |
| 395 Member<TestInterfaceGarbageCollected> m_testInterfaceGarbageCollected; | 395 Member<TestInterfaceGarbageCollected> m_testInterfaceGarbageCollected; |
| 396 String m_string; | 396 String m_string; |
| 397 | 397 |
| 398 friend v8::Handle<v8::Value> toV8(const TestInterfaceGarbageCollectedOrStrin
g&, v8::Handle<v8::Object>, v8::Isolate*); | 398 friend v8::Local<v8::Value> toV8(const TestInterfaceGarbageCollectedOrString
&, v8::Local<v8::Object>, v8::Isolate*); |
| 399 }; | 399 }; |
| 400 | 400 |
| 401 class V8TestInterfaceGarbageCollectedOrString final { | 401 class V8TestInterfaceGarbageCollectedOrString final { |
| 402 public: | 402 public: |
| 403 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterfaceGarbage
CollectedOrString&, ExceptionState&); | 403 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterfaceGarbageC
ollectedOrString&, ExceptionState&); |
| 404 }; | 404 }; |
| 405 | 405 |
| 406 v8::Handle<v8::Value> toV8(const TestInterfaceGarbageCollectedOrString&, v8::Han
dle<v8::Object>, v8::Isolate*); | 406 v8::Local<v8::Value> toV8(const TestInterfaceGarbageCollectedOrString&, v8::Loca
l<v8::Object>, v8::Isolate*); |
| 407 | 407 |
| 408 template <class CallbackInfo> | 408 template <class CallbackInfo> |
| 409 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceGarb
ageCollectedOrString& impl) | 409 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceGarb
ageCollectedOrString& impl) |
| 410 { | 410 { |
| 411 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 411 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 412 } | 412 } |
| 413 | 413 |
| 414 template <> | 414 template <> |
| 415 struct NativeValueTraits<TestInterfaceGarbageCollectedOrString> { | 415 struct NativeValueTraits<TestInterfaceGarbageCollectedOrString> { |
| 416 static TestInterfaceGarbageCollectedOrString nativeValue(const v8::Handle<v8
::Value>&, v8::Isolate*, ExceptionState&); | 416 static TestInterfaceGarbageCollectedOrString nativeValue(const v8::Local<v8:
:Value>&, v8::Isolate*, ExceptionState&); |
| 417 }; | 417 }; |
| 418 | 418 |
| 419 class TestInterfaceOrLong final { | 419 class TestInterfaceOrLong final { |
| 420 ALLOW_ONLY_INLINE_ALLOCATION(); | 420 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 421 public: | 421 public: |
| 422 TestInterfaceOrLong(); | 422 TestInterfaceOrLong(); |
| 423 bool isNull() const { return m_type == SpecificTypeNone; } | 423 bool isNull() const { return m_type == SpecificTypeNone; } |
| 424 | 424 |
| 425 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } | 425 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } |
| 426 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; | 426 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; |
| 427 void setTestInterface(PassRefPtr<TestInterfaceImplementation>); | 427 void setTestInterface(PassRefPtr<TestInterfaceImplementation>); |
| 428 | 428 |
| 429 bool isLong() const { return m_type == SpecificTypeLong; } | 429 bool isLong() const { return m_type == SpecificTypeLong; } |
| 430 int getAsLong() const; | 430 int getAsLong() const; |
| 431 void setLong(int); | 431 void setLong(int); |
| 432 | 432 |
| 433 private: | 433 private: |
| 434 enum SpecificTypes { | 434 enum SpecificTypes { |
| 435 SpecificTypeNone, | 435 SpecificTypeNone, |
| 436 SpecificTypeTestInterface, | 436 SpecificTypeTestInterface, |
| 437 SpecificTypeLong, | 437 SpecificTypeLong, |
| 438 }; | 438 }; |
| 439 SpecificTypes m_type; | 439 SpecificTypes m_type; |
| 440 | 440 |
| 441 RefPtr<TestInterfaceImplementation> m_testInterface; | 441 RefPtr<TestInterfaceImplementation> m_testInterface; |
| 442 int m_long; | 442 int m_long; |
| 443 | 443 |
| 444 friend v8::Handle<v8::Value> toV8(const TestInterfaceOrLong&, v8::Handle<v8:
:Object>, v8::Isolate*); | 444 friend v8::Local<v8::Value> toV8(const TestInterfaceOrLong&, v8::Local<v8::O
bject>, v8::Isolate*); |
| 445 }; | 445 }; |
| 446 | 446 |
| 447 class V8TestInterfaceOrLong final { | 447 class V8TestInterfaceOrLong final { |
| 448 public: | 448 public: |
| 449 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterfaceOrLong&
, ExceptionState&); | 449 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterfaceOrLong&,
ExceptionState&); |
| 450 }; | 450 }; |
| 451 | 451 |
| 452 v8::Handle<v8::Value> toV8(const TestInterfaceOrLong&, v8::Handle<v8::Object>, v
8::Isolate*); | 452 v8::Local<v8::Value> toV8(const TestInterfaceOrLong&, v8::Local<v8::Object>, v8:
:Isolate*); |
| 453 | 453 |
| 454 template <class CallbackInfo> | 454 template <class CallbackInfo> |
| 455 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrLo
ng& impl) | 455 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrLo
ng& impl) |
| 456 { | 456 { |
| 457 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 457 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 458 } | 458 } |
| 459 | 459 |
| 460 template <> | 460 template <> |
| 461 struct NativeValueTraits<TestInterfaceOrLong> { | 461 struct NativeValueTraits<TestInterfaceOrLong> { |
| 462 static TestInterfaceOrLong nativeValue(const v8::Handle<v8::Value>&, v8::Iso
late*, ExceptionState&); | 462 static TestInterfaceOrLong nativeValue(const v8::Local<v8::Value>&, v8::Isol
ate*, ExceptionState&); |
| 463 }; | 463 }; |
| 464 | 464 |
| 465 class TestInterfaceOrTestInterfaceEmpty final { | 465 class TestInterfaceOrTestInterfaceEmpty final { |
| 466 ALLOW_ONLY_INLINE_ALLOCATION(); | 466 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 467 public: | 467 public: |
| 468 TestInterfaceOrTestInterfaceEmpty(); | 468 TestInterfaceOrTestInterfaceEmpty(); |
| 469 bool isNull() const { return m_type == SpecificTypeNone; } | 469 bool isNull() const { return m_type == SpecificTypeNone; } |
| 470 | 470 |
| 471 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } | 471 bool isTestInterface() const { return m_type == SpecificTypeTestInterface; } |
| 472 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; | 472 PassRefPtr<TestInterfaceImplementation> getAsTestInterface() const; |
| 473 void setTestInterface(PassRefPtr<TestInterfaceImplementation>); | 473 void setTestInterface(PassRefPtr<TestInterfaceImplementation>); |
| 474 | 474 |
| 475 bool isTestInterfaceEmpty() const { return m_type == SpecificTypeTestInterfa
ceEmpty; } | 475 bool isTestInterfaceEmpty() const { return m_type == SpecificTypeTestInterfa
ceEmpty; } |
| 476 PassRefPtr<TestInterfaceEmpty> getAsTestInterfaceEmpty() const; | 476 PassRefPtr<TestInterfaceEmpty> getAsTestInterfaceEmpty() const; |
| 477 void setTestInterfaceEmpty(PassRefPtr<TestInterfaceEmpty>); | 477 void setTestInterfaceEmpty(PassRefPtr<TestInterfaceEmpty>); |
| 478 | 478 |
| 479 private: | 479 private: |
| 480 enum SpecificTypes { | 480 enum SpecificTypes { |
| 481 SpecificTypeNone, | 481 SpecificTypeNone, |
| 482 SpecificTypeTestInterface, | 482 SpecificTypeTestInterface, |
| 483 SpecificTypeTestInterfaceEmpty, | 483 SpecificTypeTestInterfaceEmpty, |
| 484 }; | 484 }; |
| 485 SpecificTypes m_type; | 485 SpecificTypes m_type; |
| 486 | 486 |
| 487 RefPtr<TestInterfaceImplementation> m_testInterface; | 487 RefPtr<TestInterfaceImplementation> m_testInterface; |
| 488 RefPtr<TestInterfaceEmpty> m_testInterfaceEmpty; | 488 RefPtr<TestInterfaceEmpty> m_testInterfaceEmpty; |
| 489 | 489 |
| 490 friend v8::Handle<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&,
v8::Handle<v8::Object>, v8::Isolate*); | 490 friend v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&, v
8::Local<v8::Object>, v8::Isolate*); |
| 491 }; | 491 }; |
| 492 | 492 |
| 493 class V8TestInterfaceOrTestInterfaceEmpty final { | 493 class V8TestInterfaceOrTestInterfaceEmpty final { |
| 494 public: | 494 public: |
| 495 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterfaceOrTestI
nterfaceEmpty&, ExceptionState&); | 495 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterfaceOrTestIn
terfaceEmpty&, ExceptionState&); |
| 496 }; | 496 }; |
| 497 | 497 |
| 498 v8::Handle<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&, v8::Handle<
v8::Object>, v8::Isolate*); | 498 v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty&, v8::Local<v8
::Object>, v8::Isolate*); |
| 499 | 499 |
| 500 template <class CallbackInfo> | 500 template <class CallbackInfo> |
| 501 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe
stInterfaceEmpty& impl) | 501 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe
stInterfaceEmpty& impl) |
| 502 { | 502 { |
| 503 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 503 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 504 } | 504 } |
| 505 | 505 |
| 506 template <> | 506 template <> |
| 507 struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> { | 507 struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> { |
| 508 static TestInterfaceOrTestInterfaceEmpty nativeValue(const v8::Handle<v8::Va
lue>&, v8::Isolate*, ExceptionState&); | 508 static TestInterfaceOrTestInterfaceEmpty nativeValue(const v8::Local<v8::Val
ue>&, v8::Isolate*, ExceptionState&); |
| 509 }; | 509 }; |
| 510 | 510 |
| 511 class TestInterfaceWillBeGarbageCollectedOrTestDictionary final { | 511 class TestInterfaceWillBeGarbageCollectedOrTestDictionary final { |
| 512 ALLOW_ONLY_INLINE_ALLOCATION(); | 512 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 513 public: | 513 public: |
| 514 TestInterfaceWillBeGarbageCollectedOrTestDictionary(); | 514 TestInterfaceWillBeGarbageCollectedOrTestDictionary(); |
| 515 bool isNull() const { return m_type == SpecificTypeNone; } | 515 bool isNull() const { return m_type == SpecificTypeNone; } |
| 516 | 516 |
| 517 bool isTestInterfaceWillBeGarbageCollected() const { return m_type == Specif
icTypeTestInterfaceWillBeGarbageCollected; } | 517 bool isTestInterfaceWillBeGarbageCollected() const { return m_type == Specif
icTypeTestInterfaceWillBeGarbageCollected; } |
| 518 PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> getAsTestInterfa
ceWillBeGarbageCollected() const; | 518 PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> getAsTestInterfa
ceWillBeGarbageCollected() const; |
| 519 void setTestInterfaceWillBeGarbageCollected(PassRefPtrWillBeRawPtr<TestInter
faceWillBeGarbageCollected>); | 519 void setTestInterfaceWillBeGarbageCollected(PassRefPtrWillBeRawPtr<TestInter
faceWillBeGarbageCollected>); |
| 520 | 520 |
| 521 bool isTestDictionary() const { return m_type == SpecificTypeTestDictionary;
} | 521 bool isTestDictionary() const { return m_type == SpecificTypeTestDictionary;
} |
| 522 TestDictionary getAsTestDictionary() const; | 522 TestDictionary getAsTestDictionary() const; |
| 523 void setTestDictionary(TestDictionary); | 523 void setTestDictionary(TestDictionary); |
| 524 | 524 |
| 525 void trace(Visitor*); | 525 void trace(Visitor*); |
| 526 | 526 |
| 527 private: | 527 private: |
| 528 enum SpecificTypes { | 528 enum SpecificTypes { |
| 529 SpecificTypeNone, | 529 SpecificTypeNone, |
| 530 SpecificTypeTestInterfaceWillBeGarbageCollected, | 530 SpecificTypeTestInterfaceWillBeGarbageCollected, |
| 531 SpecificTypeTestDictionary, | 531 SpecificTypeTestDictionary, |
| 532 }; | 532 }; |
| 533 SpecificTypes m_type; | 533 SpecificTypes m_type; |
| 534 | 534 |
| 535 RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> m_testInterfaceWillB
eGarbageCollected; | 535 RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> m_testInterfaceWillB
eGarbageCollected; |
| 536 TestDictionary m_testDictionary; | 536 TestDictionary m_testDictionary; |
| 537 | 537 |
| 538 friend v8::Handle<v8::Value> toV8(const TestInterfaceWillBeGarbageCollectedO
rTestDictionary&, v8::Handle<v8::Object>, v8::Isolate*); | 538 friend v8::Local<v8::Value> toV8(const TestInterfaceWillBeGarbageCollectedOr
TestDictionary&, v8::Local<v8::Object>, v8::Isolate*); |
| 539 }; | 539 }; |
| 540 | 540 |
| 541 class V8TestInterfaceWillBeGarbageCollectedOrTestDictionary final { | 541 class V8TestInterfaceWillBeGarbageCollectedOrTestDictionary final { |
| 542 public: | 542 public: |
| 543 static void toImpl(v8::Isolate*, v8::Handle<v8::Value>, TestInterfaceWillBeG
arbageCollectedOrTestDictionary&, ExceptionState&); | 543 static void toImpl(v8::Isolate*, v8::Local<v8::Value>, TestInterfaceWillBeGa
rbageCollectedOrTestDictionary&, ExceptionState&); |
| 544 }; | 544 }; |
| 545 | 545 |
| 546 v8::Handle<v8::Value> toV8(const TestInterfaceWillBeGarbageCollectedOrTestDictio
nary&, v8::Handle<v8::Object>, v8::Isolate*); | 546 v8::Local<v8::Value> toV8(const TestInterfaceWillBeGarbageCollectedOrTestDiction
ary&, v8::Local<v8::Object>, v8::Isolate*); |
| 547 | 547 |
| 548 template <class CallbackInfo> | 548 template <class CallbackInfo> |
| 549 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceWill
BeGarbageCollectedOrTestDictionary& impl) | 549 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceWill
BeGarbageCollectedOrTestDictionary& impl) |
| 550 { | 550 { |
| 551 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 551 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 552 } | 552 } |
| 553 | 553 |
| 554 template <> | 554 template <> |
| 555 struct NativeValueTraits<TestInterfaceWillBeGarbageCollectedOrTestDictionary> { | 555 struct NativeValueTraits<TestInterfaceWillBeGarbageCollectedOrTestDictionary> { |
| 556 static TestInterfaceWillBeGarbageCollectedOrTestDictionary nativeValue(const
v8::Handle<v8::Value>&, v8::Isolate*, ExceptionState&); | 556 static TestInterfaceWillBeGarbageCollectedOrTestDictionary nativeValue(const
v8::Local<v8::Value>&, v8::Isolate*, ExceptionState&); |
| 557 }; | 557 }; |
| 558 | 558 |
| 559 class V8DoubleOrStringOrNull final { | 559 class V8DoubleOrStringOrNull final { |
| 560 public: | 560 public: |
| 561 static void toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, Doub
leOrString& impl, ExceptionState& exceptionState) | 561 static void toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, Doubl
eOrString& impl, ExceptionState& exceptionState) |
| 562 { | 562 { |
| 563 if (isUndefinedOrNull(v8Value)) | 563 if (isUndefinedOrNull(v8Value)) |
| 564 return; | 564 return; |
| 565 V8DoubleOrString::toImpl(isolate, v8Value, impl, exceptionState); | 565 V8DoubleOrString::toImpl(isolate, v8Value, impl, exceptionState); |
| 566 } | 566 } |
| 567 }; | 567 }; |
| 568 | 568 |
| 569 } // namespace blink | 569 } // namespace blink |
| 570 | 570 |
| 571 #endif // UnionTypeCore_h | 571 #endif // UnionTypeCore_h |
| OLD | NEW |