Hang Recovery only allows me to kill the page, not stop the long running script
Reported by
joshpatt...@outlook.com,
Sep 17 2017
|
||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Steps to reproduce the problem:
Run this:
<html>
<body>
<script>
alert('hi');
</script>
hi world
<script>
var i = 0;
while (i || !i) {
i++;
}
</script>
</body>
</html>
What is the expected behavior?
Firefox and Internet Explorer both allow me to kill the script and finish loading the content.
Edge pops up an info bar that allows me to "recover" (i.e. reload) the page.
Chrome just gives me the option to kill the page.
What went wrong?
Is there no way to kill the script instead of the whole page?
Crashed report ID:
How much crashed? Just one tab
Is it a problem with a plugin? No
Did this work before? N/A
Chrome version: 60.0.3112.113 Channel: n/a
OS Version: 10.0
Flash Version:
Full disclosure, I'm a dev on the oculus browser team, a chromium based browser.
,
Sep 18 2017
Able to reproduce the issue on the latest canary(63.0.3218.0) on Windows-10. Similar behavior is seen on older chrome version: 50.0.2624.0 as well.Attached is the test file. No warning dialog as such was see on Windows Chrome like FF/IE/Chrome Mac/Chrome Linux Note: FF shows an infobar with Stop and Wait buttons. IE shows 'Stop script' button. Mac and Linux on Chrome showed 'Page Unresponsive' dialog with 'Kill' and 'Wait' buttons.
,
Feb 11 2018
,
Feb 12 2018
,
Feb 12 2018
That's an interesting API. In Chromium, V8 lives directly in the render process and AFAIK on the main thread, so it's not quite that easy. This is a little beyond my expertise, though. V8 team, is there a reasonable way of doing this today?
,
Feb 20 2018
,
Feb 20 2018
V8 does offer termination through its API. You can, from a watchdog thread, call v8::Isolate::TerminateExecution, and later, v8::Isolate::CancelTerminateExecution. However, this only works well with only V8 on the stack. Many places in Blink do not expect a call to V8 to return with an exception. So if you fire a termination while V8 calls into Blink and from there back into V8, you might see a crash when the second V8 call returns to Blink.
,
Aug 15
There has been no progress on this issue hence I mark it as WontFix. Feel free to reopen if there is more to add. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by joshpatt...@outlook.com
, Sep 17 2017