Граф коммитов

1063 Коммитов

Автор SHA1 Сообщение Дата
Matthew Gaudet 242794868d Bug 1773237 - Mark ignored promise as handled to avoid spurious unhandled rejection error r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D158589
2022-10-24 19:53:15 +00:00
Matthew Gaudet 4852cc8cc4 Bug 1795914 - Remove JS Streams implementation r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D159610
2022-10-24 16:05:58 +00:00
sunil mayya 5bc9f5b9ac Bug 1790311 - update handling of request headers in Fetch/XHR. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D157729
2022-10-24 09:17:22 +00:00
Benjamin VanderSloot 066e83f229 Bug 1793647, part 1 - Create new Sec-Fetch-Dest value for WebIdentity (FedCM), r=freddyb,webdriver-reviewers,whimboo
This is to keep up with WHATWG Fetch https://github.com/whatwg/fetch/pull/1495 .
Also revised to not include the new destination type in the RequestDestination enum, per https://github.com/whatwg/fetch/pull/1500 .

I added an element to nsIContentPolicy::nsContentPolicyType as my starting point and
proceeded from there, following the instructions at the end of the internal enum.

Differential Revision: https://phabricator.services.mozilla.com/D158657
2022-10-17 16:07:50 +00:00
Sean Feng 3ed2666383 Bug 1792229 - Make Origin-Trial COEP:Credentialless works on process selection r=emilio,necko-reviewers,valentin
Currently, if users enabled COEP:Credentialless by Origin-Trial,
it won't put the document into an isolated process, this patch
fixes.

Though the caveat is this only works for enabling Origin-Trial
in the response header, setting it via <meta> still won't work.

Differential Revision: https://phabricator.services.mozilla.com/D158684
2022-10-17 15:20:51 +00:00
Norisz Fay fb8b4283ae Backed out changeset 26304e65203f (bug 1773237) for causing wpt failures on response-error-from-stream.any.sharedworker.html CLOSED TREE 2022-10-07 16:06:49 +03:00
Matthew Gaudet 966bd10747 Bug 1773237 - Mark ignored promise as handled to avoid spurious unhandled rejection error r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D158589
2022-10-07 02:58:13 +00:00
Marian-Vasile Laza 7ba49a00c6 Backed out changeset c6cf679e8f08 (bug 1773237) for causing bc failures on Promise-inl.h. CLOSED TREE 2022-10-06 21:34:22 +03:00
Matthew Gaudet 3b73600100 Bug 1773237 - Mark ignored promise as handled to avoid spurious unhandled rejection error r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D158589
2022-10-06 17:25:14 +00:00
Eden Chuang 2aa93e45f4 Bug 1658869 - Propagate the InterceptedHttpChannel information to fetch's channel casued by FetchEvent.request. r=dom-worker-reviewers,dragana,jesup
When a network load needs to be intercepted by ServiceWorker, we extract the Request from the InterceptedHttpChannel, and propagate the Request through FetchEvent.request.

However, some needed information is not extracted or is modified during the Request propagation, so getting the wrong result when using the Request to fetch resources in the ServiceWorker script.

Differential Revision: https://phabricator.services.mozilla.com/D145969
2022-09-30 22:39:23 +00:00
Mark Banner d4aadf5320 Bug 1792694 - Fix ESLint no-undef and no-unused-vars issues in various parts of dom/ tests. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158253
2022-09-28 17:23:11 +00:00
sunil mayya 4753a3a777 Bug 1697421 - update error logging for mime type parsing failures in web assembly. r=necko-reviewers,valentin,tschuster
Differential Revision: https://phabricator.services.mozilla.com/D157620
2022-09-20 11:07:46 +00:00
sunil mayya 4bf93cb7b9 Bug 1697421 - improve parsing of content-type headers for fetch r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D157115
2022-09-20 11:07:45 +00:00
sunil mayya 08d3766f45 Bug 1697421 - Make XMLHttpRequest/fetch to support multiple content-length and content-type headers. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D154864
2022-09-20 11:07:44 +00:00
Dana Keeler 923d7b2029 Bug 1790451 - make nsIChannel.securityInfo concrete as nsITransportSecurityInfo r=kershaw,necko-reviewers,valentin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D157136
2022-09-20 03:58:49 +00:00
Iulian Moraru d8b071ca4d Backed out 3 changesets (bug 1697421) for causing mochitest failures on test_webassembly_compile.html. CLOSED TREE
Backed out changeset 65d4f5822383 (bug 1697421)
Backed out changeset cda8626f9ccc (bug 1697421)
Backed out changeset fe6151585dec (bug 1697421)
2022-09-16 01:19:21 +03:00
sunil mayya b522b30786 Bug 1697421 - improve parsing of content-type headers for fetch r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D157115
2022-09-15 15:19:13 +00:00
sunil mayya daac079226 Bug 1697421 - Make XMLHttpRequest/fetch to support multiple content-length and content-type headers. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D154864
2022-09-15 15:19:12 +00:00
Norisz Fay dff4f6d15e Backed out 2 changesets (bug 1771423) for causing webcompat regressions CLOSED TREE
Backed out changeset c1d1be434427 (bug 1771423)
Backed out changeset 2b7d886f374f (bug 1771423)
2022-09-13 16:26:16 +03:00
Emilio Cobos Álvarez cd7f44cd27 Bug 1790203 - Fix COEP: Credentialless when enabled via origin-trial header. r=sefeng
And add test coverage for it (we only had coverage for the meta tag,
ugh).

Differential Revision: https://phabricator.services.mozilla.com/D157054
2022-09-11 19:37:12 +00:00
Dana Keeler 7ff44a2c39 Bug 1789494 - use the concrete type nsITransportSecurityInfo instead of IPCChannelInfo r=mccr8
See bug 1787319. Before this change, IPCChannelInfo consisted solely of
`nsCString securityInfo`. Now, instead of using IPCChannelInfo,
nsITransportSecurityInfo is used directly.

Differential Revision: https://phabricator.services.mozilla.com/D156607
2022-09-09 22:14:18 +00:00
Kershaw Chang d164608d66 Bug 1760580 - P2: Provide a reason when request is cancelled with NS_BINDING_ABORTED, r=necko-reviewers,media-playback-reviewers,valentin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D156071
2022-09-08 09:11:19 +00:00
Olli Pettay 93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Kagami Sascha Rosylight 102bd338be Bug 1695435 - Part 2: Add more words to the chrome script heuristic in use-isInstance r=preferences-reviewers,Gijs,webdriver-reviewers,whimboo,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D110932
2022-08-24 22:47:42 +00:00
Andi-Bogdan Postelnicu eeac3728d2 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 14.0.5 (taskcluster-DydCt-ryTuKvBYw1HQOugw)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D154661
2022-08-16 07:08:27 +00:00
Dan Robertson 27907e8f9a Bug 1771423 - Set Content-Type to an empty string for an empty blob with no type. r=kershaw,smaug,necko-reviewers
Set the Content-Type to an empty string for an blob when the type was not
given. Ensure that the channel Content-Type is not overriden in the case
that it was previously set and the blob type is not valid.

Depends on D147568

Differential Revision: https://phabricator.services.mozilla.com/D147481
2022-08-15 13:52:12 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Andrew Sutherland 51a0dc12c2 Bug 1770630 - Worker stream readers should contribute to busy count. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D149185
2022-08-03 00:36:01 +00:00
criss fe207fe58a Backed out changeset cc893e08aa2f (bug 1770630) for causing wpt failures on FileReader-multiple-reads.any.worker.html. CLOSED TREE 2022-08-03 01:56:06 +03:00
Andrew Sutherland 4c1582ac65 Bug 1770630 - Worker stream readers should contribute to busy count. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D149185
2022-08-02 20:56:53 +00:00
Sean Feng 288cbe9f46 Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-27 20:33:19 +00:00
Marian-Vasile Laza 2ab97e789a Backed out 2 changesets (bug 1778492) for causing eslint failures.
Backed out changeset 6c3ac3569d31 (bug 1778492)
Backed out changeset 34227495753a (bug 1778492)
2022-07-26 17:43:53 +03:00
Sean Feng 38f70ee5fc Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-26 14:06:04 +00:00
Olli Pettay 2a78f9ffc0 Bug 1775501 - multipart boundary should be handled as mixed case, r=kershaw
Since https://github.com/w3c/FileAPI/issues/43 is still open, it is unclear how body.type should work.
The current wpts expect some behavior which isn't in the specifications.
So, since the situation is very messy in the specifications, the patch is doing a
spot fix for boundary handling. It is ugly, but shouldn't change other behavior.

Differential Revision: https://phabricator.services.mozilla.com/D150018
2022-07-11 09:18:32 +00:00
Tom Schuster 0d488d2e8e Bug 1776414 - Change nsIHttpChannelInternal corsMode to requestMode. r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D150243
2022-06-29 14:09:57 +00:00
Sean Feng 8b870c3847 Bug 1731778 - Implement COEP: credentialless for cache storage r=edenchuang
Spec: https://fetch.spec.whatwg.org/#ref-for-cross-origin-resource-policy-internal-check

This purpose of this patch is just to implement the spec.

One noticeable thing I did in the patch is I made `CacheResponse` to
include the `credentials mode` of the initial request. Consider the
below scenario:

  1. Create a fetch request with a URL and a specific credential_mode, and put it into cache
  2. Call cache.match by using a URL, but without credential_mode
  3. cache.match() result should be filtered according to the initial request's credential_mode

When applying the `response’s request-includes-credentials is true`
check, the initial request's `credential_mode` is needed because
`request-includes-credentials` is judged by the `credential_mode`.

The rest of the changes are just normal spec alignments.

Differential Revision: https://phabricator.services.mozilla.com/D147803
2022-06-27 17:07:15 +00:00
Iulian Moraru 672f2cb672 Backed out 3 changesets (bug 1731778) for causing COEP related failures on embedding.tentative.https.window.html.
Backed out changeset c30f5751d54c (bug 1731778)
Backed out changeset 0eec19308453 (bug 1731778)
Backed out changeset 7c14fa8a4804 (bug 1731778)
2022-06-22 22:00:17 +03:00
Sean Feng c575e60261 Bug 1731778 - Implement COEP: credentialless for cache storage r=edenchuang
Spec: https://fetch.spec.whatwg.org/#ref-for-cross-origin-resource-policy-internal-check

This purpose of this patch is just to implement the spec.

One noticeable thing I did in the patch is I made `CacheResponse` to
include the `credentials mode` of the initial request. Consider the
below scenario:

  1. Create a fetch request with a URL and a specific credential_mode, and put it into cache
  2. Call cache.match by using a URL, but without credential_mode
  3. cache.match() result should be filtered according to the initial request's credential_mode

When applying the `response’s request-includes-credentials is true`
check, the initial request's `credential_mode` is needed because
`request-includes-credentials` is judged by the `credential_mode`.

The rest of the changes are just normal spec alignments.

Differential Revision: https://phabricator.services.mozilla.com/D147803
2022-06-22 13:13:39 +00:00
Narcis Beleuzu 9e3db37db1 Backed out 2 changesets (bug 1731778) for wpt failures on embedding.tentative.https.window.html . CLOSED TREE
Backed out changeset 2510b654e8f2 (bug 1731778)
Backed out changeset fea9b21d8efe (bug 1731778)
2022-06-21 19:13:32 +03:00
Sean Feng d3d68a918d Bug 1731778 - Implement COEP: credentialless for cache storage r=edenchuang
Spec: https://fetch.spec.whatwg.org/#ref-for-cross-origin-resource-policy-internal-check

This purpose of this patch is just to implement the spec.

One noticeable thing I did in the patch is I made `CacheResponse` to
include the `credentials mode` of the initial request. Consider the
below scenario:

  1. Create a fetch request with a URL and a specific credential_mode, and put it into cache
  2. Call cache.match by using a URL, but without credential_mode
  3. cache.match() result should be filtered according to the initial request's credential_mode

When applying the `response’s request-includes-credentials is true`
check, the initial request's `credential_mode` is needed because
`request-includes-credentials` is judged by the `credential_mode`.

The rest of the changes are just normal spec alignments.

Differential Revision: https://phabricator.services.mozilla.com/D147803
2022-06-21 13:56:53 +00:00
Tom Schuster 36f0092f90 Bug 1605305 - Consistently provide an Origin header for normal requests. r=freddyb,necko-reviewers,kershaw,robwu
This patch is more conservative for requests initiated by add-on and prefers
to send no Origin header instead of Origin: null.

Differential Revision: https://phabricator.services.mozilla.com/D147091
2022-06-15 18:30:19 +00:00
Tom Schuster 10a63fedf7 Bug 1773242 - Add better error message when consuming non-Uint8Array. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148633
2022-06-14 07:42:29 +00:00
Kagami Sascha Rosylight 6abe98f452 Bug 1769290 - Part 8: Apply mozilla-js-handle-rooted-typedef against dom/canvas,crypto,fetch,gamepad,geolocation,indexedDB,ipc r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148281
2022-06-05 20:54:59 +00:00
Kagami Sascha Rosylight 043f38ccaf Bug 1769290 - Part 4: Apply mozilla-js-handle-rooted-typedef against dom/workers r=mccr8,dom-worker-reviewers,smaug
Changes done by `./mach static-analysis check --checks="-*,mozilla-js-handle-rooted-typedef" --fix --header-filter=dom dom/workers; ./mach clang-format --outgoing`.

Depends on D146453

Differential Revision: https://phabricator.services.mozilla.com/D146454
2022-05-17 19:48:04 +00:00
Nika Layzell 1aa11ffed6 Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-13 14:16:13 +00:00
Nika Layzell 95a883d65d Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-13 14:16:10 +00:00
Eden Chuang f03fb58873 Bug 1765777 - Resolve FetchEvent.preloadResponse when the response is available not the response end. r=dom-worker-reviewers,jesup.
In the previous implementation, FetchEvent.preloadResponse is resolved when the response fetching finishes.
However, ServiceWorker responding letency could be increased since waiting for preloadResponse finishes.
The patch resolves FetchEvent.preloadResponse earlier when the response is available.

The basic idea is to resolve the preload response when FetchInstance::OnResponseAvailableInternal() is called.
Then propagating the response from the parent process main thread to the content process worker thread. This is achieved by IPC PFetchEventOp::Send/RecvPreloadResponse -> PFetchEventOpProxy::Send/RecvPreloadResponse.

Since we can only get the response's ResourceTiming when FetchInstance::OnResponseEnd() is called. This patch introduces a new IPC method to propagate the ResourceTiming information from the parent process main thread to the content process worker thread.
PFetchEventOp::Send/RecvPreloadResponseEnd -> PFetchEventOpProxy->Send/RecvPreloadResponseEnd.

The tricky of this patch is we must extend the life cycle of FetchEventOp object if preloadResponse is set into FetchEvent.
That because ServiceWorker could resolve FetchEvent.respondWith() by using FetchEvent.preloadResponse.
In that case, FetchEventOp will get into a finish state and try to call FetchEventOpProxyChild::Senddelete with the operation result.
However, the ResponseEnd could not be called at the moment, and we need to wait for the corresponding timing information and its end reason.
To extend the life cycle of FetchEventOp, this patch cached the operation result while we get FetchEventOp::Callback is called. Then call FetchEventOpProxyChile::Senddelete() in FetchEventOpProxyChild::RecvPreloadResponseEnd() to close IPC. Or Senddelete() will be called while ActorDestroy() caused by shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D145338
2022-05-11 19:40:47 +00:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Nika Layzell 024c6e0c0a Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-10 22:27:46 +00:00
Nika Layzell 76cdaba44a Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-10 22:27:42 +00:00