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}
This commit is contained in:
parent
c7aace4d43
commit
d9d603c556
@ -1847,7 +1847,9 @@ void Isolate::TearDown() {
|
|||||||
// direct pointer. We don't use Enter/Exit here to avoid
|
// direct pointer. We don't use Enter/Exit here to avoid
|
||||||
// initializing the thread data.
|
// initializing the thread data.
|
||||||
PerIsolateThreadData* saved_data = CurrentPerIsolateThreadData();
|
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);
|
SetIsolateThreadLocals(this, NULL);
|
||||||
|
|
||||||
Deinit();
|
Deinit();
|
||||||
|
@ -481,14 +481,9 @@ class Isolate {
|
|||||||
return isolate;
|
return isolate;
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE(static Isolate* UncheckedCurrent()) {
|
// Like Current, but skips the check that |isolate_key_| was initialized.
|
||||||
DCHECK(base::NoBarrier_Load(&isolate_key_created_) == 1);
|
// Callers have to ensure that themselves.
|
||||||
return reinterpret_cast<Isolate*>(
|
// DO NOT USE. The only remaining callsite will be deleted soon.
|
||||||
base::Thread::GetThreadLocal(isolate_key_));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Like UncheckedCurrent, but skips the check that |isolate_key_| was
|
|
||||||
// initialized. Callers have to ensure that themselves.
|
|
||||||
INLINE(static Isolate* UnsafeCurrent()) {
|
INLINE(static Isolate* UnsafeCurrent()) {
|
||||||
return reinterpret_cast<Isolate*>(
|
return reinterpret_cast<Isolate*>(
|
||||||
base::Thread::GetThreadLocal(isolate_key_));
|
base::Thread::GetThreadLocal(isolate_key_));
|
||||||
|
Loading…
Reference in New Issue
Block a user