mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 12:27:29 +09:00
DevTools - Browser Console - restore sessions
https://github.com/MoonchildProductions/moebius/pull/112
This commit is contained in:
parent
173d356acd
commit
63ba51f58e
17 changed files with 135 additions and 46 deletions
|
|
@ -7921,7 +7921,7 @@ var TabContextMenu = {
|
|||
Object.defineProperty(this, "HUDService", {
|
||||
get: function HUDService_getter() {
|
||||
let devtools = Cu.import("resource://devtools/shared/Loader.jsm", {}).devtools;
|
||||
return devtools.require("devtools/client/webconsole/hudservice");
|
||||
return devtools.require("devtools/client/webconsole/hudservice").HUDService;
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
|
|
|
|||
|
|
@ -186,6 +186,15 @@ XPCOMUtils.defineLazyModuleGetter(this, "ViewSourceBrowser",
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown",
|
||||
"resource://gre/modules/AsyncShutdown.jsm");
|
||||
|
||||
Object.defineProperty(this, "HUDService", {
|
||||
get: function HUDService_getter() {
|
||||
let devtools = Cu.import("resource://devtools/shared/Loader.jsm", {}).devtools;
|
||||
return devtools.require("devtools/client/webconsole/hudservice").HUDService;
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
});
|
||||
|
||||
/**
|
||||
* |true| if we are in debug mode, |false| otherwise.
|
||||
* Debug mode is controlled by preference browser.sessionstore.debug
|
||||
|
|
@ -2570,10 +2579,16 @@ var SessionStoreInternal = {
|
|||
this._capClosedWindows();
|
||||
}
|
||||
|
||||
// Scratchpad
|
||||
if (lastSessionState.scratchpads) {
|
||||
ScratchpadManager.restoreSession(lastSessionState.scratchpads);
|
||||
}
|
||||
|
||||
// The Browser Console
|
||||
if (lastSessionState.browserConsole) {
|
||||
HUDService.restoreBrowserConsoleSession();
|
||||
}
|
||||
|
||||
// Set data that persists between sessions
|
||||
this._recentCrashes = lastSessionState.session &&
|
||||
lastSessionState.session.recentCrashes || 0;
|
||||
|
|
@ -2931,6 +2946,7 @@ var SessionStoreInternal = {
|
|||
global: this._globalState.getState()
|
||||
};
|
||||
|
||||
// Scratchpad
|
||||
if (Cu.isModuleLoaded("resource://devtools/client/scratchpad/scratchpad-manager.jsm")) {
|
||||
// get open Scratchpad window states too
|
||||
let scratchpads = ScratchpadManager.getSessionState();
|
||||
|
|
@ -2939,6 +2955,9 @@ var SessionStoreInternal = {
|
|||
}
|
||||
}
|
||||
|
||||
// The Browser Console
|
||||
state.browserConsole = HUDService.getBrowserConsoleSessionState();
|
||||
|
||||
// Persist the last session if we deferred restoring it
|
||||
if (LastSession.canRestore) {
|
||||
state.lastSessionState = LastSession.getState();
|
||||
|
|
@ -3290,9 +3309,15 @@ var SessionStoreInternal = {
|
|||
|
||||
this.restoreWindow(aWindow, root.windows[0], aOptions);
|
||||
|
||||
// Scratchpad
|
||||
if (aState.scratchpads) {
|
||||
ScratchpadManager.restoreSession(aState.scratchpads);
|
||||
}
|
||||
|
||||
// The Browser Console
|
||||
if (aState.browserConsole) {
|
||||
HUDService.restoreBrowserConsoleSession();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue