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

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

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: make constructors explicit Created 6 years, 7 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 | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/custom/V8DocumentCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8BindingMacros.h
diff --git a/Source/bindings/v8/V8BindingMacros.h b/Source/bindings/v8/V8BindingMacros.h
index ac4fa714f71defb4f72aff8f4672cd33a1e93dc9..1dc394acfe3ba66c63af186c05df988d07bff798 100644
--- a/Source/bindings/v8/V8BindingMacros.h
+++ b/Source/bindings/v8/V8BindingMacros.h
@@ -47,17 +47,16 @@ namespace WebCore {
}
#define TONATIVE_VOID_INTERNAL(var, value) \
- var = (value); \
- if (UNLIKELY(block.HasCaught())) { \
- block.ReThrow(); \
- return; \
- }
+ var = (value); \
+ if (UNLIKELY(block.HasCaught())) \
+ return;
-#define TONATIVE_VOID(type, var, value) \
- type var; \
- { \
- v8::TryCatch block; \
- TONATIVE_VOID_INTERNAL(var, value); \
+#define TONATIVE_VOID(type, var, value) \
+ type var; \
+ { \
+ v8::TryCatch block; \
+ V8RethrowTryCatchScope rethrow(block); \
+ TONATIVE_VOID_INTERNAL(var, value); \
}
#define TONATIVE_DEFAULT(type, var, value, retVal) \
@@ -106,15 +105,7 @@ namespace WebCore {
#define TOSTRING_VOID_INTERNAL(var, value) \
var = (value); \
- if (UNLIKELY(!var.prepare())) { \
- block.ReThrow(); \
- return; \
- }
-
-// There are no v8::TryCatch declared outside.
-#define TOSTRING_VOID_INTERNAL_NOTRYCATCH(var, value) \
- var = (value); \
- if (UNLIKELY(!var.prepare())) \
+ if (UNLIKELY(!var.prepare())) \
return;
#define TOSTRING_DEFAULT(type, var, value, retVal) \
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/custom/V8DocumentCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698