Infinite loop in onbeforeunload can prevent the user from closing the tab or the browser
Reported by
runem...@gmail.com,
Jan 28 2017
|
|||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.13 Safari/537.36
Steps to reproduce the problem:
1. Run this javascript on any page: window.addEventListener("beforeunload", () => {while (true);});
2. Try to close the tab or browser
What is the expected behavior?
The tab should when the beforeunload function takes more than a certain time (10 seconds, for example).
What went wrong?
The CPU usage goes up for that tab and it's impossible to close it other than by ending the process.
Did this work before? Yes
Chrome version: 57.0.2987.13 Channel: dev
OS Version: 6.3
Flash Version: Shockwave Flash 24.0 r0
,
Jan 30 2017
Able to reproduce this issue on Windows-7 & 10, Ubuntu 14.04 and Mac OS 10.12 using chrome latest Dev M57-57.0.2987.13 by following steps mentioned in the original comment. Tested the same on earlier version of chrome M35-35.01849.0 and it displays error saying syntax error, so performed testing it on M47-47.0.2495.0 and observed issue is still seen there. runemoro@ Could you please confirm on which version it used to work this before? Thanks!
,
Apr 6 2017
This work. This hits a one-second timer and then is killed. |
|||
►
Sign in to add a comment |
|||
Comment 1 by nyerramilli@chromium.org
, Jan 29 2017