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

Unified Diff: src/isolate.h

Issue 4046005: [Isolates] Always inline Isolate::Current(). (Closed)
Patch Set: Created 10 years, 2 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 | no next file » | 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 3f60d371288b970b46750fc0c54b2df0d123eb2f..e2b3a43418bb97e40e2249431ffd02597b063dc4 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -375,14 +375,13 @@ class Isolate {
}
// Returns the isolate inside which the current thread is running.
- static Isolate* Current() {
- Isolate* tls_isolate = reinterpret_cast<Isolate*>(
- Thread::GetThreadLocal(isolate_key_));
- ASSERT(tls_isolate != NULL);
- return tls_isolate;
+ INLINE(static Isolate* Current()) {
+ Isolate* isolate = UncheckedCurrent();
+ ASSERT(isolate != NULL);
+ return isolate;
}
- static Isolate* UncheckedCurrent() {
+ INLINE(static Isolate* UncheckedCurrent()) {
return reinterpret_cast<Isolate*>(Thread::GetThreadLocal(isolate_key_));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698