Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: src/isolate.h

Issue 1897673002: Revert of Get rid of UnsafeCurrent in Sampler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/profiler/sampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 74122db7cc333826363f78269ee76d4dad42b267..015f861301b1b05e48b8efbc5955a236147a17fe 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -493,6 +493,14 @@
base::Thread::GetExistingThreadLocal(isolate_key_));
DCHECK(isolate != NULL);
return isolate;
+ }
+
+ // 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_));
}
// Usually called by Init(), but can be called early e.g. to allow
« no previous file with comments | « no previous file | src/profiler/sampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698