Last Comment Bug 1202918 - calling synchronously triggers timeouts
: calling synchronously triggers timeouts
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: 40 Branch
: x86_64 macOS
P5 normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Hsin-Yi Tsai (away ~ 3/26) [:hsinyi]
Depends on:
  Show dependency treegraph
Reported: 2015-09-08 16:59 PDT by calvin.metcalf
Modified: 2019-03-06 15:36 PST (History)
5 users (show)
bzbarsky: needinfo? (smaug)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

1202918.html (568 bytes, text/html)
2015-09-08 17:13 PDT, Loic
no flags Details

Description User image calvin.metcalf 2015-09-08 16:59:02 PDT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36

Steps to reproduce:

opening a window causes timeouts to fire synchronously

the following script (gist: when executed on a page that allows popups and doesn't have the window open (from a previous try):

var called = false;
setTimeout(function (){
  console.log('should be true', called);
console.log('opening');'', 'title', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=100, height=200, top=20, left=20');

called = true;

Actual results:

the timeout is called synchronously when is called leading to the messages

prints to console 


    should be true false


being printed

Expected results:

the timeout should be called asynchronously after the code that changes the variable and print:



    should be true true
Comment 1 User image Loic 2015-09-08 17:13:30 PDT
Created attachment 8658451 [details]
Comment 2 User image Boris Zbarsky [:bzbarsky, bz on IRC] 2015-09-08 19:11:01 PDT
Yeah, spins the event loop when it has to bring up an actual toplevel window.  We should probably suppress events on the caller for the duration or something.
Comment 3 User image Firefox Product Integrity Bug Husbandry Bot (contact :emceeaich) 2019-03-06 15:36:21 PST
## 2019-03-06

This bug is part of a group of bugs which have had an open needinfo for at least 12 weeks. 

The request for information has not been answered, and we can't move forward on the bug so we are closing it.

If the defect is still present, please reopen this bug with an updated report.

Note You need to log in before you can comment on or make changes to this bug.