summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 04:03:41 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 04:03:41 +0000
commitbca1a566a98ff8a4ebf1625d7fe578dbfb569cd4 (patch)
treea87ed637da3eccad03aab4cf1083e590ec9fba5d /ash
parent3c0a63c22fac0ae07d5682826b6b4af9d8473eb1 (diff)
downloadchromium_src-bca1a566a98ff8a4ebf1625d7fe578dbfb569cd4.zip
chromium_src-bca1a566a98ff8a4ebf1625d7fe578dbfb569cd4.tar.gz
chromium_src-bca1a566a98ff8a4ebf1625d7fe578dbfb569cd4.tar.bz2
Break dependency on scoped_ptr::reset sequencing in views::Widget.
scoped_ptr<T>::reset() currently guarantees that it deletes the old stored pointer before assigning its argument to the stored pointer. This is unsafe, because running the deleter may result in the destruction of the scoped_ptr<T> itself. unique_ptr<T> addresses this by assigning its argument to the stored pointer before deleting the old value of the stored pointer. Unfortunately, this breaks code that assumes that the value of the scoped_ptr will not change during scoped_ptr::reset() before destruction of the old value is complete. To fix this, the root view creation logic has moved from GetRootView() to Widget::Init(). This also prevents bugs where an inadvertent dependency on the root view during destruction may accidentally re-create the root view. BUG=176091 Review URL: https://chromiumcodereview.appspot.com/12340096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
0 files changed, 0 insertions, 0 deletions