DescriptionEnsure 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.*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44481
Patch Set 1 #Patch Set 2 : Fix compile errors. #Patch Set 3 : Fix a UI test on Windows. #
Total comments: 3
Patch Set 4 : Remove unnecessary code from RepostFormWarningGtk. #
Messages
Total messages: 6 (0 generated)
|