зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1702516
- Remove Temporarily disable extension button r=florian
Fairly straightforward - this removes the button from the slow add-on script notification, as well as the functions that only it utilizes. Differential Revision: https://phabricator.services.mozilla.com/D110582
This commit is contained in:
Родитель
d7e344e956
Коммит
d5a34a1fb7
|
@ -702,8 +702,6 @@ processHang.add-on.label2 = “%1$S” is slowing down %2$S. To speed up your br
|
|||
processHang.add-on.learn-more.text = Learn more
|
||||
processHang.button_stop.label2 = Stop
|
||||
processHang.button_stop.accessKey = S
|
||||
processHang.button_stop_sandbox.label2 = Temporarily disable extension
|
||||
processHang.button_stop_sandbox.accessKey = A
|
||||
processHang.button_debug.label = Debug Script
|
||||
processHang.button_debug.accessKey = D
|
||||
|
||||
|
|
|
@ -110,14 +110,6 @@ var ProcessHangMonitor = {
|
|||
this.handleUserInput(win, report => report.terminateScript());
|
||||
},
|
||||
|
||||
/**
|
||||
* Terminate Sandbox globals associated with the hang being reported
|
||||
* for the selected browser in |win|.
|
||||
*/
|
||||
terminateGlobal(win) {
|
||||
this.handleUserInput(win, report => report.terminateGlobal());
|
||||
},
|
||||
|
||||
/**
|
||||
* Start devtools debugger for JavaScript associated with the hang
|
||||
* being reported for the selected browser in |win|.
|
||||
|
@ -169,24 +161,6 @@ var ProcessHangMonitor = {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop all scripts from running in the Sandbox global attached to
|
||||
* this window.
|
||||
*/
|
||||
stopGlobal(win) {
|
||||
let report = this.findActiveReport(win.gBrowser.selectedBrowser);
|
||||
if (!report) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (report.hangType) {
|
||||
case report.SLOW_SCRIPT:
|
||||
this._recordTelemetryForReport(report, "user-aborted");
|
||||
this.terminateGlobal(win);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Terminate whatever is causing this report, be it an add-on, page script,
|
||||
* or plug-in. This is done without updating any report notifications.
|
||||
|
@ -577,22 +551,11 @@ var ProcessHangMonitor = {
|
|||
brandShortName,
|
||||
]);
|
||||
|
||||
buttons.unshift(
|
||||
{
|
||||
label: bundle.getString("processHang.add-on.learn-more.text"),
|
||||
link:
|
||||
"https://support.mozilla.org/kb/warning-unresponsive-script#w_other-causes",
|
||||
},
|
||||
{
|
||||
label: bundle.getString("processHang.button_stop_sandbox.label2"),
|
||||
accessKey: bundle.getString(
|
||||
"processHang.button_stop_sandbox.accessKey"
|
||||
),
|
||||
callback() {
|
||||
ProcessHangMonitor.stopGlobal(win);
|
||||
},
|
||||
}
|
||||
);
|
||||
buttons.unshift({
|
||||
label: bundle.getString("processHang.add-on.learn-more.text"),
|
||||
link:
|
||||
"https://support.mozilla.org/kb/warning-unresponsive-script#w_other-causes",
|
||||
});
|
||||
} else {
|
||||
let scriptBrowser = report.scriptBrowser;
|
||||
if (scriptBrowser == win.gBrowser?.selectedBrowser) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче