diff options
author | mohan.reddy <mohan.reddy@samsung.com> | 2014-09-17 11:15:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-17 18:15:25 +0000 |
commit | 14cb4ad4c4a9289944ae1f0ff6485d38b1278c83 (patch) | |
tree | fdf5df1c60008ae9858392bb9246d55c1daea27d /chrome/browser/jumplist_win.cc | |
parent | ea6f57280608d4d5dd9973863645fe9f17f9b829 (diff) | |
download | chromium_src-14cb4ad4c4a9289944ae1f0ff6485d38b1278c83.zip chromium_src-14cb4ad4c4a9289944ae1f0ff6485d38b1278c83.tar.gz chromium_src-14cb4ad4c4a9289944ae1f0ff6485d38b1278c83.tar.bz2 |
Fix WeakPtrFactory member ordering in chrome/browser
Changing in the intialization 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/575993002
Cr-Commit-Position: refs/heads/master@{#295303}
Diffstat (limited to 'chrome/browser/jumplist_win.cc')
-rw-r--r-- | chrome/browser/jumplist_win.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc index 251f122..dadc19a 100644 --- a/chrome/browser/jumplist_win.cc +++ b/chrome/browser/jumplist_win.cc @@ -186,9 +186,9 @@ bool UpdateJumpList(const wchar_t* app_id, } // namespace JumpList::JumpList(Profile* profile) - : weak_ptr_factory_(this), - profile_(profile), - task_id_(base::CancelableTaskTracker::kBadTaskId) { + : profile_(profile), + task_id_(base::CancelableTaskTracker::kBadTaskId), + weak_ptr_factory_(this) { DCHECK(Enabled()); // To update JumpList when a tab is added or removed, we add this object to // the observer list of the TabRestoreService class. |