The `self->mZStream.avail_out > 0` check is not correct assert.
In some rare cases the incoming data may not produce any output.
Rely on zlib's inflate() to perform needed validation.
Differential Revision: https://phabricator.services.mozilla.com/D132516
A previous patch added code paths that propagate the preload response
from the parent process's main thread to the service worker in the
content process, but left out the conversions between different stream
types. This commit adds these conversions.
Based on D122822.
Differential Revision: https://phabricator.services.mozilla.com/D131380
This commit replaces IPCInternalResponse with three different structs:
ParentToParentInternalResponse, ParentToChildInternalResponse, and
ChildToParentInternalResponse. Doing this lets us convert runtime
checks into compile-time type checks and simplifies relevant code.
Differential Revision: https://phabricator.services.mozilla.com/D131275
This patch begins re-implements ReadableStreams using WebIDL and DOM technology (vs the existing JS streams implementation). Some more background is [here](https://docs.google.com/document/d/1MWRkF32KV60ngOY-Ip4PnKbCMvl6VK_Y9QLED8MJJxg/edit#)
This is guarded under a configure flag `--enable-dom-streams`
1. ByteStreams and ReadableStream.tee will come in future patches.
2. I intentionally crash in other parts of the DOM that require streams (Fetch, Response, Blob), until the integration work is done in future patches.
My current plan for that integration doesn't involve re-creating the alternative 'external streams' API from SpiderMonkey's implementation, but I have yet to do enough development to verify that will work.
Differential Revision: https://phabricator.services.mozilla.com/D122643
dom/console/Console.cpp:2899:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return 0;
^
dom/console/Console.cpp:2955:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return 0;
^
dom/fetch/FetchDriver.cpp:252:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return NS_OK;
^~~~~
Differential Revision: https://phabricator.services.mozilla.com/D126870
We add the new content policy here, but leave the behavior as TYPE_OTHER, so
we can verify that the new test fails before the fix is applied.
Differential Revision: https://phabricator.services.mozilla.com/D124965
As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts. The document certainly has no authority
to block those from loading. (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)
Differential Revision: https://phabricator.services.mozilla.com/D111695
As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts. The document certainly has no authority
to block those from loading. (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)
Differential Revision: https://phabricator.services.mozilla.com/D111695
The goal of this series of patches is to address the cases where sites
don't use standard form submission events.
The basic idea is inferring a form is submitted when the form is removed
from the DOM tree, but with one premise:
There must be a successful fetch or XHR request sent in the document before the
form is removed.
This is because websites usually send the credentials with a fetch or an
XHR. After the request succeeds, the website removes the form.
In summary, this patch does the following:
1. Add NotifyFetchOrXHRSuccess API in Document. The API sends a
"DOMDocFetchSuccess" event to who registers the event listener.
2. When a fetch request or a XMLHttpReuqest completes and succeeds,
call NotifyFetchOrXHRSuccess().
3. LoginMangerChild listen to `DOMDocFetchSuccess` event only when there
is an user interaction on the password field.
Differential Revision: https://phabricator.services.mozilla.com/D106024