New issue
Advanced search Search tips

Issue 825771 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug-Regression



Sign in to add a comment

Page freezes when alert / confirm / prompt method is called from an embedded options page while the DevTools is open

Project Member Reported by rob@robwu.nl, Mar 26 2018

Issue description

STR:
1. Open any extension with an embedded options page.
2. Right-click on the embedded options page and choose "Inspect element" to open the DevTools.
3. Switch to the console, and run "confirm()", "alert()" or "prompt()"
   (This does not have to be invoked from the console, the bug also occurs if the page calls one of these methods)

Expected result:
- The function should return (ideally a dialog should show up, but that doesn't seem to happen).

Actual result:
- Script execution is suspended and the page is not responsive, until the DevTools window is closed.

This is a regression in Chrome 62, bisection points to 3c1842b725c3dd24822f7663ef407b5a556a29c5


For bisection, I used the following extension:

manifest.json:
{
    "name": "Opening modal dialog in options_ui",
    "version": "1",
    "manifest_version": 2,
    "options_ui": {
        "page": "options.html"
    }
}

options.html:
<body>
<script src="options.js"></script>

options.js:
['alert', 'confirm', 'prompt'].forEach(function(dialogMethod) {
    var b = document.createElement('button');
    b.textContent = dialogMethod;
    b.onclick = function() {
        var retval = window[dialogMethod]();
        console.log(dialogMethod + ' returned ' + retval);
    };
    document.body.appendChild(b);
});

 
Cc: a...@chromium.org
+avi@ who knows about how dialogs interact with OOPIFs

Comment 2 by a...@chromium.org, Mar 26 2018

Owner: pfeldman@chromium.org
Status: Assigned (was: Untriaged)
The interaction between js dialogs and devtools is pfeldman's area. Thank you for the CC. Assigning.
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c587bc5817351c713378fbef498a2cfb4536b67

commit 1c587bc5817351c713378fbef498a2cfb4536b67
Author: Pavel Feldman <pfeldman@chromium.org>
Date: Wed Apr 04 21:16:05 2018

DevTools: Page freezes when alert / confirm / prompt method is called from options dialog.

Bug:  825771 
Change-Id: I98e174f29538fadd104c61706766b28ab0b9db7d
Reviewed-on: https://chromium-review.googlesource.com/994377
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548200}
[modify] https://crrev.com/1c587bc5817351c713378fbef498a2cfb4536b67/content/browser/devtools/protocol/page_handler.cc
[modify] https://crrev.com/1c587bc5817351c713378fbef498a2cfb4536b67/content/browser/devtools/protocol/page_handler.h
[modify] https://crrev.com/1c587bc5817351c713378fbef498a2cfb4536b67/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/1c587bc5817351c713378fbef498a2cfb4536b67/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/1c587bc5817351c713378fbef498a2cfb4536b67/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/1c587bc5817351c713378fbef498a2cfb4536b67/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
[modify] https://crrev.com/1c587bc5817351c713378fbef498a2cfb4536b67/third_party/WebKit/Source/devtools/front_end/sdk/ScreenCaptureModel.js

Labels: Needs-Feedback
Able to reproduce this issue on build without fix(checked on 65.0.3325.162). Hence verifying fix on latest canary 67.0.3389.0 using Ubuntu 14.04.

Options dialog is not seen completely in latest canary 67.0.3389.0. Hence checked on right clicking the chopped part, opened devtools and in console typed prompt(),confirm() and alert() -- Which showed dialogs without any freeze.

@pfeldman: Please check the video and let us know if fix is working as expected or not.

Thanks!
825771.webm
4.5 MB View Download
The first half of the video demonstrates the issue. prompt() evaluated in console does not return the value "undefined".

The expectation is not to see the dialog, dialog is not shows for options. But console should keep evaluating values, so evaluating "1" in console should always return.
Status: Fixed (was: Assigned)

Sign in to add a comment