Commit 62c512e4 authored by vitalyr@chromium.org's avatar vitalyr@chromium.org

Remove TLS read from ON_BAILOUT.

Patch by Dmitry Lomov.

Original review: http://codereview.chromium.org/6731030/

TBR=ager@chromium.org

Review URL: http://codereview.chromium.org/6713128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3925045f
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment