New issue
Advanced search Search tips

Issue 725471 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Infinite for loop jams the browser

Reported by sahkoha...@gmail.com, May 23 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. Open JS console on a website
2. Type in for(var i=0; i< 3;i++){ i--;}
3.  Browser window or tab won't close anymore, back button doesn't work

What is the expected behavior?
Infinite for loop shouldn't make the browser unresponsive to close command. while(true){} doesn't cause this issue.

What went wrong?
for loop continues forever and the browser just waits for its completion. 

Did this work before? N/A 

Chrome version: 58.0.3029.110  Channel: stable
OS Version: OS X 10.12.4
Flash Version: 

An advertising site might use this trick to force people to stay on their site.
 

Comment 1 by 62...@wsdoc.me, May 23 2017

WHY

Labels: Needs-Triage-M58

Comment 3 by rtoy@chromium.org, May 24 2017

Components: -Blink Platform>DevTools
Status: Untriaged (was: Unconfirmed)
Chrome 59 (beta, OSX) doesn't have this exact problem.  Clicking close on the tab will close the tab.

Creating a page with something like

<script>
      function runLoop ()
      {
        for (var i = 0; i < 3; i++) { i--; }
      }

      window.onload = runLoop;
</script>

Doesn't have this problem.

Perhaps this an issue with dev console?

Comment 4 by rtoy@chromium.org, May 24 2017

Cc: rtoy@chromium.org
Status: WontFix (was: Untriaged)
This behavior can only be observed with devtools opened. We are disabling the watchdog since we'd like web developers to have direct access to the execution. You can pause the page via pressing the pause button in the sources panel.

Sign in to add a comment