Chromium Code Reviews| Index: mojo/edk/system/request_context.h |
| diff --git a/mojo/edk/system/request_context.h b/mojo/edk/system/request_context.h |
| index 75ba61fdf6cccc2128122d368928f3be5c3a1518..56b849870e33ba07048d5f450e911880be51b045 100644 |
| --- a/mojo/edk/system/request_context.h |
| +++ b/mojo/edk/system/request_context.h |
| @@ -10,6 +10,10 @@ |
| #include "mojo/edk/system/handle_signals_state.h" |
| #include "mojo/edk/system/watcher.h" |
| +namespace base { |
| +template<typename T> class ThreadLocalPointer; |
| +} |
| + |
| namespace mojo { |
| namespace edk { |
| @@ -73,6 +77,11 @@ class RequestContext { |
| WatchNotifyFinalizerList watch_notify_finalizers_; |
| WatchCancelFinalizerList watch_cancel_finalizers_; |
| + // Pointer to the TLS context. Although this can easily be accessed via the |
| + // global LazyInstance, accessing a LazyInstance has a large cost relative to |
| + // the rest of this class and its usages. |
| + base::ThreadLocalPointer<RequestContext>* tls_context_; |
|
Ken Rockot(use gerrit already)
2016/03/07 04:25:00
Hmm, couldn't this just be a raw pointer?
|
| + |
| DISALLOW_COPY_AND_ASSIGN(RequestContext); |
| }; |