mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +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;
|
||||
}
|
||||
|
||||
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"]
|
||||
.createInstance(Ci.nsIXMLHttpRequest);
|
||||
xhr.open("POST", reportData.ServerURL, true);
|
||||
delete reportData.ServerURL;
|
||||
xhr.open("POST", serverURL, true);
|
||||
|
||||
let formData = Cc["@mozilla.org/files/formdata;1"]
|
||||
.createInstance(Ci.nsIDOMFormData);
|
||||
|
Loading…
Reference in New Issue
Block a user