Open Bug 1499827 Opened 6 years ago Updated 2 years ago

Consider moving view-source into a distinct process

Categories

(Core :: DOM: Content Processes, enhancement, P3)

enhancement

Tracking

()

Fission Milestone Future

People

(Reporter: nika, Unassigned)

References

(Blocks 1 open bug)

Details

Currently, we load view-source URIs in web processes alongside the document which they were loaded for. It may make sense to load them in a separate view-source URI process, or potentially within the privileged content process.

This should probably happen alongside changing the principal for view-source documents to be a null principal rather than the principal of the requested document.

Marking as blocking fission as a thing which we should probably look into. We may not want to do it for fission, however.

Also ni? :bz - how tricky would it be to change the principal of view-source URIs to be either opaque or a singleton known origin (e.g. say just "[view-source]")

Blocks: fission
Flags: needinfo?(bzbarsky)
Priority: -- → P2

The main issue with changing the principal of view-source is the CheckLoadURI handling. We allow clicking on URLs in the viewed source to load the source of those things, and that does CheckLoadURI using the view-source principal.

For web things it's not too bad, because even a nullprincipal can link to http:// via CheckLoadURI. But even just for file:// there's a problem, because nullprincipals can't link to file://, right? We'd need to figure out a plan for this bit.

Flags: needinfo?(bzbarsky)

Also, pretty sure there's existing discussion about view-source principals somewhere...

(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #3)

Also, pretty sure there's existing discussion about view-source principals somewhere...

https://bugzilla.mozilla.org/show_bug.cgi?id=1171853#c35 and bug 1430257.

Depends on: 1598523

This bug is not a Fission MVP blocker.

depends on DocumentChannel view-source bug 1598523

Fission Milestone: --- → Future
Priority: P2 → P3
See Also: → 1612071
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.