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
|
||||
// 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_));
|
||||
|
Loading…
Reference in New Issue
Block a user