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

920 Коммитов

Автор SHA1 Сообщение Дата
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
Simon Giesecke 9379d0240f Bug 1679987 - Use nsTokenizedRange where easily possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D98308
2020-12-16 19:10:34 +00:00
Simon Giesecke 29c054ab83 Bug 1679987 - Removed unused includes of nsCharSeparatedTokenizer.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D99877
2020-12-16 19:09:58 +00:00
Masatoshi Kimura e158f2a82c Bug 1682164 - Update RequestDestination to the latest spec. r=asuth
Stop using `default:` in MapContentPolicyTypeToRequestDestination so that
compilers can notice when people forgot adding a new nsContentPolicyType.

Differential Revision: https://phabricator.services.mozilla.com/D99604
2020-12-14 08:32:55 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Akihiko Odaki 5568524e05 Bug 1605305 - Origin header field is not set to HTTP request in cases where it is required, r=ckerschb,necko-reviewers,JuniorHsu,valentin
***

***

Differential Revision: https://phabricator.services.mozilla.com/D80905
2020-12-03 00:56:22 +00:00
Simon Giesecke feb7572bff Bug 1678374 - Avoid including jsapi.h from header files. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D97620

Depends on D97618
2020-11-23 16:12:34 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 0fc89f327c Bug 1660470 - Avoid including FetchIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93248

Depends on D93246
2020-11-23 16:04:50 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00