Closed
Bug 748477
Opened 11 years ago
Closed 11 years ago
Switch chrome privateWindow getter to check currentTab and remove setter
Categories
(Firefox :: Private Browsing, defect)
Tracking
()
RESOLVED
FIXED
Firefox 16
People
(Reporter: jdm, Assigned: sawrubh)
References
Details
(Whiteboard: [mentor=ehsan][lang=js])
Attachments
(1 file, 1 obsolete file)
4.15 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Having discussed the ramifications of bug 723353 some more, Ehsan and I have decided that we should eliminate the setter and make the getter operate on the current tab instead of the entire window. Even though we are not planning to ship with a per-tab PB implementation, we don't want to deny addon authors the ability to create one. This means that our code that uses the JS API to determine PB status must not break in the presence of a per-tab implementation, hence the switch to currentTab. Since the prospect of an asymmetric API that checks the current tab but sets the whole window is unappealing, we'll remove the setter and manipulate docshells when necessary in the chrome code. This will require updating a couple tests that use this new setter.
Updated•11 years ago
|
Whiteboard: [mentor=ehsan][lang=js]
Assignee | ||
Comment 1•11 years ago
|
||
Please assign this to me.
Updated•11 years ago
|
Assignee: nobody → saurabhanandiit
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #631231 -
Flags: review?(ehsan)
Comment 3•11 years ago
|
||
Comment on attachment 631231 [details] [diff] [review] Patch v1 Looks great, but you have a small mistake: you need to flip the order of arguments passed to setPrivateWindow in the test files as well.
Attachment #631231 -
Flags: review?(ehsan)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #631231 -
Attachment is obsolete: true
Attachment #631239 -
Flags: review?(ehsan)
Comment 5•11 years ago
|
||
Comment on attachment 631239 [details] [diff] [review] Patch v2 Looks great! r=me
Attachment #631239 -
Flags: review?(ehsan) → review+
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/3e22b1ebabf4
Target Milestone: --- → Firefox 16
Updated•11 years ago
|
Flags: in-testsuite+
Comment 7•11 years ago
|
||
Comment on attachment 631239 [details] [diff] [review] Patch v2 >+ return gBrowser.selectedTab.linkedBrowser >+ .docShell.QueryInterface(Ci.nsILoadContext) >+ .usePrivateBrowsing; I hate to spoil your fun but gBrowser has a .docShell property...
Assignee | ||
Comment 8•11 years ago
|
||
@Neil But if I use |gBrowser.docShell|, wouldn't that refer to the docShell of the current window, while we need to use the use the PB mode flag per tab, for which we need to access the docShell of each tab.
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3e22b1ebabf4 (Merged by Ed Morley)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 10•11 years ago
|
||
That docShell property is defined here: <http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#2364> and it seems to do what we want. Saurabh, do you want to file a follow-up bug to fix this? :-)
You need to log in
before you can comment on or make changes to this bug.
Description
•