Index: src/isolate.h |
diff --git a/src/isolate.h b/src/isolate.h |
index 8f4915cefd55bbab5f0f19b70a41ad7a08a8e734..04c00ba0c873edf4a0b4c91b8e6fefb813be67b8 100644 |
--- a/src/isolate.h |
+++ b/src/isolate.h |
@@ -164,6 +164,19 @@ typedef ZoneList<Handle<Object> > ZoneObjectList; |
RETURN_ON_EXCEPTION_VALUE(isolate, call, MaybeHandle<T>()) |
+// Macros for Maybe. |
+ |
+#define MAYBE_ASSIGN_RETURN_ON_EXCEPTION(isolate, T, dst, call) \ |
+ do { \ |
+ Maybe<T> result_of_the_call = (call); \ |
+ if (result_of_the_call.IsNothing()) { \ |
+ DCHECK((isolate)->has_pending_exception()); \ |
+ return isolate->heap()->exception(); \ |
+ } \ |
+ (dst) = result_of_the_call.FromJust(); \ |
+ } while (false) |
+ |
+ |
#define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ |
C(Handler, handler) \ |
C(CEntryFP, c_entry_fp) \ |