| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 template <typename T, size_t inlineCapacity, typename Allocator> | 263 template <typename T, size_t inlineCapacity, typename Allocator> |
| 264 struct V8ValueTraits<WTF::Vector<T, inlineCapacity, Allocator> > { | 264 struct V8ValueTraits<WTF::Vector<T, inlineCapacity, Allocator> > { |
| 265 static v8::Handle<v8::Value> toV8Value(const Vector<T, inlineCapacity, Alloc
ator>& value, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 265 static v8::Handle<v8::Value> toV8Value(const Vector<T, inlineCapacity, Alloc
ator>& value, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 266 { | 266 { |
| 267 return v8ArrayNoInline(value, creationContext, isolate); | 267 return v8ArrayNoInline(value, creationContext, isolate); |
| 268 } | 268 } |
| 269 }; | 269 }; |
| 270 | 270 |
| 271 template <typename T, size_t inlineCapacity> |
| 272 struct V8ValueTraits<HeapVector<T, inlineCapacity> > { |
| 273 static v8::Handle<v8::Value> toV8Value(const HeapVector<T, inlineCapacity>&
value, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 274 { |
| 275 return v8ArrayNoInline(value, creationContext, isolate); |
| 276 } |
| 277 }; |
| 278 |
| 271 template<> | 279 template<> |
| 272 struct V8ValueTraits<String> { | 280 struct V8ValueTraits<String> { |
| 273 static inline v8::Handle<v8::Value> toV8Value(const String& value, v8::Handl
e<v8::Object>, v8::Isolate* isolate) | 281 static inline v8::Handle<v8::Value> toV8Value(const String& value, v8::Handl
e<v8::Object>, v8::Isolate* isolate) |
| 274 { | 282 { |
| 275 return v8String(isolate, value); | 283 return v8String(isolate, value); |
| 276 } | 284 } |
| 277 }; | 285 }; |
| 278 | 286 |
| 279 template<> | 287 template<> |
| 280 struct V8ValueTraits<AtomicString> { | 288 struct V8ValueTraits<AtomicString> { |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 m_block.Reset(); | 996 m_block.Reset(); |
| 989 } | 997 } |
| 990 | 998 |
| 991 private: | 999 private: |
| 992 v8::TryCatch& m_block; | 1000 v8::TryCatch& m_block; |
| 993 }; | 1001 }; |
| 994 | 1002 |
| 995 } // namespace WebCore | 1003 } // namespace WebCore |
| 996 | 1004 |
| 997 #endif // V8Binding_h | 1005 #endif // V8Binding_h |
| OLD | NEW |