995 Commits

Author SHA1 Message Date
Jens Stutte
775a7e29a1 Bug 1757514: Ignore missing PerformanceTimingData in OnResponseEnd. r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D139918
2022-03-01 12:44:49 +00:00
Bryan Thrall
44b065fd5a Bug 1734174 - Remove unneeded JSContext parameter from AcquireReadableStreamDefaultReader() r=mgaudet
Depends on D139871

Differential Revision: https://phabricator.services.mozilla.com/D139872
2022-02-28 22:31:41 +00:00
Nika Layzell
82a6eea4e8 Bug 1751948 - Part 7: Fix non-unified filename conflict between generated and non-generated ChannelInfo.cpp files, r=asuth
Due to the earlier changes in this patch series, we now build IPDL files
within the directories which they're declared in, meaning that the
generated ChannelInfo.cpp file made by ChannelInfo.ipdlh will try to
compile a ChannelInfo.o file on top of ChannelInfo.cpp's ChannelInfo.o
file when building in non-unified mode.

This works around the issue by renaming the ipdlh file to
IPCChannelInfo.ipdlh.

Differential Revision: https://phabricator.services.mozilla.com/D138567
2022-02-28 21:01:49 +00:00
Eden Chuang
e06a90c8d7 Bug 1754365 - Saving NavigationPreload's PerformanceTimingData into worker's PerformanceStorage. r=dom-worker-reviewers,jesup
Depends on D138251

Differential Revision: https://phabricator.services.mozilla.com/D138252
2022-02-27 00:26:22 +00:00
Eden Chuang
2c0fec1d03 Bug 1754365 - Create IPC for transferring NavigationPreload's PerformanceTimingData. r=dom-worker-reviewers,jesup
Depends on D138250

Differential Revision: https://phabricator.services.mozilla.com/D138251
2022-02-27 00:26:22 +00:00
Eden Chuang
9975a42d06 Bug 1754365 - Getting PerformanceTimingData from channel for FetchService. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D138249
2022-02-27 00:26:21 +00:00
Marian-Vasile Laza
af4995d8ba Backed out 4 changesets (bug 1754365) for causing wpt failures on service-worker/navigation-headers.https.html. CLOSED TREE
Backed out changeset 9ee546b9fd2b (bug 1754365)
Backed out changeset cf972fe0d961 (bug 1754365)
Backed out changeset f8afd25bf41e (bug 1754365)
Backed out changeset 34d4e99f8219 (bug 1754365)
2022-02-26 01:51:59 -08:00
Eden Chuang
d3aabddeb0 Bug 1754365 - Saving NavigationPreload's PerformanceTimingData into worker's PerformanceStorage. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D138252
2022-02-26 08:40:26 +00:00
Eden Chuang
abba984a19 Bug 1754365 - Create IPC for transferring NavigationPreload's PerformanceTimingData. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D138251
2022-02-26 08:40:26 +00:00
Eden Chuang
a45f67f6fa Bug 1754365 - Getting PerformanceTimingData from channel for FetchService. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D138249
2022-02-26 08:40:25 +00:00
Eden Chuang
0a82cc9f46 Bug 1755416 - Using ChannelURI to create principal for NavigationPreload channel. r=dom-worker-reviewers,smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D138783
2022-02-25 13:16:28 +00:00
Kagami Sascha Rosylight
d91c23ad97 Bug 1756070 - Part 1: Add missing override keywords r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D139166
2022-02-21 13:50:12 +00:00
Matthew Gaudet
66faca22de Bug 1754913 - Intentionally ignore errors in FetchStreamReader::OnOutputStreamReader r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D138703
2022-02-16 20:52:12 +00:00
Eden Chuang
7e7901fca2 Bug 1753025 - Adding debugging log for FetchSerivce/FetchInstance. r=dom-worker-reviewers,jesup
Depends on D137594

Differential Revision: https://phabricator.services.mozilla.com/D137599
2022-02-09 07:14:25 +00:00
Eden Chuang
a319862300 Bug 1753025 - Using correct principal to create channel for NavigationPreload. r=dom-worker-reviewers,jesup
Currently using the pricinpal of InternalRequest to create the channel for NavigationPreload.
However, it is not a correct principal and makes NavigationPreload stop with channel security checking.
Instead of using the principal of InternalRequest, this patch uses the loadingPrincipal of InterceptedHttpChannel to create the channel.

Differential Revision: https://phabricator.services.mozilla.com/D137594
2022-02-09 07:14:25 +00:00
Marian-Vasile Laza
a9f8213954 Backed out 3 changesets (bug 1750515, bug 1753025) for causing wpt failures on idlharness.https.any... CLOSED TREE
Backed out changeset 9771e7cbe148 (bug 1750515)
Backed out changeset f671d5206b88 (bug 1753025)
Backed out changeset 99bacb6a3d92 (bug 1753025)
2022-02-09 00:10:47 +02:00
Eden Chuang
2026337440 Bug 1753025 - Adding debugging log for FetchSerivce/FetchInstance. r=dom-worker-reviewers,jesup
Depends on D137594

Differential Revision: https://phabricator.services.mozilla.com/D137599
2022-02-08 18:12:34 +00:00
Eden Chuang
792a165fb9 Bug 1753025 - Using correct principal to create channel for NavigationPreload. r=dom-worker-reviewers,jesup
Currently using the pricinpal of InternalRequest to create the channel for NavigationPreload.
However, it is not a correct principal and makes NavigationPreload stop with channel security checking.
Instead of using the principal of InternalRequest, this patch uses the loadingPrincipal of InterceptedHttpChannel to create the channel.

Differential Revision: https://phabricator.services.mozilla.com/D137594
2022-02-08 18:12:34 +00:00
criss
3b218d4269 Backed out 3 changesets (bug 1753025, bug 1750515) for causing build bustages on Logging.h
Backed out changeset c07607b89a61 (bug 1750515)
Backed out changeset 09f9724c8c1c (bug 1753025)
Backed out changeset 90e9e803f010 (bug 1753025)
2022-02-08 17:52:43 +02:00
Eden Chuang
cd7727939d Bug 1753025 - Adding debugging log for FetchSerivce/FetchInstance. r=dom-worker-reviewers,jesup
Depends on D137594

Differential Revision: https://phabricator.services.mozilla.com/D137599
2022-02-08 11:01:21 +00:00
Eden Chuang
42dfc17202 Bug 1753025 - Using correct principal to create channel for NavigationPreload. r=dom-worker-reviewers,jesup
Currently using the pricinpal of InternalRequest to create the channel for NavigationPreload.
However, it is not a correct principal and makes NavigationPreload stop with channel security checking.
Instead of using the principal of InternalRequest, this patch uses the loadingPrincipal of InterceptedHttpChannel to create the channel.

Differential Revision: https://phabricator.services.mozilla.com/D137594
2022-02-08 11:01:21 +00:00
Chris Peterson
2ae60bead7 Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
2022-02-03 04:39:34 +00:00
Matthew Gaudet
a215c65d60 Bug 1751917 - Indicate JS Exception handling to ErrorResult in FetchStreamReader r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D136913
2022-01-25 21:29:18 +00:00
Eden Chuang
2266b31d41 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2022-01-25 08:53:03 +00:00
Eden Chuang
128ff19446 Bug 1744025: Remove only assertion-relevant mWorkerPrivate from FetchBody. r=dom-worker-reviewers,edenchuang
Depends on D132711

Differential Revision: https://phabricator.services.mozilla.com/D132795
2022-01-25 08:53:01 +00:00
Kagami Sascha Rosylight
67e19158c2 Bug 1751453 - Part 2: Remove WorkerSignalFollower r=smaug
I originally intended to remove the cycle collection only, but then I found that there's zero use of this class.

Differential Revision: https://phabricator.services.mozilla.com/D136659
2022-01-24 13:18:34 +00:00
Kagami Sascha Rosylight
19504fbdf1 Bug 1751453 - Part 1: Remove AbortFollower::Unlink() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136658
2022-01-24 13:18:33 +00:00
Kagami Sascha Rosylight
e3cec0f91e Bug 1660555 - Let AbortSignal grab strong references to its followers r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136447
2022-01-21 14:40:39 +00:00
Kagami Sascha Rosylight
9d024af1cc Bug 1660555 - Make AbortFollower::mFollowingSignal a WeakPtr r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136446
2022-01-21 14:40:38 +00:00
Kagami Sascha Rosylight
cd40833835 Bug 1750543 - Don't abort by signal if consuming request body by DOM methods r=smaug
There are two cases when reading request body by DOM methods:

1. It's being read before fetch()
2. or after fetch()

The first case shouldn't be affected by abort signal per the spec, since the abort step is added only within fetch().

https://fetch.spec.whatwg.org/#ref-for-abortsignal-add

The second case should still fail but with `TypeError: Body has already been consumed`, not AbortError.

Differential Revision: https://phabricator.services.mozilla.com/D136262
2022-01-21 11:18:17 +00:00
Matthew Gaudet
bc10b96605 Bug 1748888 - Add ErrorResult parameter to PromiseNativeHandler callbacks r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136423
2022-01-20 19:11:39 +00:00
Jan Varga
c7d00f4557 Bug 1750931 - Fix non-unified-build bustage in dom/events, dom/fetch and dom/streams; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136315
2022-01-19 11:09:55 +00:00
Matthew Gaudet
ca57a3eb42 Bug 1750606 - Use script boundaries to make DOM streams buildable r=saschanaz
This gets us back to the state we were in with JS Streams. There's a fair
amount of work to get this annotation correct, and some tricky cases to
handle.

Differential Revision: https://phabricator.services.mozilla.com/D136178
2022-01-18 14:39:45 +00:00
Matthew Gaudet
e6f0e756a1 Bug 1734873 - Fetch/Response/Blob ReadableStream integration r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131550
2022-01-14 21:09:20 +00:00
Jens Stutte
a3884ad516 Bug 1741182: Harmonize WorkerRunnable derived classes' overrides of Cancel. r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D135679
2022-01-12 14:43:09 +00:00
Olli Pettay
d4a7fd0c32 Bug 1749188, clear JS member variable during unlink, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D135498
2022-01-10 22:35:15 +00:00
Eden Chuang
02e83cbd20 Bug 1725567 - P5 Support canceling fetching which launched by FetchService. r=dom-worker-reviewers,jesup
Cancel the navigation preload fetching while the FetchEvent has already received Recvdelete or RecvRespondWith

Depends on D129809

Differential Revision: https://phabricator.services.mozilla.com/D130183
2022-01-04 14:42:35 +00:00
Eden Chuang
03fdb1e266 Bug 1725567 - P4 Integrating FetchDriver into FetchService::FetchInstance. r=dom-worker-reviewers,jesup
This patch integrates the FetchDriver into FetchInstance implementation.

The needed information by constructing a FetchDriver would be prepared in FetchInstance::Initialize().

When FetchInstance::Fetch() is called, a FetchDriver would be created according to the information get from Initialize(). FetchDriver will handle the channel creation and its necko related issues.

At the same time, FetchInstance is registered as the FetchDriver's observer, such that the FetchInstance can use the response to resolve the corresponding promise to notify the consummers.

Depends on D129808

Differential Revision: https://phabricator.services.mozilla.com/D129809
2022-01-04 14:42:35 +00:00
Eden Chuang
c9e81a52fe Bug 1725567 - P3 Implement FetchDriverOberser internface for FetchInstance. r=dom-worker-reviewers,jesup
This patch makes FetchInstance inherits FetchDriverObserver, such that FatchInstance can resolve the PreloadResponse promise once FetchDriver finishes fetching.

This patch only implements the necessary interface for navigation preload.
OnResponseEnd()
OnResponseAvailableInternal()
Other methods such as NeededOnDataAvailable(), OnDataAvailable is not implemented.
But these methods should be implemented with PFatch implementation.

Depends on D128223

Differential Revision: https://phabricator.services.mozilla.com/D129808
2022-01-04 14:42:34 +00:00
Eden Chuang
7245366e6f Bug 1725567 - P2 FetchService interface declaration. r=dom-worker-reviewers,jesup
This patch defines the interface of FetchService for its consumers.

RefPtr<FetchServiceResponsePromise>&& FetchService::Fetch(SafeRefPtr<InternalRequest> aRequest);

FetchService is a singleton object in the parent process main thread, which is used for managing all the requested fetching created by FetchService.
It would also support more control capability, such as abort or cancel, and also observers for shutdown or other cases. These would be implemented in the following patches.

FetchInstance is an internal representation for each fetching.

Depends on D128465

Differential Revision: https://phabricator.services.mozilla.com/D128223
2022-01-04 14:42:34 +00:00
Jens Stutte
06fe91a811 Bug 1650940: Only assert FetchStreamReader members in OnOutputStreamReady if we are not closed. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134297
2021-12-20 18:10:09 +00:00
Norisz Fay
5edb88e27a Backed out 9 changesets (bug 1744025) for causing wpt failures on CheckedUnsafePtr.h CLOSED TREE
Backed out changeset 89dca4fc5940 (bug 1744025)
Backed out changeset 7aa395dcdbe4 (bug 1744025)
Backed out changeset 1580a4ea1a85 (bug 1744025)
Backed out changeset af171636a87f (bug 1744025)
Backed out changeset a5edfa1c9cd6 (bug 1744025)
Backed out changeset 8abd6ba69815 (bug 1744025)
Backed out changeset cfb822df5b3f (bug 1744025)
Backed out changeset 5598943a94fd (bug 1744025)
Backed out changeset 43186fbbf8b4 (bug 1744025)
2021-12-15 18:46:01 +02:00
Eden Chuang
4146950108 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2021-12-15 13:48:19 +00:00
Jens Stutte
2afbc37d6b Bug 1744025: Remove only assertion-relevant mWorkerPrivate from FetchBody. r=dom-worker-reviewers,edenchuang
Depends on D132711

Differential Revision: https://phabricator.services.mozilla.com/D132795
2021-12-15 13:48:18 +00:00
Kagami Sascha Rosylight
712c0d58c7 Bug 1737771 - Implement AbortSignal.reason r=mgaudet,smaug
Differential Revision: https://phabricator.services.mozilla.com/D132281
2021-12-13 21:08:55 +00:00
Cosmin Sabou
fdf40d5a31 Backed out changeset 1778ca2ab291 (bug 1744425) for bc failures on browser_xpcom_graph_wait.js. CLOSED TREE 2021-12-08 07:20:54 +02:00
Chris Peterson
aae95e46eb Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
2021-12-08 03:19:11 +00:00
Sandor Molnar
68afd87d02 Backed out 8 changesets (bug 1744025) for causing bp-hybrid bustages in dom/clients/api/Clients.cpp. CLOSED TREE
Backed out changeset b6452430763d (bug 1744025)
Backed out changeset 46e9f06636da (bug 1744025)
Backed out changeset 913cdee4824f (bug 1744025)
Backed out changeset e1bc4e2066c7 (bug 1744025)
Backed out changeset e6b99af4b7ca (bug 1744025)
Backed out changeset e9b749f80ec2 (bug 1744025)
Backed out changeset 26d3176a00ef (bug 1744025)
Backed out changeset 2c8941fdcee5 (bug 1744025)
2021-12-08 01:30:06 +02:00
Jens Stutte
b16f0a884c Bug 1744025: Remove only assertion-relevant mWorkerPrivate from FetchBody. r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D132795
2021-12-07 16:47:17 +00:00
Yury Delendik
8c65b7aee8 Bug 1738987 - Ignore altdata stream errors on shutdown. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D131960
2021-11-30 22:01:56 +00:00