#define ON_BAILOUT(isolate, location, code) \
if (IsDeadCheck(isolate, location) || \
- v8::V8::IsExecutionTerminating()) { \
+ IsExecutionTerminatingCheck(isolate)) { \
code; \
UNREACHABLE(); \
}
}
+static inline bool IsExecutionTerminatingCheck(i::Isolate* isolate) {
+ if (!isolate->IsInitialized()) return false;
+ if (isolate->has_scheduled_exception()) {
+ return isolate->scheduled_exception() ==
+ isolate->heap()->termination_exception();
+ }
+ return false;
+}
+
+
static inline bool EmptyCheck(const char* location, v8::Handle<v8::Data> obj) {
return obj.IsEmpty() ? ReportEmptyHandle(location) : false;
}
bool V8::IsExecutionTerminating() {
i::Isolate* isolate = i::Isolate::Current();
- if (!isolate->IsInitialized()) return false;
- if (isolate->has_scheduled_exception()) {
- return isolate->scheduled_exception() ==
- HEAP->termination_exception();
- }
- return false;
+ return IsExecutionTerminatingCheck(isolate);
}