| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 uint32_t sequenceLength = lengthValue->Int32Value(); | 796 uint32_t sequenceLength = lengthValue->Int32Value(); |
| 797 if (block.HasCaught()) { | 797 if (block.HasCaught()) { |
| 798 exceptionState.rethrowV8Exception(block.Exception()); | 798 exceptionState.rethrowV8Exception(block.Exception()); |
| 799 return false; | 799 return false; |
| 800 } | 800 } |
| 801 | 801 |
| 802 length = sequenceLength; | 802 length = sequenceLength; |
| 803 return true; | 803 return true; |
| 804 } | 804 } |
| 805 | 805 |
| 806 template <typename T> |
| 807 T script_value_cast(const ScriptValue& value, v8::Isolate* isolate, ExceptionSta
te& exceptionState) |
| 808 { |
| 809 return NativeValueTraits<T>::nativeValue(value.v8Value(), isolate, exception
State); |
| 810 } |
| 811 |
| 806 template<> | 812 template<> |
| 807 struct NativeValueTraits<String> { | 813 struct NativeValueTraits<String> { |
| 808 static inline String nativeValue(const v8::Local<v8::Value>& value, v8::Isol
ate* isolate, ExceptionState& exceptionState) | 814 static inline String nativeValue(const v8::Local<v8::Value>& value, v8::Isol
ate* isolate, ExceptionState& exceptionState) |
| 809 { | 815 { |
| 810 V8StringResource<> stringValue(value); | 816 V8StringResource<> stringValue(value); |
| 811 if (!stringValue.prepare(exceptionState)) | 817 if (!stringValue.prepare(exceptionState)) |
| 812 return String(); | 818 return String(); |
| 813 return stringValue; | 819 return stringValue; |
| 814 } | 820 } |
| 815 }; | 821 }; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 | 1029 |
| 1024 // Callback functions used by generated code. | 1030 // Callback functions used by generated code. |
| 1025 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); | 1031 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); |
| 1026 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V
alue>&); | 1032 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V
alue>&); |
| 1027 | 1033 |
| 1028 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); | 1034 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); |
| 1029 | 1035 |
| 1030 } // namespace blink | 1036 } // namespace blink |
| 1031 | 1037 |
| 1032 #endif // V8Binding_h | 1038 #endif // V8Binding_h |
| OLD | NEW |