Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag Synchronous option in XMLHttpRequest.open #2086

Closed
erosman opened this issue Jun 30, 2018 · 3 comments
Closed

Flag Synchronous option in XMLHttpRequest.open #2086

erosman opened this issue Jun 30, 2018 · 3 comments

Comments

@erosman
Copy link
Contributor

erosman commented Jun 30, 2018

Example:
https://reviewers.addons.mozilla.org/en-US/firefox/files/compare/1002571...991553/file/bgr.js#L12

httpGet = function(url)
{
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", url, false );
    xmlHttp.send( null );
    return xmlHttp.responseText;
}
@EnTeQuAk
Copy link
Contributor

EnTeQuAk commented Jul 2, 2018

@erosman Why should we flag this? Is that a rule in our policy somewhere?

I'm sure there are good reasons to flag this, e.g synchronous calls may block user ui etc but generally, it's hard to make this false-positive proof since the synchronous request can be hidden in some async code somewhere.

Not sure what the benefit would be here.

cc @wagnerand

@wagnerand
Copy link
Member

@EnTeQuAk I think your example talks about a false negative. I think we can live with that since we'll never reach 100% coverage using those static checks and this warning is to point out obvious mistakes instead of trying to identify sneaky behavior.

P3 is fine though, it's not a high priority.

@stale
Copy link

stale bot commented Oct 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants