summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/bindings/v8/V8BindingMacros.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source/bindings/v8/V8BindingMacros.h')
-rw-r--r--third_party/WebKit/Source/bindings/v8/V8BindingMacros.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/bindings/v8/V8BindingMacros.h b/third_party/WebKit/Source/bindings/v8/V8BindingMacros.h
index 0123dbf..8098652 100644
--- a/third_party/WebKit/Source/bindings/v8/V8BindingMacros.h
+++ b/third_party/WebKit/Source/bindings/v8/V8BindingMacros.h
@@ -42,6 +42,17 @@ namespace WebCore {
return block.ReThrow(); \
}
+#define V8TRYCATCH_RETURN(type, var, value, retVal) \
+ type var; \
+ { \
+ v8::TryCatch block; \
+ var = (value); \
+ if (block.HasCaught()) { \
+ block.ReThrow(); \
+ return retVal; \
+ } \
+ }
+
#define V8TRYCATCH_VOID(type, var, value) \
type var; \
{ \