Closed Bug 1310112 Opened 9 years ago Closed 9 years ago

Add pref for using private containers in thumbnail loads

Categories

(Core :: DOM: Security, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox51 --- fixed
firefox52 --- fixed

People

(Reporter: jhao, Assigned: timhuang)

References

(Blocks 1 open bug)

Details

(Whiteboard: [userContextId][domsecurity-active])

Attachments

(2 files, 7 obsolete files)

There's still a failure with this patch if you run `./mach mochitest toolkit/components/thumbnails/test`.
Blocks: 1310934
See Also: → 1309699
We need to add this pref in Firefox 51 and 52, or we are going to have more crash issues.
Priority: -- → P1
Attachment #8802821 - Flags: review?(markh)
Attachment #8800992 - Attachment is obsolete: true
Assignee: nobody → tihuang
Attached patch Rebased for aurora uplift. (obsolete) — Splinter Review
Attached patch Rebased for aurora uplift. (obsolete) — Splinter Review
Attachment #8802866 - Attachment is obsolete: true
Attachment #8802821 - Flags: review?(markh) → review+
Comment on attachment 8802821 [details] [diff] [review] Add pref for using private containers in about:newtab. Actually, I'm not sure what the intent of this is. The pref is already disabled on non-nightly builds, and all this patch does is to allow the pref to be flipped while the browser is running - and as written, it seems like there's a risk that it will be flipped during a capture, which will probably break.
Attachment #8802821 - Flags: review+
Tanvi, do we allow a user to change this pref during the browser is running? If we do, we have to figure out how to resolve the problem that Mark has stated in the comment 7. Maybe we could lock the pref during a capture.
Flags: needinfo?(tanvi)
I don't completely follow the comments here. The pref privacy.usercontext.about_newtab_segregation.enabled doesn't exist yet. In Firefox 51 and 52, we segregate thumbnails by default with no pref to disable that segregation. What we'd like is to add an privacy.usercontext.about_newtab_segregation.enabled pref and enable it in Nightly only. If a user tries to toggle the pref value in about:config, I am fine with requiring a restart. Either we can prompt the user while they are on about:config, telling them they have to restart for the pref to take effect. Or do nothing, and start segregating after a restart. Are there other about:config prefs that require restart? We can follow their pattern. Again, I'm not sure I got the question right. So please let me know if I haven't answered it.
Flags: needinfo?(tanvi)
Actually, the pref 'privacy.usercontext.about_newtab_segregation.enabled' already exists in the m-c [1]. But it doesn't exist in the Firefox 51. So, Nightly has this pref. [1] http://searchfox.org/mozilla-central/source/browser/app/profile/firefox.js#1421
Whiteboard: [userContextId][domsecurity-backlog] → [userContextId][domsecurity-active]
(In reply to Tim Huang[:timhuang] from comment #10) > Actually, the pref 'privacy.usercontext.about_newtab_segregation.enabled' > already exists in the m-c [1]. But it doesn't exist in the Firefox 51. So, > Nightly has this pref. > > [1] > http://searchfox.org/mozilla-central/source/browser/app/profile/firefox. > js#1421 That is odd; I thought this was backed out of Firefox 52, but it looks like only this test change was backed out: https://bugzilla.mozilla.org/show_bug.cgi?id=1309699#c46 But the code stayed in Nightly - https://bugzilla.mozilla.org/show_bug.cgi?id=1309699#c7. Does test toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js pass in mozilla-central? Does that test still need to be updated in Firefox 52? Tim, is your attached patch https://bugzilla.mozilla.org/attachment.cgi?id=8802821 for 51, 52, or both? We need to add the pref in Firefox 51 and set it to false.
(In reply to Tanvi Vyas [:tanvi] from comment #9) > I don't completely follow the comments here. The pref > privacy.usercontext.about_newtab_segregation.enabled doesn't exist yet. In > Firefox 51 and 52, we segregate thumbnails by default with no pref to > disable that segregation. > > What we'd like is to add an > privacy.usercontext.about_newtab_segregation.enabled pref and enable it in > Nightly only. If a user tries to toggle the pref value in about:config, I > am fine with requiring a restart. Either we can prompt the user while they > are on about:config, telling them they have to restart for the pref to take > effect. Or do nothing, and start segregating after a restart. If we can accept "do nothing, and start segregating after a restart", the current code in central is already correct. However, a testcase will fail if applied to aurora because we can't restart the browser after turning on the pref in that test. One idea is to create an API to re-initialize the xul browser, and use that in the test. > Are there other about:config prefs that require restart? We can follow > their pattern. > > Again, I'm not sure I got the question right. So please let me know if I > haven't answered it.
(In reply to Tanvi Vyas [:tanvi] from comment #9) > ... If a user tries to toggle the pref value in about:config, I > am fine with requiring a restart. Either we can prompt the user while they > are on about:config, telling them they have to restart for the pref to take > effect. Or do nothing, and start segregating after a restart. > > Are there other about:config prefs that require restart? We can follow > their pattern. Yes, there are some prefs that require restart. (Prefs that don't listen to pref change event or use pref cache variable) And users won't be told that a restart is required. Usually they can only obtain this information by documents. For example, https://wiki.mozilla.org/Electrolysis#Firefox_Beta "If you would like to opt-in to help us test open about:config and toggle browser.tabs.remote.autostart to true. On your next restart, e10s should be active."
Mark, I think we still have to have the ability to change this Pref in the run time since the test case 'browser_thumbnails_bg_no_cookies_stored.js' needs this Pref to be on to pass. So, this test will pass for Nightly, but won't for Aurora. If we want to make it pass for Aurora, we need to change this Pref in the test case. However, if the Pref takes effect only after a restart, then the test will still fail because the thumbnail browser is already created by other test cases. So, we need to make this Pref can be changed during the browser is running. This patch will not destroy the thumbnails browser during a capture. It makes the service renew the thumbnails browser at the beginning of the next capture.
Attachment #8806647 - Flags: review?(markh)
Attachment #8802821 - Attachment is obsolete: true
Attachment #8806647 - Attachment is obsolete: true
Attachment #8806647 - Flags: review?(markh)
Attachment #8806675 - Flags: review?(markh) → review+
try looks good.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3eee70f71e85 Make the pref for using private containers in about:newtab can be changed during the browser is running. r=markh
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Attached patch Rebased for aurora uplift (obsolete) — Splinter Review
Attachment #8802915 - Attachment is obsolete: true
Attached patch Rebased for aurora uplift (obsolete) — Splinter Review
Attachment #8808098 - Attachment is obsolete: true
Attachment #8808099 - Attachment is obsolete: true
Comment on attachment 8808102 [details] [diff] [review] Rebased for aurora uplift Approval Request Comment [Feature/regressing bug #]: 1289001 [User impact if declined]: The users will encounter crash problem which describes in the bug 1289001 [Describe test coverage new/current, TreeHerder]: The test 'browser_thumbnails_bg_no_cookies_stored.js' will test this pref. [Risks and why]: No risk.
Attachment #8808102 - Flags: approval-mozilla-aurora?
Comment on attachment 8808102 [details] [diff] [review] Rebased for aurora uplift Add a pref to enable the "private containers in thumbnail loads" in nightly only. It should not impact aurora/beta/release. Take it in 51 aurora.
Attachment #8808102 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: