Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: Source/bindings/v8/V8Binding.h

Issue 242913002: [ABANDONED] Add exception handling options to V8StringResource<T>::prepare. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/v8/V8BindingMacros.h » ('j') | Source/bindings/v8/V8StringResource.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
};
« no previous file with comments | « no previous file | Source/bindings/v8/V8BindingMacros.h » ('j') | Source/bindings/v8/V8StringResource.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698