Chromium Code Reviews| Index: content/child/resource_dispatcher.h |
| diff --git a/content/child/resource_dispatcher.h b/content/child/resource_dispatcher.h |
| index cd965a5dfb6e21dd27c434487404fc1a4719b723..3ec6f3fe8a1bb778c42986da83127348933c01ed 100644 |
| --- a/content/child/resource_dispatcher.h |
| +++ b/content/child/resource_dispatcher.h |
| @@ -210,13 +210,16 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener { |
| // All pending requests issued to the host |
| PendingRequestList pending_requests_; |
| - base::WeakPtrFactory<ResourceDispatcher> weak_factory_; |
| - |
| ResourceDispatcherDelegate* delegate_; |
| // IO thread timestamp for ongoing IPC message. |
| base::TimeTicks io_timestamp_; |
| + // Member variables should appear before the WeakPtrFactory, to ensure |
| + // that any WeakPtrs to Controller are invalidated before its members |
| + // variable's destructors are executed, rendering them invalid. |
| + base::WeakPtrFactory<ResourceDispatcher> weak_factory_; |
|
Avi (use Gerrit)
2014/09/12 05:55:01
You don't need that explanatory comment. That's tr
MRV
2014/09/12 06:06:32
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
| }; |