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

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

Issue 242223004: Rename macros TONATIVE_BOOL* and TOSTRING_BOOL to *_DEFAULT (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix comment 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 | « Source/bindings/v8/V8Binding.cpp ('k') | Source/bindings/v8/V8WorkerGlobalScopeEventListener.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 95e3cbbf7a52b3b52101630bc35d3dca56dfce03..e5841c9beda84810daf9ed7ea80f01cb7aca48cd 100644
--- a/Source/bindings/v8/V8BindingMacros.h
+++ b/Source/bindings/v8/V8BindingMacros.h
@@ -35,18 +35,18 @@ namespace WebCore {
// Naming scheme:
// TO*_RETURNTYPE[_ARGTYPE]...
-// ...removing RETURNTYPE/ARGTYPE duplicate if an argument is simply returned
+// ...using _DEFAULT instead of _ANY..._ANY when returing a default value.
#define TONATIVE_EXCEPTION(type, var, value) \
- type var; \
- { \
- v8::TryCatch block; \
- var = (value); \
- if (UNLIKELY(block.HasCaught())) \
- return block.ReThrow(); \
+ type var; \
+ { \
+ v8::TryCatch block; \
+ var = (value); \
+ if (UNLIKELY(block.HasCaught())) \
+ return block.ReThrow(); \
}
-#define TONATIVE_VOID(type, var, value) \
+#define TONATIVE_VOID(type, var, value) \
type var; \
{ \
v8::TryCatch block; \
@@ -57,29 +57,29 @@ namespace WebCore {
} \
}
-#define TONATIVE_BOOL(type, var, value, retVal) \
- type var; \
- { \
- v8::TryCatch block; \
- var = (value); \
- if (UNLIKELY(block.HasCaught())) { \
- block.ReThrow(); \
- return retVal; \
- } \
+#define TONATIVE_DEFAULT(type, var, value, retVal) \
+ type var; \
+ { \
+ v8::TryCatch block; \
+ var = (value); \
+ if (UNLIKELY(block.HasCaught())) { \
+ block.ReThrow(); \
+ return retVal; \
+ } \
}
#define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \
- type var; \
- { \
- v8::TryCatch block; \
- var = (value); \
- if (UNLIKELY(block.HasCaught())) \
- exceptionState.rethrowV8Exception(block.Exception()); \
- if (UNLIKELY(exceptionState.throwIfNeeded())) \
- return; \
+ type var; \
+ { \
+ v8::TryCatch block; \
+ var = (value); \
+ if (UNLIKELY(block.HasCaught())) \
+ exceptionState.rethrowV8Exception(block.Exception()); \
+ if (UNLIKELY(exceptionState.throwIfNeeded())) \
+ return; \
}
-#define TONATIVE_BOOL_EXCEPTIONSTATE(type, var, value, exceptionState, retVal) \
+#define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal) \
type var; \
{ \
v8::TryCatch block; \
@@ -98,9 +98,9 @@ namespace WebCore {
if (UNLIKELY(!var.prepare())) \
return;
-#define TOSTRING_BOOL(type, var, value, retVal) \
- type var(value); \
- if (UNLIKELY(!var.prepare())) \
+#define TOSTRING_DEFAULT(type, var, value, retVal) \
+ type var(value); \
+ if (UNLIKELY(!var.prepare())) \
return retVal;
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/V8Binding.cpp ('k') | Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698