New issue
Advanced search Search tips

Issue 777368 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 26
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

JavaScript executing while paused in debugger

Reported by m.burzyn...@livechatinc.com, Oct 23 2017

Issue description

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

Steps to reproduce the problem:
Simple case for this can be reproduced here - https://jsfiddle.net/k5653brv/
1. open developer console
2. change tab
3. change tab back - you should be paused in the debugger
4. change tabs back and forth - observe new console.logs showing up (while being paused in the debugger!)

What is the expected behavior?
No javascript should get executed when the execution is paused

What went wrong?
JavaScript gets executed simultaneously (when it is supposed to be single threaded) causing various subtle bugs, specific to thread programming (shared state problems etc)

Did this work before? No 

Chrome version: 61.0.3163.100  Channel: stable
OS Version: OS X 10.12.3
Flash Version: 

Ive discovered just now that the same thing happen for buffered messages comming though MessagePort. Can send repro later if you decide it's also worth looking into and that it is different issue than the one with visibility change event, but to sum the problem up - I have a parent page and an iframe:

1. parent page creates iframe
2. parent page created a MessagePort and sends it to the iframe
3. in the meantime it sends other messages through the port (they get buffered)
4. after a moment the iframe addEventListener to the port and calls .start() method on the port
5. we put the debugger right after calling port.start()
6. we can observe port's message event listener being executed while being paused in the debugger
 
Components: -Blink Platform>DevTools
Over to DevTools for triage.
While the issue is easily detectable when using DevTools I don't think it is DevTools bug, because it causes problems even without DevTools being open.
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
Alexey, mind taking a look? I suspect that visibilitychange comes through a place we do not suspend.
Status: Fixed (was: Assigned)
It was fixed by https://chromium-review.googlesource.com/c/chromium/src/+/737616
How can I check if the change has been released to stable Chrome?

I've just checked on Version 69.0.3497.100 (Official Build) (64-bit) and the issue is still present.

Sign in to add a comment