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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 // FIXME: Remove the special casing for NodeFilter and XPathNSResolver. | 442 // FIXME: Remove the special casing for NodeFilter and XPathNSResolver. |
443 PassRefPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value>, v8::Isolate*); | 443 PassRefPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value>, v8::Isolate*); |
444 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value>,
v8::Isolate*); | 444 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value>,
v8::Isolate*); |
445 | 445 |
446 template<class T> struct NativeValueTraits; | 446 template<class T> struct NativeValueTraits; |
447 | 447 |
448 template<> | 448 template<> |
449 struct NativeValueTraits<String> { | 449 struct NativeValueTraits<String> { |
450 static inline String nativeValue(const v8::Handle<v8::Value>& value, v8::Iso
late* isolate) | 450 static inline String nativeValue(const v8::Handle<v8::Value>& value, v8::Iso
late* isolate) |
451 { | 451 { |
452 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue,
value, String()); | 452 V8STRINGRESOURCE_PREPARE_RETURN(V8StringResource<>, stringValue, value,
String()); |
453 return stringValue; | 453 return stringValue; |
454 } | 454 } |
455 }; | 455 }; |
456 | 456 |
457 template<> | 457 template<> |
458 struct NativeValueTraits<unsigned> { | 458 struct NativeValueTraits<unsigned> { |
459 static inline unsigned nativeValue(const v8::Handle<v8::Value>& value, v8::I
solate* isolate) | 459 static inline unsigned nativeValue(const v8::Handle<v8::Value>& value, v8::I
solate* isolate) |
460 { | 460 { |
461 return toUInt32(value); | 461 return toUInt32(value); |
462 } | 462 } |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 | 759 |
760 private: | 760 private: |
761 v8::HandleScope m_handleScope; | 761 v8::HandleScope m_handleScope; |
762 v8::Context::Scope m_contextScope; | 762 v8::Context::Scope m_contextScope; |
763 RefPtr<NewScriptState> m_scriptState; | 763 RefPtr<NewScriptState> m_scriptState; |
764 }; | 764 }; |
765 | 765 |
766 } // namespace WebCore | 766 } // namespace WebCore |
767 | 767 |
768 #endif // V8Binding_h | 768 #endif // V8Binding_h |
OLD | NEW |