Closed Bug 1278664 Opened 8 years ago Closed 8 years ago

Chrome Docshells have OriginAttributes.mPrivateBrowsingId set

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox49 --- disabled
firefox50 --- fixed
firefox51 --- fixed

People

(Reporter: jandreou25, Assigned: jandreou25)

References

Details

(Whiteboard: btpp-active)

Attachments

(1 file, 2 obsolete files)

Currently all DocShells opened by a private window have mPrivateBrowsingId set. The patch for this will only allow content Docshells to have a private browsing origin attribute.
Assignee: nobody → jandreou
Whiteboard: btpp-active
Attached patch Bug1278664.patch (obsolete) — Splinter Review
Attachment #8761324 - Flags: review?(bugs)
Blocks: 1269361
Summary: Chrome Dochsells have OriginAttributes.mPrivateBrowsingId set → Chrome Docshells have OriginAttributes.mPrivateBrowsingId set
Comment on attachment 8761324 [details] [diff] [review]
Bug1278664.patch

You could just call UsePrivateBrowsing() in most places where mPrivateBrowsingId > 0 is used currently. And for mPrivateBrowsingId == 0 comparisons !UsePrivateBrowser() could be used.
I guess only nsDocShell::GetUsePrivateBrowsing needs to do explicit mPrivateBrowsingId > 0; check.
Using the method would make the code a bit easier to read. So, with that, r+.

FWIW, UsePrivateBrowsing() is a helper method defined in nsILoadContext which nsDocShell extends.


Not about this bug, but really odd to see nsDocShell::Destroy() to play with origin attributes.
Attachment #8761324 - Flags: review?(bugs) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9fdca91d175e
Chrome docshells can't have private browsing OriginAttribute. r=smaug
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/3fb62649e99a
TabContext were not being passed the right PrivateBrowsingId r=baku,smaug
https://hg.mozilla.org/mozilla-central/rev/3fb62649e99a
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
This was backed out from Firefox 49 in bug 1297687.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: