Closed
Bug 1279297
Opened 8 years ago
Closed 8 years ago
need to restart fx for the container icon to appear under the hamburger menu
Categories
(Core :: DOM: Security, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: kjozwiak, Assigned: baku)
References
(Blocks 1 open bug)
Details
(Whiteboard: [usercontextId],[domsecurity-active])
Attachments
(1 file, 2 obsolete files)
2.91 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
When enabling containers, users will have to restart the browser for the container icon to appear under the hamburger customization window. Is there anything we can do here or is this a limitation of fx? STR: * launch a brand new installation of m-c * enable containers in about:config via the "privacy.userContext.enabled;true" pref * click on the hamburger menu -> customize and you'll notice that the container icon isn't being displayed * restart fx * click on the hamburger menu -> customize and you'll notice that the container icon is being displayed correctly Platforms Used: * Ubuntu 14.04.4 LTS x64 - Reproduced the issue ** fx50.0a1 buildId: 20160609064045, changeset: f8e3b81a79f4 * OSX 10.11.5 x64 - Reproduced the issue ** fx50.0a1 buildId: 20160609064045, changeset: f8e3b81a79f4 * Win 10 x64 - Reproduced the issue ** fx50.0a1 buildId: 20160609064045, changeset: f8e3b81a79f4
Updated•8 years ago
|
Priority: -- → P3
Updated•8 years ago
|
Whiteboard: [usercontextId] → [usercontextId],[domsecurity-backlog]
Updated•8 years ago
|
Priority: P3 → P1
Updated•8 years ago
|
Priority: P1 → P2
Assignee | ||
Comment 1•8 years ago
|
||
Assignee: nobody → amarchesini
Attachment #8771270 -
Flags: review?(gijskruitbosch+bugs)
Comment 2•8 years ago
|
||
Comment on attachment 8771270 [details] [diff] [review] no_restart1.patch Review of attachment 8771270 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/customizableui/CustomizableWidgets.jsm @@ +1133,5 @@ > + aNode.hidden = !Services.prefs.getBoolPref("privacy.userContext.enabled"); > + } > + > + Services.prefs.addObserver("privacy.userContext.enabled", updateVisibility, false); > + updateVisibility(); You never remove this observer, so if you open a window with the button in it and then close it this code will leak the window (because the pref service has a strong ref to the observer which has a ref to the node and thereby to the window and everything in it). Can you refactor this so there's only 1 observer for the pref instead of 1 per window, and it uses a weak reference? You can store the widget spec in an object, make it implement nsIObserver and nsISupportsWeakReference, and in its observe() method you can loop over CUI.getWidget(this.id).instances and access their 'node' property to make modifications to each of the nodes, inasmuch as they exist.
Attachment #8771270 -
Flags: review?(gijskruitbosch+bugs) → review-
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8771270 -
Attachment is obsolete: true
Attachment #8772413 -
Flags: review?(gijskruitbosch+bugs)
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8772413 -
Attachment is obsolete: true
Attachment #8772413 -
Flags: review?(gijskruitbosch+bugs)
Attachment #8772415 -
Flags: review?(gijskruitbosch+bugs)
Updated•8 years ago
|
Whiteboard: [usercontextId],[domsecurity-backlog] → [usercontextId],[domsecurity-active]
Comment 5•8 years ago
|
||
Comment on attachment 8772415 [details] [diff] [review] no_restart1.patch Review of attachment 8772415 [details] [diff] [review]: ----------------------------------------------------------------- w/ the below, r=me ::: browser/components/customizableui/CustomizableWidgets.jsm @@ +1128,5 @@ > if (PrivateBrowsingUtils.isWindowPrivate(win)) { > aNode.setAttribute("disabled", "true"); > } > + > + Services.prefs.addObserver("privacy.userContext.enabled", this, true); Almost... now just need to make sure we only do this once. Simplest solution is probably to make the spec here a variable ("containerWidget") and push it onto the widget array afterwards, and also run this one line.
Attachment #8772415 -
Flags: review?(gijskruitbosch+bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/82ee6a3e31d6 No restarts needed for Containers when its pref is changed, r=gijs
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/82ee6a3e31d6
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•