mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
Bug 1297758 - Throw when accessing any unimplemented toolbox function when loading inspector in a tab. r=pbro
MozReview-Commit-ID: AsI0Fluyu7j
This commit is contained in:
parent
fe2bd4d67a
commit
5df990c711
@ -1853,6 +1853,9 @@ if (url.search.length > 1) {
|
||||
Task.spawn(function* () {
|
||||
let target = yield targetFromURL(url);
|
||||
|
||||
let notImplemented = function () {
|
||||
throw new Error("Not implemented in a tab");
|
||||
};
|
||||
let fakeToolbox = {
|
||||
target,
|
||||
hostType: "bottom",
|
||||
@ -1873,6 +1876,21 @@ if (url.search.length > 1) {
|
||||
isToolRegistered() {
|
||||
return false;
|
||||
},
|
||||
currentToolId: "inspector",
|
||||
getCurrentPanel() {
|
||||
return "inspector";
|
||||
},
|
||||
get textboxContextMenuPopup() {
|
||||
notImplemented();
|
||||
},
|
||||
getPanel: notImplemented,
|
||||
openSplitConsole: notImplemented,
|
||||
viewCssSourceInStyleEditor: notImplemented,
|
||||
viewJsSourceInDebugger: notImplemented,
|
||||
viewSource: notImplemented,
|
||||
viewSourceInDebugger: notImplemented,
|
||||
viewSourceInStyleEditor: notImplemented,
|
||||
|
||||
// For attachThread:
|
||||
highlightTool() {},
|
||||
unhighlightTool() {},
|
||||
|
Loading…
Reference in New Issue
Block a user