Index: src/isolate.h |
diff --git a/src/isolate.h b/src/isolate.h |
index 40f0c0ea5c93e3ae13bacfa9b832273c0e1d0133..57c17fe5832d5812b48dd127e9ac1444e88b9dbc 100644 |
--- a/src/isolate.h |
+++ b/src/isolate.h |
@@ -124,6 +124,16 @@ typedef ZoneList<Handle<Object> > ZoneObjectList; |
#define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ |
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, MaybeHandle<T>()) |
+#define RETURN_RESULT_OR_FAILURE(isolate, call) \ |
+ do { \ |
+ Handle<Object> __result__; \ |
+ if (!(call).ToHandle(&__result__)) { \ |
+ DCHECK((isolate)->has_pending_exception()); \ |
+ return isolate->heap()->exception(); \ |
Jakob Kummerow
2016/05/24 09:16:21
It seems inconsistent that the DCHECK line puts pa
Yang
2016/05/24 11:07:21
you are right. We actually have this problem below
|
+ } \ |
+ return *__result__; \ |
+ } while (false) |
+ |
#define ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value) \ |
do { \ |
if (!(call).ToHandle(&dst)) { \ |