Index: src/top.h |
diff --git a/src/top.h b/src/top.h |
index 9d8aa8227fa3ff044daa534912c8fa7a68f3a053..c052dad8cee0094d0eea8d9f92cd6d637f21921d 100644 |
--- a/src/top.h |
+++ b/src/top.h |
@@ -41,6 +41,15 @@ class Simulator; |
#define RETURN_IF_SCHEDULED_EXCEPTION() \ |
if (Top::has_scheduled_exception()) return Top::PromoteScheduledException() |
+#define RETURN_IF_EMPTY_HANDLE_VALUE(call, value) \ |
+ if (call.is_null()) { \ |
+ ASSERT(Top::has_pending_exception()); \ |
+ return value; \ |
+ } |
+ |
+#define RETURN_IF_EMPTY_HANDLE(call) \ |
+ RETURN_IF_EMPTY_HANDLE_VALUE(call, Failure::Exception()) |
+ |
// Top has static variables used for JavaScript execution. |
class SaveContext; // Forward declaration. |