Closed Bug 957427 Opened 6 years ago Closed 6 years ago

Expose an nsILoadContext shim in nsIFrameLoader

Categories

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

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: billm, Assigned: billm)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Attached patch cpp-load-contextSplinter Review
There's a lot of code that wants to use nsILoadContext to get information about private browsing. For example, we need one in bug 691614. Also, right now we create an nsILoadContext dynamically in the networking code so that it can be used in a channel. I think it would be better to have a single load context in the parent for each remote tab. That way everyone can at least use the same one.

Right now the patch bases the private browsing flag on the window. But if we allow per-tab private browsing, it would be easy to change this.

I have mixed feelings about this patch. nsILoadContext is a pretty gross interface, so I don't like exposing it more than we already do. But the alternative is to change a ton of code that relies on it to use something else, and I don't want to do that right now.
Attachment #8356915 - Flags: review?(bugs)
Attachment #8356915 - Flags: feedback?(ehsan)
Attachment #8356915 - Flags: review?(bugs) → review+
Comment on attachment 8356915 [details] [diff] [review]
cpp-load-context

Review of attachment 8356915 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/public/nsIFrameLoader.idl
@@ +130,5 @@
> +   * Get an nsILoadContext for the top-level docshell. For remote
> +   * frames, a shim is returned that contains private browsing and app
> +   * information.
> +   */
> +  readonly attribute nsILoadContext loadContext;

Please rev the uuid.
Attachment #8356915 - Flags: feedback?(ehsan) → feedback+
https://hg.mozilla.org/mozilla-central/rev/354f1ca641c4
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [qa-]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.