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

932 Коммитов

Автор SHA1 Сообщение Дата
Matthew Gaudet 3bcfc27cef Bug 1730589 - Initial Implementation of ReadableStreams using WebIDL and DOM technologies r=smaug
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
2021-10-06 18:43:01 +00:00
Andreas Pehrson 8104de54c0 Bug 1729964 - Fix linker error. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D126918
2021-10-06 14:33:40 +00:00
Mike Hommey ad42c13a73 Bug 1733034 - Fix unreachable-code-return warnings in dom. r=smaug
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
2021-09-29 21:44:51 +00:00
Marian-Vasile Laza 381c254e6d Backed out 3 changesets (bug 1487113) for causing hazard bustages. CLOSED TREE
Backed out changeset 13bf04fc644f (bug 1487113)
Backed out changeset 5b7fe5d564aa (bug 1487113)
Backed out changeset 02236ccd64b4 (bug 1487113)
2021-09-17 22:58:33 +03:00
Yury Delendik b8f6bd6a71 Bug 1487113 - Add pref javascript.options.wasm_caching. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D27101
2021-09-17 12:16:24 +00:00
Yury Delendik 21eebdf064 Bug 1487113 - Use alt-data to cache stream-compiled WebAssembly modules. r=necko-reviewers,valentin,dragana
Depends on D117360

Differential Revision: https://phabricator.services.mozilla.com/D26731
2021-09-17 12:16:24 +00:00
Yury Delendik 19b0d24e7f Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-09-17 12:16:23 +00:00
Cristian Tuns f2f6eac4d6 Backed out 3 changesets (bug 1487113) for causing mochitest failures. CLOSED TREE
Backed out changeset b20e5d76c77e (bug 1487113)
Backed out changeset b0b2b27dcb68 (bug 1487113)
Backed out changeset 9214b396eb84 (bug 1487113)
2021-09-14 17:38:32 -04:00
Yury Delendik f03ccb4ccd Bug 1487113 - Add pref javascript.options.wasm_caching. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D27101
2021-09-14 20:12:52 +00:00
Yury Delendik 564b18936f Bug 1487113 - Use alt-data to cache stream-compiled WebAssembly modules. r=necko-reviewers,valentin,dragana
Differential Revision: https://phabricator.services.mozilla.com/D26731
2021-09-14 20:12:51 +00:00
Yury Delendik 0b78665a0e Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-09-14 20:12:51 +00:00
Byron Campen b67cbe0b60 Bug 1702417: Test case for bug. r=freddyb,mixedpuppy,necko-reviewers
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
2021-09-13 18:20:10 +00:00
Andi-Bogdan Postelnicu 75ed803f7c Bug 1725145 - fixes for linking in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122344
2021-08-22 10:21:56 +00:00
Kagami Sascha Rosylight a38945c762 Bug 1723050 - Part 10: Replace typedef by using in dom/fetch/ r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121302
2021-08-06 22:02:57 +00:00
Gijs Kruitbosch 4fa576deda Bug 1723723 - stop using getURLSpecFromFile from JS code to avoid mainthread IO, r=florian
Differential Revision: https://phabricator.services.mozilla.com/D121620
2021-08-03 18:32:50 +00:00
Eden Chuang 4ce2d06b79 Bug 1714299 - Correct the opaque response judgment for opaque response blocking. r=necko-reviewers,annevk,dragana
An opaque response should be not only cross-origin but also be request with no_cors request mode.

To filter out the request with mode Same_origin, navigate, and cors. This patch reuses the algorithm in InternalRequest/FetchDriver to decide whether a response is an opaque response.

https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/InternalRequest.cpp#331
https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/FetchDriver.cpp#1153,1157

Differential Revision: https://phabricator.services.mozilla.com/D117086
2021-07-02 23:11:55 +00:00
Mats Palmgren 58a3ef1c19 Bug 1542807 part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets. r=ckerschb
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
2021-06-14 01:22:06 +00:00
Butkovits Atila ed3da455ae Backed out 7 changesets (bug 1542807) for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE
Backed out changeset e9ef32fa2f2e (bug 1542807)
Backed out changeset 8fa0cb199975 (bug 1542807)
Backed out changeset 38daf64afe59 (bug 1542807)
Backed out changeset e3aee052c495 (bug 1542807)
Backed out changeset a71056d4c7cc (bug 1542807)
Backed out changeset cf91e7d0a37f (bug 1542807)
Backed out changeset eee949e5fd67 (bug 1542807)
2021-06-12 01:38:25 +03:00
Mats Palmgren 2047e29464 Bug 1542807 part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets. r=ckerschb
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
2021-06-11 18:10:39 +00:00
Sebastian Hengst 1df9c58475 Backed out 3 changesets (bug 1660555) on request from evilpie
Backed out changeset 973fbed4566f (bug 1660555)
Backed out changeset 4e42fc2c7ff3 (bug 1660555)
Backed out changeset 86e154074372 (bug 1660555)
2021-04-29 16:55:15 +02:00
Eden Chuang 2afeed0d0c Bug 1686154 - Fix the race condition on WorkerFetchResolver::mFetchObserver. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D111525
2021-04-13 13:23:57 +00:00
Noemi Erli 7013a13cd3 Backed out changeset 6483ed81fc50 (bug 1686154) for causing build bustages in Fetch.cpp CLOSED TREE 2021-04-13 15:18:46 +03:00
Eden Chuang 359fb902da Bug 1686154 - Fix the race condition on WorkerFetchResolver::mFetchObserver. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D111525
2021-04-13 12:06:27 +00:00
Tim Huang 1f289e1e64 Bug 1695050 - Part 11: Update the call-sites of CookieJarSettings::Create() for Fetch and XHR. r=smaug
This patch updates all call-sites to pass the principal for Fetch and XHR.

Differential Revision: https://phabricator.services.mozilla.com/D109054
2021-03-29 11:01:54 +00:00
Tom Schuster 0cfa8ecb47 Bug 1660555 - Null mSignalProxy after calling Shutdown in WorkerFetchResolver. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109605
2021-03-24 12:31:01 +00:00
Jeff Walden c709245384 Bug 1660555 - |AbortSignalProxy| doesn't need to be |nsISupports|, just threadsafe-ly refcounted. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93893
2021-03-24 12:31:01 +00:00
Jeff Walden 4eb1afc133 Bug 1660555 - Make |WorkerSignalFollower| do the following. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93892
2021-03-24 12:31:00 +00:00
Dimi Lee d6530bf9ad Bug 1166995 - P1. Notify DOMDocFetchSuccess when a fetch or XHR request completes successfully r=smaug,sfoster
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
2021-03-16 09:15:19 +00:00
Sebastian Streich 239f9451dc Bug 1685570 Backed out changeset 92d71744323a r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D107670
2021-03-10 15:15:24 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Kershaw Chang 099352f219 Bug 1690481 - Make the fetch request fail when response is not available r=baku
Differential Revision: https://phabricator.services.mozilla.com/D103892
2021-02-23 10:22:03 +00:00
Forrest 3285e68438 Bug 1460299 - Add content-length as a CORS-safelisted response header. r=valentin,baku
Reference: https://fetch.spec.whatwg.org/#cors-safelisted-response-header

Differential Revision: https://phabricator.services.mozilla.com/D58492
2021-02-15 12:51:33 +00:00
Noemi Erli bf03edd45e Backed out 2 changesets (bug 1660555) for causing crashes in [@ mozilla::dom::AbortFollower::Unfollow] Bug 1692362 a=backout
Backed out changeset e5fc911da9c9 (bug 1660555)
Backed out changeset bbd35b96ab6f (bug 1660555)
2021-02-12 11:09:01 +02:00
Sebastian Streich 2fdb236107 Bug 1685570 - Revert Origin-Header Changes in FetchDriver.cpp r=ckerschb
This is a partial revert of:
https://phabricator.services.mozilla.com/D80905

The regressing patch does 2 things:
- Add an origin header-implementation that fills in current blank spots, and implements global redirect tainting.
- Remove the fetchdriver origin header implementation -> which would trigger the new one to take place for those cases.

The patch did block-list moz-extension://, so we would get null-origin for extensions.
My proposal is to just revert the removal of the fetch driver changes for now.

Pro:
- the extensions get their expected origin,
- we keep filling in blank spots
- we will be handling redirects correctly even for fetch-driver set origin headers[[ https://bugzilla.mozilla.org/show_bug.cgi?id=1535795 |  which was a problem before  ]]
- it's a way smaller changeset than removing the whole patch.
Cons:
- we have one more place for now where the header is set :(

Differential Revision: https://phabricator.services.mozilla.com/D104668
2021-02-11 16:46:17 +00:00
Jeff Walden ba6c25cd1d Bug 1660555 - |AbortSignalProxy| doesn't need to be |nsISupports|, just threadsafe-ly refcounted. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93893
2021-02-11 01:18:46 +00:00
Jeff Walden 27a6a557fe Bug 1660555 - Make |WorkerSignalFollower| do the following. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93892
2021-02-11 01:18:46 +00:00
Butkovits Atila e0344a1cd5 Backed out changeset aefbe65483ef (bug 1460299) for causing failures cors-filtering.sub.any.worker.html. CLOSED TREE 2021-02-04 17:35:11 +02:00
Forrest 59d353f4d6 Bug 1460299 - Add content-length as a CORS-safelisted response header. r=valentin,baku
Reference: https://fetch.spec.whatwg.org/#cors-safelisted-response-header

Differential Revision: https://phabricator.services.mozilla.com/D58492
2021-02-04 14:12:10 +00:00
Emilio Cobos Álvarez e1271b87c9 Bug 1687587 - Cleanup a bit Link.h. r=smaug
Depends on D102365

Differential Revision: https://phabricator.services.mozilla.com/D102366
2021-01-20 09:24:10 +00:00
Masatoshi Kimura 54c1b8dee1 Bug 1687108 - Remove unused content policy types. r=ckerschb,remote-protocol-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D102083
2021-01-19 09:42:13 +00:00
Tom Schuster 71555984ed Bug 1687063 - Improve error messages when trying to consume a Reponse for WebAssembly. r=lth
Differential Revision: https://phabricator.services.mozilla.com/D102055
2021-01-18 12:16:33 +00:00
Tom Schuster a865c88907 Bug 1684634 - Use InternalHeaders for MimeType instead of caching in the Response/Request constructor. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D101159
2021-01-12 10:38:25 +00:00
Emilio Cobos Álvarez 40dc6e911d Bug 1685832 - Add a missing include to fix non-unified bustage.
MANUAL PUSH: bustage on a CLOSED TREE
2021-01-11 05:20:06 +01:00
Masatoshi Kimura 3424a95ee0 Bug 1682103 - Make nsContentPolicyType a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D99580
2020-12-16 11:36:47 +00:00