Window type=panel has sidebarAction residing within
Categories
(Firefox :: Session Restore, defect)
Tracking
()
People
(Reporter: julianhofstadter, Unassigned)
Details
Attachments
(1 file)
25.95 KB,
application/x-xpinstall
|
Details |
There is a behavior I have observed with panels created with windows.create({ type: "panel"}). If an addon is sporting a UI which is open in the sidebar, when certain conditions are met, if the addon opens a panel, there is a sidebarAction instance living within the panel, even if it is not visible.
The problem this creates is that resources are being drained by the panel's sidebar UI, even though they are of no benefit to the user.
I have verified this on Macos, though the problem may also exist on other OSes.
To demonstrate:
-
Create new profile.
-
Ensure "Restore previous session" is checked under Preferences > General > Startup.
-
Install attached demo addon. ( "Private windows" option not necessary.)
-
If addon did not automatically open in the sidebar, manually open it from View > Sidebar > Panel / Sidebar Action Demo. (If you had to open it manually, it may be worthwhile to restart Firefox to ensure it restarts with the sidebar open, with demo addon page loaded.)
-
Open panel using keyboard shortcut Cmd+Shift+0 (Ctrl+Shift+0 on non-Mac).
-
LEAVE PANEL OPEN and restart Firefox. (This step is necessary to observe the issue.)
-
Observe the restored panel. (It may or may not display the sidebar - see bug 1659844).
-
Close the panel using Cmd+W (Ctrl+W non-Mac).
-
Open a new panel using Cmd+Shift+0 (Ctrl+Shift+0 on non-Mac).
-
Observe output (Output will be sent to command line if window.dump is enabled, otherwise will be sent to javascript console assuming appropriate settings are made.)
-
After 2s delay from opening the panel, you should see output like:
>> panelbreaksaddondemo: PANEL: hosting windowId: 112 id of panel opened by windows.create: 112
>> panelbreaksaddondemo: SIDEBAR: hosting windowId: 112 id of panel opened by windows.create: 112
>> panelbreaksaddondemo: ATTEMPT TO LOAD SIDEBAR IN PANEL (hosting windowId == id of currently open panel)
Output containing "SIDEBAR:" comes from a page loaded in a sidebar.
Output containing "PANEL:" comes from a page loaded in the panel.
"hosting windowId" is the id of the window in which resides the panel or sidebar.
Note the presence of "SIDEBAR:", meaning a page just got loaded in the sidebar, and also the fact that the id of the panel opened by windows.create" is the same as the hosting windowId of the sidebar, confirming that code is running within the sidebar of the panel (albeit not visible).
- Also, if while the panel is focused, you look at View > Sidebar > Panel / Sidebar Action Demo is checked, indicating it is "open" in the panel.
Reporter | ||
Comment 1•5 years ago
|
||
Related: Bug 1659844
Comment 2•5 years ago
|
||
Setting a component for this issue in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.
Comment 3•4 years ago
|
||
The severity field is not set for this bug.
:mikedeboer, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 4•1 year ago
|
||
Canceling needinfo because Mike's account is inactive.
Updated•1 year ago
|
Description
•