Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Issue 18272015: Hide autofill popup before WebContentsImpl is destroyed. (Closed)

Created:
7 years, 5 months ago by blundell
Modified:
7 years, 5 months ago
Reviewers:
Ilya Sherman
CC:
chromium-reviews, Raman Kakilate, benquan, ahutter, browser-components-watch_chromium.org, Dane Wallinga, dyu1, estade+watch_chromium.org, Albert Bodenhamer, Ilya Sherman, rouslan+autofillwatch_chromium.org
Visibility:
Public.

Description

Hide autofill popup before WebContentsImpl is destroyed. TabAutofillManagerDelegate was initiating the autofill popup hiding process in its destructor. However, this process ends up calling back into the WebContentsImpl instance via a virtual method call on the base WebContents class. As TabAutofillManagerDelegate is a WebContentsUserData and thus has its destructor called as part of the WebContents base class destructor, the call into WebContents is occurring when the instance's vtable is that of WebContents, where the method is pure virtual. This CL changes the autofill popup hiding process to occur on receiving the WebContentsDestroyed notification, while the vtable of the WebContents instance is still that of WebContentsImpl. BUG=254490 TEST=On Windows, cause an autofill popup to appear and close the tab. The app should not crash. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210229

Patch Set 1 #

Total comments: 4

Patch Set 2 : Response to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -2 lines) Patch
M chrome/browser/ui/autofill/tab_autofill_manager_delegate.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc View 1 2 chunks +10 lines, -1 line 0 comments Download
M components/autofill/core/browser/autofill_external_delegate.cc View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
blundell
Hi Ilya, I'm pretty certain that this is the source of the crash, and that ...
7 years, 5 months ago (2013-07-03 15:03:41 UTC) #1
Ilya Sherman
LGTM, thanks! https://codereview.chromium.org/18272015/diff/1/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc File chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc (right): https://codereview.chromium.org/18272015/diff/1/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc#newcode45 chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc:45: DCHECK(!popup_controller_.get()); nit: I don't think the ".get()" ...
7 years, 5 months ago (2013-07-03 19:56:48 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/18272015/6001
7 years, 5 months ago (2013-07-04 08:29:30 UTC) #3
blundell
https://codereview.chromium.org/18272015/diff/1/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc File chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc (right): https://codereview.chromium.org/18272015/diff/1/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc#newcode45 chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc:45: DCHECK(!popup_controller_.get()); On 2013/07/03 19:56:49, Ilya Sherman wrote: > nit: ...
7 years, 5 months ago (2013-07-04 08:32:45 UTC) #4
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-04 08:58:52 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/18272015/6001
7 years, 5 months ago (2013-07-04 09:15:02 UTC) #6
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-04 09:24:47 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/18272015/6001
7 years, 5 months ago (2013-07-04 15:11:31 UTC) #8
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-04 15:23:57 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/18272015/6001
7 years, 5 months ago (2013-07-04 19:45:55 UTC) #10
commit-bot: I haz the power
7 years, 5 months ago (2013-07-04 22:11:50 UTC) #11
Message was sent while issue was closed.
Change committed as 210229

Powered by Google App Engine
This is Rietveld 408576698