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

Issue 412483006: Fixed bug where Uninstall dialog forces its own widget to close twice (Closed)

Created:
6 years, 5 months ago by sashab
Modified:
6 years, 4 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Fixed bug where Uninstall dialog forces its own widget to close twice Previously, ExtensionUninstallDialogViews called CloseNow() on it's own delegate's Widget if it was destroyed before an Accept/Cancel handler was called. However, the Widget had already been freed by the Widget hierarchy, resulting in a crash. Made ExtensionUninstallDialogViews notify ExtensionUninstallDialogDelegateView when it closes, so now either order is possible: either class can be destroyed first (either by the user, or by the views hierarchy) and the other will be safely destroyed. TEST=Open the App List in ChromeOS, then right-click on an app and select 'App Info', then click 'Remove'. Now click away from the app list to dismiss it. Previously, this would cause a crash. TEST=Open the App List in Linux, then right-click on an app and select 'App Info', then click 'Remove'. Now click the 'close' button in the app info dialog to close the dismiss it. Previously, this would cause a crash. BUG=390414, 400909 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289227

Patch Set 1 #

Total comments: 2

Patch Set 2 : Removed destructor altogether. #

Patch Set 3 : Made ExtensionUninstallDialogViews notify ExtensionUninstallDialogDelegateView when it closes, so t… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -0 lines) Patch
M chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc View 1 2 3 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
sashab
Scott: requesting feedback from your general views knowledge :)
6 years, 5 months ago (2014-07-22 23:55:35 UTC) #1
sky
https://codereview.chromium.org/412483006/diff/1/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc File chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc (right): https://codereview.chromium.org/412483006/diff/1/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc#newcode129 chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc:129: view_->GetWidget()->Close(); If you do this, it means the WidgetDelegate/DialogDelegate ...
6 years, 5 months ago (2014-07-23 15:29:37 UTC) #2
sashab
https://codereview.chromium.org/412483006/diff/1/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc File chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc (right): https://codereview.chromium.org/412483006/diff/1/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc#newcode129 chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc:129: view_->GetWidget()->Close(); On 2014/07/23 15:29:37, sky wrote: > If you ...
6 years, 4 months ago (2014-08-06 03:09:00 UTC) #3
sashab
Alright. Take a look. :)
6 years, 4 months ago (2014-08-13 00:11:58 UTC) #4
sky
LGTM
6 years, 4 months ago (2014-08-13 03:26:41 UTC) #5
sashab
The CQ bit was checked by sashab@chromium.org
6 years, 4 months ago (2014-08-13 06:12:55 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sashab@chromium.org/412483006/40001
6 years, 4 months ago (2014-08-13 06:13:55 UTC) #7
commit-bot: I haz the power
6 years, 4 months ago (2014-08-13 09:17:11 UTC) #8
Message was sent while issue was closed.
Change committed as 289227

Powered by Google App Engine
This is Rietveld 408576698