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
This commit is contained in:
vitalyr@chromium.org 2011-03-25 13:32:06 +00:00
parent 3925045f70
commit 62c512e436

View File

@ -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);
}