Closed Bug 1593560 Opened 5 years ago Closed 5 years ago

Enable DocumentChannel for data URIs

Categories

(Core :: Networking, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Fission Milestone M5
Tracking Status
firefox72 --- fixed

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

Details

Attachments

(7 files)

Currently DocumentChannel is only enabled for http(s), but we want to add support for other protocols. This bug will add support for data:.

This stops us from returning true on an empty data URI (data:text/html,), since that returns NS_BASE_STREAM_CLOSED.

Depends on D51548

Attachment #9106084 - Attachment description: Bug 1593560 - Only return true from NS_InputStreamIsBuffered if the underlying object explicitly reports that it would block, or if it doesn't implement ReadSegments. r?mayhemer → Bug 1593560 - Only return false from NS_InputStreamIsBuffered if the underlying object doesn't implement ReadSegments. r?mayhemer

When ReadSegments is called before the stream is ready, we return NS_BASE_STREAM_WOULD_BLOCK, not NS_ERROR_NOT_IMPLEMENTED.
If callers use AsyncWait for the IPCBlobInputStream to be ready, and then call ReadSegments again we can end up returning NS_ERROR_NOT_IMPLEMENTED, depending on what the inner type is.

Depends on D51552

Blocks: 1594166
Pushed by mwoodrow@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/90572c49d464 Allow data urls with DocumentChannel. r=nika https://hg.mozilla.org/integration/autoland/rev/9f52c9f6dc54 Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau https://hg.mozilla.org/integration/autoland/rev/a7d04e276b44 Only return false from NS_InputStreamIsBuffered if the underlying object doesn't implement ReadSegments. r=mayhemer https://hg.mozilla.org/integration/autoland/rev/3e3948e9531c Support non-http channels in SendCrossProcessRedirect. r=jya https://hg.mozilla.org/integration/autoland/rev/d67a10437af7 Release mListener and break the cycle if AsyncOpen fails in DocumentChannelParent, since OnStopRequest won't be delivered to mListener in this case, which is where we usually break the cycle. r=jya https://hg.mozilla.org/integration/autoland/rev/9842c80c98d8 Make sure IPCBlobInputStream::ReadSegments is always supported, regardless of which inner async stream type gets created. r=baku
Pushed by mwoodrow@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7dfae085a4cb Fix browser_firstPartyIsolation to not use w.content. r=kmag
Flags: needinfo?(matt.woodrow)
Pushed by mwoodrow@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bd4e2201c286 Allow data urls with DocumentChannel. r=nika https://hg.mozilla.org/integration/autoland/rev/ec368ed71cb6 Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau https://hg.mozilla.org/integration/autoland/rev/40c8c2cd4fe9 Only return false from NS_InputStreamIsBuffered if the underlying object doesn't implement ReadSegments. r=mayhemer https://hg.mozilla.org/integration/autoland/rev/7fda1001834a Support non-http channels in SendCrossProcessRedirect. r=jya https://hg.mozilla.org/integration/autoland/rev/f85931cd9c30 Release mListener and break the cycle if AsyncOpen fails in DocumentChannelParent, since OnStopRequest won't be delivered to mListener in this case, which is where we usually break the cycle. r=jya https://hg.mozilla.org/integration/autoland/rev/f370f4b602e0 Make sure IPCBlobInputStream::ReadSegments is always supported, regardless of which inner async stream type gets created. r=baku https://hg.mozilla.org/integration/autoland/rev/50b6f4d2e0d2 Fix browser_firstPartyIsolation to not use w.content. r=kmag
Flags: needinfo?(matt.woodrow)

Retroactively moving fixed bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to an appropriate Fission Milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

Fission Milestone: --- → M5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: