Closed
Bug 775119
Opened 12 years ago
Closed 12 years ago
e10s: implement nsILoadContext in ParentChannels, remove PrivateBrowsingConsumer
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: jduell.mcbugs, Assigned: jduell.mcbugs)
References
Details
Attachments
(8 files)
1.93 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
3.42 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
17.21 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
14.17 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
14.77 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
16.14 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
11.23 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
5.16 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
This is needed for basecamp.
We kludged in passing usingPrivateBrowsing into necko channels via PrivateBrowsingConsumer in bug 722845. We're going to be passing more information (notably appIDs and isMozBrowser) for Web Apps so we can make app-specific cookiejars, etc. and it makes more sense to just implement nsILoadContext in the parent (even though it has a few DOMWindow fields we won't be able to support), rather than more kludgery.
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 1•12 years ago
|
||
Only tweak needed was to switch to using nsICacheInfoChannel, which is the Child-friendly subset of nsICachingChannel.
Assignee | ||
Comment 2•12 years ago
|
||
jdm: do we have any other tests (mochi?) of the PB-nextgen? If not I'm somewhat appalled :) This adds a very simple test--it makes sure that a PB load followed by a non-PB one doesn't result in a cache hit. Simple, but I've verified that it checks whether PB is working at least minimally.
Attachment #643400 -
Flags: review?(josh)
Updated•12 years ago
|
Attachment #643399 -
Flags: review?(josh) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Passes test_cacheflags.js.
I'm now working on FTP, Wyciwyg, and websockets (looks like nextgen-PB is currently broken for websockets--we don't propagate the PB info from Child to Parent). Patches coming soon, but this patch shows the basic idea here. So stop me now if there's a basic problem here.
Attachment #643401 -
Flags: review?(josh)
Comment 4•12 years ago
|
||
Comment on attachment 643400 [details] [diff] [review]
Simple test of new private browsing API
Review of attachment 643400 [details] [diff] [review]:
-----------------------------------------------------------------
This is a good test addition, thanks.
Attachment #643400 -
Flags: review?(josh) → review+
Comment 5•12 years ago
|
||
So, I was pretty sure that there were tests, but those might simply be in other unfinished bugs that depend on the necko infrastructure (specifically, I was surprised to find only one use of nsIPrivateBrowsingConsumer in the tree).
Comment 6•12 years ago
|
||
Comment on attachment 643401 [details] [diff] [review]
convert HTTPChannelParent to provide nsILoadContext
This looks good to me.
Attachment #643401 -
Flags: review?(josh) → review+
Assignee | ||
Comment 7•12 years ago
|
||
Goes on top of previous HTTP patch
Attachment #644126 -
Flags: review?(josh)
Assignee | ||
Comment 8•12 years ago
|
||
I tried to centralized some of the code here (have a common class that all the ChannelParents could inherit from to get nsILoadChannel spoofing) but ran into some funky XPCOM multiple inheritance issues, so punted.
Attachment #644127 -
Flags: review?(josh)
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #644128 -
Flags: review?(josh)
Assignee | ||
Comment 10•12 years ago
|
||
So we didn't have nextgen-PB working with websockets. The Child doesn't open an HTTPChannel, we do it on the parent, so we need to make sure the WebSocketChannelParent spoofs nsILoadContext (GetInterace call chain is nsHttpChannel->WebSocketChannel->WebSocketChannelParent).
Attachment #644133 -
Flags: review?(josh)
Assignee | ||
Comment 11•12 years ago
|
||
This is the last of it.
Attachment #644135 -
Flags: review?(josh)
Updated•12 years ago
|
blocking-basecamp: ? → +
Comment 12•12 years ago
|
||
Comment on attachment 644126 [details] [diff] [review]
a few more tweaks to HTTP code
Review of attachment 644126 [details] [diff] [review]:
-----------------------------------------------------------------
I like this, except for the caching.
::: netwerk/base/public/nsNetUtil.h
@@ +1299,5 @@
>
> /**
> + * Returns true if channel is using Private Browsing, or false if not.
> + *
> + * Note: you may get a false negative if you call this before AsyncOpen has been
Is this something we might want to warn/assert about?
::: netwerk/protocol/http/HttpBaseChannel.cpp
@@ +273,5 @@
> mCallbacks = aCallbacks;
> mProgressSink = nsnull;
> +
> + // Will never change unless SetNotificationCallbacks called again, so cache
> + mPrivateBrowsing = NS_UsePrivateBrowsing(this);
This is not necessarily true. There's nothing to stop an addon creating a menu item to toggle whether a tab is private or not, so I'm not really comfortable caching this value.
Attachment #644126 -
Flags: review?(josh)
Comment 13•12 years ago
|
||
Comment on attachment 644127 [details] [diff] [review]
Changes to FTP
Review of attachment 644127 [details] [diff] [review]:
-----------------------------------------------------------------
Having read this following my concerns about caching in the previous patch, it occurs to me that we do not currently support changing the privacy status of a child load context in a cross-process environment. That suggests to me that we should just not bother supporting dynamic privacy changes after a channel has been opened in general.
Attachment #644127 -
Flags: review?(josh) → review+
Comment 14•12 years ago
|
||
Comment on attachment 644126 [details] [diff] [review]
a few more tweaks to HTTP code
r=me based on my thoughts from the last comment.
Attachment #644126 -
Flags: review+
Updated•12 years ago
|
Attachment #644128 -
Flags: review?(josh) → review+
Updated•12 years ago
|
Attachment #644133 -
Flags: review?(josh) → review+
Comment 15•12 years ago
|
||
Comment on attachment 644135 [details] [diff] [review]
Remove PrivateBrowsingConsumer
Review of attachment 644135 [details] [diff] [review]:
-----------------------------------------------------------------
::: uriloader/exthandler/nsExternalHelperAppService.cpp
@@ +2183,4 @@
> NS_ASSERTION(mRequest, "This should never be called with a null request");
> + nsCOMPtr<nsIChannel> channel = do_QueryInterface(mRequest);
> + if (channel) {
> + inPrivateBrowsing = NS_UsePrivateBrowsing(channel);
I'm partial to replacing this block with |bool inPrivateBrowsing = channel && NS_UsePrivateBrowsing(channel)|, personally.
Attachment #644135 -
Flags: review?(josh) → review+
Assignee | ||
Comment 16•12 years ago
|
||
Comment 17•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in
before you can comment on or make changes to this bug.
Description
•