Closed
Bug 1279007
Opened 8 years ago
Closed 7 years ago
Conflated script tag async attribute behavior with sync xhr and message queue
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: ddcast, Unassigned, NeedInfo)
References
()
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36 Steps to reproduce: Appended two script tags with async option `false` to document. The first script source invokes an xhr with async argument `false`, sets a variable (`myvalue`) on window with a string value `somevalue` just after the call (callback not involved). The second script source logs the value of `myvalue` set in the first source. More details and repro example here: https://github.com/ddcast/firefox-sync-bug Actual results: I see `ReferenceError: myvalue is not defined` in log output. Expected results: I should see "somevalue" in log output.
Reporter | ||
Comment 1•8 years ago
|
||
I submitted the bug in a browser different than the one tested in. Tested UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0
Reporter | ||
Updated•8 years ago
|
Version: 47 Branch → 46 Branch
Reporter | ||
Updated•8 years ago
|
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Reporter | ||
Comment 2•8 years ago
|
||
From a footnote in some doc (linked below): "In older browsers that don't support the async attribute, parser-inserted scripts block the parser". A bit alarming because some symptom of the bug (see url- GitHub proj) is congruent with a blocked parser which could mean the async attribute is not, like, really supported or the the expected behavior is compromised. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
Comment 4•8 years ago
|
||
Devin, thanks for the bug report. Can you test this issue with nightly? I can reproduce it with the latest FF release version but not with nightly. In nightly everything works as it should. And also in release it's an intermittent failure. Recently we did many many changes in XHR so maybe this bug has been already fixed. If you can help me with this little test, I appreciate it.
Flags: needinfo?(amarchesini) → needinfo?(ddcast)
Comment 5•8 years ago
|
||
Use of sync XHR in the main thread is of course highly discouraged, but anyhow, isn't this actually a dup of bug 1267989? That should be fixed in FF49, and there is a slight chance to get it to FF48 too.
Reporter | ||
Comment 6•8 years ago
|
||
(In reply to Andrea Marchesini (:baku) from comment #4) > Devin, thanks for the bug report. Can you test this issue with nightly? > I can reproduce it with the latest FF release version but not with nightly. > In nightly everything works as it should. > And also in release it's an intermittent failure. > > Recently we did many many changes in XHR so maybe this bug has been already > fixed. > If you can help me with this little test, I appreciate it. I can reproduce intermittently as well in nightly. Though I should have been more specific in my original report- It was also reproducible intermittently.
Reporter | ||
Comment 7•8 years ago
|
||
Reporter | ||
Comment 8•8 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #5) > Use of sync XHR in the main thread is of course highly discouraged, but > anyhow, > isn't this actually a dup of bug 1267989? > That should be fixed in FF49, and there is a slight chance to get it to FF48 > too. After reviewing the thread for that bug, it's not clear if it's the same - although there is some talk about the parser. If it is - or is related - this one seems like it might be going a different direction I think.
Flags: needinfo?(ddcast)
Comment 9•8 years ago
|
||
Smaug, it seems bug 1267989 must be re-opened again.
Comment 10•8 years ago
|
||
Why? Sounds like this is a different issue then after all. Or that bug 1267989 didn't fix all the variants of the issue. But why to re-open?
Updated•8 years ago
|
Priority: -- → P2
Comment 11•8 years ago
|
||
Devin, can you please re-test now that 49 (which has the fix for bug 1267989) is now the main released version of Firefox?
Flags: needinfo?(ddcast)
Reporter | ||
Comment 12•8 years ago
|
||
Reporter | ||
Comment 13•8 years ago
|
||
Re-tested and I still see the issue in 49 after updating FF (OS X 10.11.6).
Flags: needinfo?(ddcast)
Comment 14•8 years ago
|
||
Thanks for re-testing, Devin. baku, can you investigate?
Flags: needinfo?(amarchesini)
Comment 15•8 years ago
|
||
I'm not able to reproduce this issue. I also took the testcase and I make it a recursive version to see if it was a race condition. No luck.
Flags: needinfo?(amarchesini)
Comment 16•8 years ago
|
||
Devin, do you want to try my test and see if something is missing? Thanks.
Flags: needinfo?(ddcast)
Comment 17•7 years ago
|
||
Close as INCOMPLETE as without more information from the reporter, it's hardly we could move this forward. Hi Devin, please feel free to reopen it if you get a chance to revisit this. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•