Invalid Global called in dangerous manner when submitting XPI

RESOLVED DUPLICATE of bug 665046

Status

addons.mozilla.org Graveyard
Developer Pages
RESOLVED DUPLICATE of bug 665046
7 years ago
2 years ago

People

(Reporter: mkaply, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
When I uploaded my TrackerBlock add-on, I got this warning:

Global called in dangerous manner
Warning: Synchronous HTTP requests can cause serious UI performance problems, especially to users with slow network connections.
modules/AdNetworks.jsm

    request.overrideMimeType("application/json");
    request.open("GET", "chrome://privacychoice/content/adnetworks/networks.json");

XMLHTTPRequest default to async, not sync so if there is no false parameter, this warning is unnecessary:

See:

https://developer.mozilla.org/En/NsIXMLHttpRequest#open()

Comment 1

7 years ago
Created attachment 540562 [details] [diff] [review]
proposed patch

Changing logic check in XHR test to only apply if there are > 2 arguments and the 3rd argument is false
Attachment #540562 - Flags: feedback?(mbasta)

Updated

7 years ago
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 665046

Updated

6 years ago
Attachment #540562 - Flags: feedback?(mattbasta)
(Assignee)

Updated

2 years ago
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.