Commit 771fbabb authored by anujk.sharma's avatar anujk.sharma Committed by Commit bot

Fix WeakPtrFactory member ordering in chrome/browser/sync

Changing the initialization order of WeakPtrFactory such that all
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.

BUG=303818

Review URL: https://codereview.chromium.org/591993002

Cr-Commit-Position: refs/heads/master@{#296005}
parent db2b7895
......@@ -59,11 +59,12 @@ class NotificationServiceSessionsRouter
content::NotificationRegistrar registrar_;
Profile* const profile_;
syncer::SyncableService::StartSyncFlare flare_;
base::WeakPtrFactory<NotificationServiceSessionsRouter> weak_ptr_factory_;
scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription>
favicon_changed_subscription_;
base::WeakPtrFactory<NotificationServiceSessionsRouter> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(NotificationServiceSessionsRouter);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment