| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index af8054f1b446dd86ef7e6f92335427235cfb5820..31ff758931b734833e71d1cd1f037389eadc89a2 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -69,7 +69,7 @@ namespace v8 {
|
|
|
| #define ON_BAILOUT(isolate, location, code) \
|
| if (IsDeadCheck(isolate, location) || \
|
| - v8::V8::IsExecutionTerminating()) { \
|
| + IsExecutionTerminatingCheck(isolate)) { \
|
| code; \
|
| UNREACHABLE(); \
|
| }
|
| @@ -256,6 +256,16 @@ static inline bool IsDeadCheck(i::Isolate* isolate, const char* location) {
|
| }
|
|
|
|
|
| +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;
|
| }
|
| @@ -4629,12 +4639,7 @@ void V8::TerminateExecution(Isolate* isolate) {
|
|
|
| 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);
|
| }
|
|
|
|
|
|
|