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

Issue 1657005: Merge 44481 - Ensure proper teardown of repost form warning objects.... (Closed)

Created:
10 years, 8 months ago by Bernhard Bauer
Modified:
9 years, 7 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Merge 44481 - Ensure proper teardown of repost form warning objects. Make sure a repost form warning is closed properly even when the constrained window is closed from underneath us. To do this, its controller now calls |Cancel| in its destructor. We now have a potential cycle of methods calling each other: * |RepostFormWarningController::CloseDialog| closes the |ConstrainedWindow|. * This eventually calls |RepostFormWarningWin::DeleteDelegate|, which destroys |RepostFormWarningWin| and |RepostFormWarningController|. * In its destructor, |RepostFormWarningController| calls |Cancel|, which calls |CloseDialog|. Therefore, there are some checks in place to make sure we do everything during the teardown exactly once: * After calling |NavigationController::CancelPendingReload|, we set |tab_contents| to null to make sure we don't call it again. * During destruction, we set |window_| to null to make sure we don't call |CloseConstrainedWindow| again. BUG=41367 TEST=RepostFormWarningTest.* Review URL: http://codereview.chromium.org/1530032 TBR=bauerb@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44639

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -30 lines) Patch
M chrome/browser/cocoa/repost_form_warning_mac.h View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/repost_form_warning_mac.mm View 3 chunks +7 lines, -9 lines 0 comments Download
M chrome/browser/gtk/repost_form_warning_gtk.h View 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/gtk/repost_form_warning_gtk.cc View 1 chunk +1 line, -8 lines 0 comments Download
M chrome/browser/repost_form_warning_controller.h View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/repost_form_warning_controller.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/views/repost_form_warning_view.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 1 (0 generated)
Bernhard Bauer
10 years, 8 months ago (2010-04-15 08:53:29 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698