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

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: add/use yhirano's scope classes instead 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..efc446ab611ae2b4fbf9853e65092a6cb38e7865 100644
--- a/Source/bindings/v8/V8BindingMacros.h
+++ b/Source/bindings/v8/V8BindingMacros.h
@@ -47,17 +47,19 @@ 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; \
yhirano 2014/05/30 09:33:21 You can use V8RethrowTryCatchScope and reuse TONAT
Jens Widell 2014/05/30 09:46:39 Done.
- TONATIVE_VOID_INTERNAL(var, value); \
+ var = (value); \
+ if (UNLIKELY(block.HasCaught())) { \
+ block.ReThrow(); \
+ return; \
+ } \
}
#define TONATIVE_DEFAULT(type, var, value, retVal) \
@@ -106,15 +108,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