mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 787410 - Allow overriding the plugin hang report submission URL via prefs (also allow overriding in general using MOZ_CRASHREPORTER_URL like the standalone client does), r?ted
This commit is contained in:
parent
575193173d
commit
76a50aec21
@ -176,10 +176,26 @@ Submitter.prototype = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let serverURL = reportData.ServerURL;
|
||||||
|
delete reportData.ServerURL;
|
||||||
|
|
||||||
|
// Override the submission URL from the environment or prefs.
|
||||||
|
|
||||||
|
var envOverride = Cc['@mozilla.org/process/environment;1'].
|
||||||
|
getService(Ci.nsIEnvironment).get("MOZ_CRASHREPORTER_URL");
|
||||||
|
if (envOverride != '') {
|
||||||
|
serverURL = envOverride;
|
||||||
|
}
|
||||||
|
else if ('PluginHang' in reportData) {
|
||||||
|
try {
|
||||||
|
serverURL = Services.prefs.
|
||||||
|
getCharPref("toolkit.crashreporter.pluginHangSubmitURL");
|
||||||
|
} catch(e) { }
|
||||||
|
}
|
||||||
|
|
||||||
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||||
.createInstance(Ci.nsIXMLHttpRequest);
|
.createInstance(Ci.nsIXMLHttpRequest);
|
||||||
xhr.open("POST", reportData.ServerURL, true);
|
xhr.open("POST", serverURL, true);
|
||||||
delete reportData.ServerURL;
|
|
||||||
|
|
||||||
let formData = Cc["@mozilla.org/files/formdata;1"]
|
let formData = Cc["@mozilla.org/files/formdata;1"]
|
||||||
.createInstance(Ci.nsIDOMFormData);
|
.createInstance(Ci.nsIDOMFormData);
|
||||||
|
Loading…
Reference in New Issue
Block a user