diff options
author | dcaiafa@chromium.org <dcaiafa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-16 06:00:13 +0000 |
---|---|---|
committer | dcaiafa@chromium.org <dcaiafa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-16 06:00:13 +0000 |
commit | f330701714d1a4eada871f4a2088b3130476be16 (patch) | |
tree | 795a9de7bb6e79602a8f5fabda4365e22f2e8167 /remoting | |
parent | c4d907dee9b459591f621e8f8cddf18ed68fcb65 (diff) | |
download | chromium_src-f330701714d1a4eada871f4a2088b3130476be16.zip chromium_src-f330701714d1a4eada871f4a2088b3130476be16.tar.gz chromium_src-f330701714d1a4eada871f4a2088b3130476be16.tar.bz2 |
Fix crash in plugin when installing host from WebApp (Windows)
The crash happens when |DaemonControllerDelegateWin::
OnInstallationComplete| runs the |done| callback which was passed as an
argument:
- |done| is passed by reference
- |done| is owned by the caller |installer_| (as a bound
parameter of |done_|)
- |installer_| is destroyed before |done| runs
- |OnInstallationComplete| runs |done|, which now points to released
memory, and crashes
As far as I know, this problem has existed for a while. It should crash
consistently in DEBUG where released memory is wiped out. It might have
been working in RELEASE due to sheer luck.
BUG=305785
TESTED=install host via webapp
Review URL: https://codereview.chromium.org/27042005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/setup/daemon_installer_win.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/remoting/host/setup/daemon_installer_win.cc b/remoting/host/setup/daemon_installer_win.cc index fc61b69..dbb72192 100644 --- a/remoting/host/setup/daemon_installer_win.cc +++ b/remoting/host/setup/daemon_installer_win.cc @@ -331,7 +331,9 @@ DaemonInstallerWin::~DaemonInstallerWin() { } void DaemonInstallerWin::Done(HRESULT result) { - done_.Run(result); + CompletionCallback done = done_; + done_.Reset(); + done.Run(result); } // static |