Chromium Code Reviews| Index: Source/bindings/v8/V8Binding.h |
| diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h |
| index f1d0cc5daf56164ae948d12b3d1da60ea4361c59..8b53470e50cfddfd698e9d459fbf7749931f3c21 100644 |
| --- a/Source/bindings/v8/V8Binding.h |
| +++ b/Source/bindings/v8/V8Binding.h |
| @@ -537,7 +537,11 @@ template<> |
| struct NativeValueTraits<String> { |
| static inline String nativeValue(const v8::Handle<v8::Value>& value, v8::Isolate* isolate) |
|
yhirano
2014/04/24 06:52:51
Because this function is used in another v8::TryCa
|
| { |
| - TOSTRING_DEFAULT(V8StringResource<>, stringValue, value, String()); |
| + V8StringResource<> stringValue(value); |
| + // Because V8StringResourceToString<DoNotCatch>::call doesn't use the |
| + // instance object, we can pass null pointer. |
| + if (UNLIKELY(!stringValue.init<V8StringResourceDoNotCatchException>(0))) |
| + return String(); |
| return stringValue; |
| } |
| }; |