| 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 } | 739 } |
| 740 | 740 |
| 741 inline v8::Handle<v8::Value> v8DateOrNaN(double value, v8::Isolate* isolate) | 741 inline v8::Handle<v8::Value> v8DateOrNaN(double value, v8::Isolate* isolate) |
| 742 { | 742 { |
| 743 ASSERT(isolate); | 743 ASSERT(isolate); |
| 744 return v8::Date::New(isolate, std::isfinite(value) ? value : std::numeric_li
mits<double>::quiet_NaN()); | 744 return v8::Date::New(isolate, std::isfinite(value) ? value : std::numeric_li
mits<double>::quiet_NaN()); |
| 745 } | 745 } |
| 746 | 746 |
| 747 // FIXME: Remove the special casing for NodeFilter and XPathNSResolver. | 747 // FIXME: Remove the special casing for NodeFilter and XPathNSResolver. |
| 748 PassRefPtrWillBeRawPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value>, v8::Handl
e<v8::Object>, ScriptState*); | 748 PassRefPtrWillBeRawPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value>, v8::Handl
e<v8::Object>, ScriptState*); |
| 749 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value>,
v8::Isolate*); | 749 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Isolate*, v8::Hand
le<v8::Value>); |
| 750 | 750 |
| 751 template<class T> struct NativeValueTraits; | 751 template<class T> struct NativeValueTraits; |
| 752 | 752 |
| 753 bool toV8Sequence(v8::Handle<v8::Value>, uint32_t& length, v8::Isolate*, Excepti
onState&); | 753 bool toV8Sequence(v8::Handle<v8::Value>, uint32_t& length, v8::Isolate*, Excepti
onState&); |
| 754 | 754 |
| 755 // Converts a JavaScript value to an array as per the Web IDL specification: | 755 // Converts a JavaScript value to an array as per the Web IDL specification: |
| 756 // http://www.w3.org/TR/2012/CR-WebIDL-20120419/#es-array | 756 // http://www.w3.org/TR/2012/CR-WebIDL-20120419/#es-array |
| 757 template <class T, class V8T> | 757 template <class T, class V8T> |
| 758 Vector<RefPtr<T> > toRefPtrNativeArrayUnchecked(v8::Local<v8::Value> v8Value, ui
nt32_t length, v8::Isolate* isolate, ExceptionState& exceptionState) | 758 Vector<RefPtr<T> > toRefPtrNativeArrayUnchecked(v8::Local<v8::Value> v8Value, ui
nt32_t length, v8::Isolate* isolate, ExceptionState& exceptionState) |
| 759 { | 759 { |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) | 1199 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) |
| 1200 { | 1200 { |
| 1201 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); | 1201 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); | 1204 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); |
| 1205 | 1205 |
| 1206 } // namespace blink | 1206 } // namespace blink |
| 1207 | 1207 |
| 1208 #endif // V8Binding_h | 1208 #endif // V8Binding_h |
| OLD | NEW |