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

Unified Diff: runtime/include/dart_api.h

Issue 2803543006: Added synchronous socket implementation to dart:io. (Closed)
Patch Set: Addressed first round of comments Created 3 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
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 4a034a24ca76235bc57b87c2ed89d69a3ef0df61..7e7e890d91a842433f7c1c28e8102dc1e2026a92 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -387,6 +387,18 @@ DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle);
/* TODO(turnidge): Should this really return an error handle? */
/* Consider just terminating. */
+/**
+ * Propagates error if 'handle' is an error handle.
+ *
+ * Provided for convenience.
+ */
+#define DART_CHECK_VALID_AND_PROPAGATE(handle) \
+ { \
+ if (Dart_IsError((handle))) { \
+ Dart_PropagateError(handle); \
zra 2017/04/10 21:39:43 Dart_PropagateError is actually a little bit dange
bkonyi 2017/04/11 01:30:51 Ah okay, good to know. Removed.
+ } \
+ }
+
/* Internal routine used for reporting error handles. */
DART_EXPORT void _Dart_ReportErrorHandle(const char* file,
int line,

Powered by Google App Engine
This is Rietveld 408576698