| Index: chrome/browser/ui/fast_unload_controller.cc
|
| diff --git a/chrome/browser/ui/fast_unload_controller.cc b/chrome/browser/ui/fast_unload_controller.cc
|
| index add48b149446e25ca2899372a7c297cc82a0e08f..ca9ab81e41e2b4bd897bc67508e2a5254fae5234 100644
|
| --- a/chrome/browser/ui/fast_unload_controller.cc
|
| +++ b/chrome/browser/ui/fast_unload_controller.cc
|
| @@ -407,8 +407,13 @@ void FastUnloadController::ProcessPendingTabs(bool skip_beforeunload) {
|
| // we would like devtools to call its own beforeunload handlers first,
|
| // and then call beforeunload handlers for |contents|.
|
| // See DevToolsWindow::InterceptPageBeforeUnload for details.
|
| - if (!DevToolsWindow::InterceptPageBeforeUnload(contents))
|
| - contents->DispatchBeforeUnload();
|
| + if (!DevToolsWindow::InterceptPageBeforeUnload(contents)) {
|
| + if (contents->NeedToFireBeforeUnload()) {
|
| + contents->DispatchBeforeUnload();
|
| + } else {
|
| + ProcessPendingTabs(skip_beforeunload);
|
| + }
|
| + }
|
| } else {
|
| ProcessPendingTabs(skip_beforeunload);
|
| }
|
|
|