Commit d9d603c5 authored by jochen's avatar jochen Committed by Commit bot

Inline Isolate::UncheckedCurrent into isolate.cc

BUG=2487
R=yangguo@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1467973002

Cr-Commit-Position: refs/heads/master@{#32165}
parent c7aace4d
......@@ -1847,7 +1847,9 @@ void Isolate::TearDown() {
// direct pointer. We don't use Enter/Exit here to avoid
// initializing the thread data.
PerIsolateThreadData* saved_data = CurrentPerIsolateThreadData();
Isolate* saved_isolate = UncheckedCurrent();
DCHECK(base::NoBarrier_Load(&isolate_key_created_) == 1);
Isolate* saved_isolate =
reinterpret_cast<Isolate*>(base::Thread::GetThreadLocal(isolate_key_));
SetIsolateThreadLocals(this, NULL);
Deinit();
......
......@@ -481,14 +481,9 @@ class Isolate {
return isolate;
}
INLINE(static Isolate* UncheckedCurrent()) {
DCHECK(base::NoBarrier_Load(&isolate_key_created_) == 1);
return reinterpret_cast<Isolate*>(
base::Thread::GetThreadLocal(isolate_key_));
}
// Like UncheckedCurrent, but skips the check that |isolate_key_| was
// initialized. Callers have to ensure that themselves.
// Like Current, but skips the check that |isolate_key_| was initialized.
// Callers have to ensure that themselves.
// DO NOT USE. The only remaining callsite will be deleted soon.
INLINE(static Isolate* UnsafeCurrent()) {
return reinterpret_cast<Isolate*>(
base::Thread::GetThreadLocal(isolate_key_));
......
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