mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Remove base conditional code for crash reporter and injector.
This commit is contained in:
parent
87fa26d31e
commit
434f3590e3
131 changed files with 39 additions and 4139 deletions
|
|
@ -63,9 +63,7 @@ var gPluginHandler = {
|
|||
msg.data.pluginID);
|
||||
break;
|
||||
case "PluginContent:SubmitReport":
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
this.submitReport(msg.data.runID, msg.data.keyVals, msg.data.submitURLOptIn);
|
||||
}
|
||||
// Nothing to do here
|
||||
break;
|
||||
case "PluginContent:LinkClickCallback":
|
||||
switch (msg.data.name) {
|
||||
|
|
@ -98,11 +96,8 @@ var gPluginHandler = {
|
|||
},
|
||||
|
||||
submitReport: function submitReport(runID, keyVals, submitURLOptIn) {
|
||||
if (!AppConstants.MOZ_CRASHREPORTER) {
|
||||
return;
|
||||
}
|
||||
Services.prefs.setBoolPref("dom.ipc.plugins.reportCrashURL", submitURLOptIn);
|
||||
PluginCrashReporter.submitCrashReport(runID, keyVals);
|
||||
/*** STUB ***/
|
||||
return;
|
||||
},
|
||||
|
||||
// Callback for user clicking a "reload page" link
|
||||
|
|
@ -461,18 +456,7 @@ var gPluginHandler = {
|
|||
|
||||
// If we don't have a minidumpID, we can't (or didn't) submit anything.
|
||||
// This can happen if the plugin is killed from the task manager.
|
||||
let state;
|
||||
if (!AppConstants.MOZ_CRASHREPORTER || !gCrashReporter.enabled) {
|
||||
// This state tells the user that crash reporting is disabled, so we
|
||||
// cannot send a report.
|
||||
state = "noSubmit";
|
||||
} else if (!pluginDumpID) {
|
||||
// This state tells the user that there is no crash report available.
|
||||
state = "noReport";
|
||||
} else {
|
||||
// This state asks the user to submit a crash report.
|
||||
state = "please";
|
||||
}
|
||||
let state = "noSubmit";
|
||||
|
||||
let mm = window.getGroupMessageManager("browsers");
|
||||
mm.broadcastAsyncMessage("BrowserPlugins:NPAPIPluginProcessCrashed",
|
||||
|
|
@ -513,22 +497,6 @@ var gPluginHandler = {
|
|||
callback: function() { browser.reload(); },
|
||||
}];
|
||||
|
||||
if (AppConstants.MOZ_CRASHREPORTER &&
|
||||
PluginCrashReporter.hasCrashReport(pluginID)) {
|
||||
let submitLabel = gNavigatorBundle.getString("crashedpluginsMessage.submitButton.label");
|
||||
let submitKey = gNavigatorBundle.getString("crashedpluginsMessage.submitButton.accesskey");
|
||||
let submitButton = {
|
||||
label: submitLabel,
|
||||
accessKey: submitKey,
|
||||
popup: null,
|
||||
callback: () => {
|
||||
PluginCrashReporter.submitCrashReport(pluginID);
|
||||
},
|
||||
};
|
||||
|
||||
buttons.push(submitButton);
|
||||
}
|
||||
|
||||
notification = notificationBox.appendNotification(messageString, "plugin-crashed",
|
||||
iconURL, priority, buttons);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,11 +61,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
|
||||
"resource://gre/modules/SafeBrowsing.jsm");
|
||||
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PluginCrashReporter",
|
||||
"resource:///modules/ContentCrashHandlers.jsm");
|
||||
}
|
||||
|
||||
// lazy service getters
|
||||
[
|
||||
["Favicons", "@mozilla.org/browser/favicon-service;1", "mozIAsyncFavicons"],
|
||||
|
|
@ -74,13 +69,6 @@ if (AppConstants.MOZ_CRASHREPORTER) {
|
|||
["gDNSService", "@mozilla.org/network/dns-service;1", "nsIDNSService"],
|
||||
].forEach(([name, cc, ci]) => XPCOMUtils.defineLazyServiceGetter(this, name, cc, ci));
|
||||
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gCrashReporter",
|
||||
"@mozilla.org/xre/app-info;1",
|
||||
"nsICrashReporter");
|
||||
}
|
||||
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function() {
|
||||
let tmp = {};
|
||||
Cu.import("resource://devtools/client/framework/ToolboxProcess.jsm", tmp);
|
||||
|
|
@ -4589,23 +4577,6 @@ var XULBrowserWindow = {
|
|||
setTimeout(function () { XULBrowserWindow.asyncUpdateUI(); }, 0);
|
||||
else
|
||||
this.asyncUpdateUI();
|
||||
|
||||
if (AppConstants.MOZ_CRASHREPORTER && aLocationURI) {
|
||||
let uri = aLocationURI.clone();
|
||||
try {
|
||||
// If the current URI contains a username/password, remove it.
|
||||
uri.userPass = "";
|
||||
} catch (ex) { /* Ignore failures on about: URIs. */ }
|
||||
|
||||
try {
|
||||
gCrashReporter.annotateCrashReport("URL", uri.spec);
|
||||
} catch (ex) {
|
||||
// Don't make noise when the crash reporter is built but not enabled.
|
||||
if (ex.result != Components.results.NS_ERROR_NOT_INITIALIZED) {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
asyncUpdateUI: function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue