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

Unified Diff: runtime/include/dart_api.h

Issue 12865004: Fix DART_CHECK_VALID macro. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 96ca0965652eebb7d1fc427f76328ce5c3fcea4b..56a2ae7e4951bf230a8ed3ec5e81d2c49c858550 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -327,11 +327,14 @@ DART_EXPORT void _Dart_ReportErrorHandle(const char* file,
*
* Provided for convenience.
*/
-#define DART_CHECK_VALID(handle) \
- if (Dart_IsError((handle))) { \
- _Dart_ReportErrorHandle(__FILE__, __LINE__, \
- #handle, Dart_GetError(handle)); \
- }
+#define DART_CHECK_VALID(handle) \
+ { \
+ Dart_Handle __handle = handle; \
+ if (Dart_IsError((__handle))) { \
+ _Dart_ReportErrorHandle(__FILE__, __LINE__, \
+ #handle, Dart_GetError(__handle)); \
+ } \
+ } \
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698