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

Issue 1293953003: Fix flaky crash in WebPagePopupImpl::closePopup. (Closed)

Created:
5 years, 4 months ago by tkent
Modified:
5 years, 4 months ago
Reviewers:
keishi
CC:
blink-reviews
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix flaky crash in WebPagePopupImpl::closePopup. Reentrance to WebViewImpl::closePagePopup() was possible. closePopup() crashed in that case because m_page was valid and m_page->mainFrame() was nullptr. The details: If WebViewImpl::closePagePopup() is called, and the LocalFrame in the page popup has the last references to the page popup owner Element, 1. WebPagePopupImpl::closePopup() calls destroyPage(). 2. destroyPage() calls Page::willBeDestroyed(). 3. willBeDestroyed() destructs the LocalFrame. 4. The LocalFrame destructor destructs the owner Element. 5. The owner Element destructor destructs PickerIndicatorElement. 6. PickerIndicatorElement destructor calls WebViewImpl::closePagePopup(). This CL changes the code so that the frame doesn't have the last reference to the owner Element. We explicitly close the popup on - Owner detach (not PickerIndicatorElement detach) - Owner removal from the document tree. This fixes a testcase in crbug.com/454043. However we failed to make a stable test. BUG=454043 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200645

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M Source/core/html/HTMLInputElement.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/html/shadow/PickerIndicatorElement.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 17 (6 generated)
tkent
keishi, would you review this please?
5 years, 4 months ago (2015-08-17 05:12:35 UTC) #2
keishi
LGTM
5 years, 4 months ago (2015-08-17 05:13:53 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293953003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293953003/1
5 years, 4 months ago (2015-08-17 05:44:18 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/93930)
5 years, 4 months ago (2015-08-17 06:50:59 UTC) #7
tkent
Oh, Patch Set 1 didn't work. - ownerElement is <input>, and closePopup() can be called ...
5 years, 4 months ago (2015-08-17 07:07:17 UTC) #8
tkent
Keishi, please look at Patch Set 2.
5 years, 4 months ago (2015-08-17 10:04:10 UTC) #9
keishi
LGTM
5 years, 4 months ago (2015-08-17 10:15:28 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293953003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293953003/20001
5 years, 4 months ago (2015-08-17 10:16:02 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/93992)
5 years, 4 months ago (2015-08-17 14:06:02 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293953003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293953003/20001
5 years, 4 months ago (2015-08-17 14:10:49 UTC) #16
commit-bot: I haz the power
5 years, 4 months ago (2015-08-17 15:05:27 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200645

Powered by Google App Engine
This is Rietveld 408576698