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

Issue 2936643003: Allow cancelling the currently-presented dialog. (Closed)

Created:
3 years, 6 months ago by kkhorimoto
Modified:
3 years, 6 months ago
CC:
chromium-reviews, marq+watch_chromium.org, ios-reviews+chrome_chromium.org, noyau+watch_chromium.org, ios-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow cancelling the currently-presented dialog. DialogPresenter's |-cancelDialogForWebState:| had a DCHECK ensuring that the WebState whose dialogs are being cancelled is not the one currently presenting a dialog. This CL removes that DCHECK and correctly handles cancelling the presented dialog. Closing the Tab presenting the current dialog is impossible through the UI, so this DCHECK was never hit in practice, but it's technically possible for the current Tab to be closed by window.close or asynchronous JavaScript execution while the dialog is presented. BUG=none Review-Url: https://codereview.chromium.org/2936643003 Cr-Commit-Position: refs/heads/master@{#481259} Committed: https://chromium.googlesource.com/chromium/src/+/709a3cbb9e85dd0c4572ee30a32bda68140fbb52

Patch Set 1 #

Total comments: 6

Patch Set 2 : Added DCHECK, renamed selector #

Patch Set 3 : fix test #

Patch Set 4 : declare selector #

Patch Set 5 : fix compilation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -16 lines) Patch
M ios/chrome/browser/ui/dialogs/dialog_presenter.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/dialogs/dialog_presenter.mm View 1 2 6 chunks +22 lines, -13 lines 0 comments Download
M ios/chrome/browser/ui/dialogs/dialog_presenter_unittest.mm View 1 2 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (13 generated)
kkhorimoto
3 years, 6 months ago (2017-06-12 19:27:58 UTC) #2
rohitrao (ping after 24h)
https://codereview.chromium.org/2936643003/diff/1/ios/chrome/browser/ui/dialogs/dialog_presenter.mm File ios/chrome/browser/ui/dialogs/dialog_presenter.mm (right): https://codereview.chromium.org/2936643003/diff/1/ios/chrome/browser/ui/dialogs/dialog_presenter.mm#newcode323 ios/chrome/browser/ui/dialogs/dialog_presenter.mm:323: if (cancelingPresentedDialog) { Should we DCHECK(_dialogCoordinatorsForWebStates[webState] == NULL)? https://codereview.chromium.org/2936643003/diff/1/ios/chrome/browser/ui/dialogs/dialog_presenter.mm#newcode324 ...
3 years, 6 months ago (2017-06-12 23:43:50 UTC) #3
kkhorimoto
https://codereview.chromium.org/2936643003/diff/1/ios/chrome/browser/ui/dialogs/dialog_presenter.mm File ios/chrome/browser/ui/dialogs/dialog_presenter.mm (right): https://codereview.chromium.org/2936643003/diff/1/ios/chrome/browser/ui/dialogs/dialog_presenter.mm#newcode323 ios/chrome/browser/ui/dialogs/dialog_presenter.mm:323: if (cancelingPresentedDialog) { On 2017/06/12 23:43:50, rohitrao (ping after ...
3 years, 6 months ago (2017-06-13 00:10:13 UTC) #4
sdefresne
lgtm
3 years, 6 months ago (2017-06-15 13:47:37 UTC) #5
rohitrao (ping after 24h)
lgtm
3 years, 6 months ago (2017-06-15 14:12:06 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2936643003/20001
3 years, 6 months ago (2017-06-15 21:29:25 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/238672)
3 years, 6 months ago (2017-06-15 21:52:58 UTC) #10
kkhorimoto
fix test
3 years, 6 months ago (2017-06-19 23:03:02 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2936643003/40001
3 years, 6 months ago (2017-06-19 23:03:45 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/240966)
3 years, 6 months ago (2017-06-19 23:19:33 UTC) #16
kkhorimoto
declare selector
3 years, 6 months ago (2017-06-19 23:42:15 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2936643003/60001
3 years, 6 months ago (2017-06-19 23:42:38 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/241019)
3 years, 6 months ago (2017-06-20 00:00:46 UTC) #22
kkhorimoto
fix compilation
3 years, 6 months ago (2017-06-21 18:31:07 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2936643003/80001
3 years, 6 months ago (2017-06-21 18:31:20 UTC) #26
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 18:47:31 UTC) #29
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/709a3cbb9e85dd0c4572ee30a32b...

Powered by Google App Engine
This is Rietveld 408576698