Commit Graph

73 Commits

Author SHA1 Message Date
Kagami Sascha Rosylight
7eafaaa2cf Bug 1866078 - Add InputToReadableStreamAlgorithms::MaybeGetInputStreamIfUnread r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D194186
2023-11-27 14:34:00 +00:00
Kagami Sascha Rosylight
f45f3daa00 Bug 1865640 - Part 2: Grab StrongWorkerRef in StartConsuming instead of Create r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D194090
2023-11-23 11:34:25 +00:00
Kagami Sascha Rosylight
cefcb6d8bb Bug 1865640 - Part 1: Drop SCRIPT_HOLDER from FetchStreamReader r=smaug
It's not holding any JS objects anymore, probably since the migration to DOM streams.

Differential Revision: https://phabricator.services.mozilla.com/D194089
2023-11-23 11:34:25 +00:00
Emilio Cobos Álvarez
d02e297b2d Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Peter Van der Beken
2ba4663c86 Bug 1690111 - Use new TypedArray APIs for appending data to a container. r=farre,extension-reviewers,media-playback-reviewers,kmag,alwu,padenot
Depends on D152494

Differential Revision: https://phabricator.services.mozilla.com/D152495
2023-09-20 09:42:01 +00:00
Cosmin Sabou
c3effd7450 Backed out 13 changesets (bug 1690111) for causing fetch related crashes.
Backed out changeset 5f2c25d194ad (bug 1690111)
Backed out changeset 76c408bcd053 (bug 1690111)
Backed out changeset 6d0649fdafff (bug 1690111)
Backed out changeset c1330b5e8c43 (bug 1690111)
Backed out changeset 5fa36d8fd2a5 (bug 1690111)
Backed out changeset daf7d747853a (bug 1690111)
Backed out changeset f70e09a7f5c6 (bug 1690111)
Backed out changeset 40c6d6eed7f8 (bug 1690111)
Backed out changeset 692f2a759573 (bug 1690111)
Backed out changeset 7140866dd9f6 (bug 1690111)
Backed out changeset 2865fe682139 (bug 1690111)
Backed out changeset 9dcd2416f8a5 (bug 1690111)
Backed out changeset 9c411bf84079 (bug 1690111)
2023-09-11 17:55:24 +03:00
Peter Van der Beken
e953841f74 Bug 1690111 - Use new TypedArray APIs for appending data to a container. r=farre,extension-reviewers,media-playback-reviewers,kmag,alwu,padenot
Depends on D152494

Differential Revision: https://phabricator.services.mozilla.com/D152495
2023-09-11 12:52:20 +00:00
Jens Stutte
7475832036 Bug 1833790 - Ignore StrongWorkerRef callback if mWorkerRef is already cleared. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D180072
2023-06-06 16:02:52 +00:00
Kagami Sascha Rosylight
2229973496 Bug 1832326 - Part 2: Remove FetchBody::mReadableStreamReader r=smaug
FetchBody does nothing with the strong reference. Both ReadableStream and FetchStreamReader have their strong references and corresponding cycle collection, so this one can go away.

Depends on D177904

Differential Revision: https://phabricator.services.mozilla.com/D178098
2023-05-16 00:08:01 +00:00
Kagami Sascha Rosylight
14b3486c79 Bug 1823429 - Don't try another read from ChunkSteps r=smaug
Having another read request on an empty chunk sounds nice, but I guess it's not worth allowing recursion for this edge case.

Now the next read request will happen asynchronously by the next OnOutputStreamReady callback, which is similar to what Blink does and the spec recommends.

* Blink: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/fetch/readable_stream_bytes_consumer.cc;l=179-186;drc=059796845b1738dbf28ea76f0e9ff4b6f8787d3a (queues a microtask to prevent recursion)
* Spec: https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes (See the note below "chunk steps")

Differential Revision: https://phabricator.services.mozilla.com/D173813
2023-04-04 13:35:01 +00:00
Nika Layzell
2336150404 Bug 1538754 - Consistently watch the nsIAsyncOutputStream for closure, r=asuth,saschanaz
Before these changes, there were a number of cases where it would be
possible for the pipe to be closed or otherwise encounter an error, and
for there to be a very large or potentially indefinite delay before that
error is reported to the ReadableStream.

This patch avoids changing too much of the structure of the existing
FetchStreamReader's design, while avoiding the potential pitfalls, and
ensuring that the stream is being consistently watched.

A more polished patch in the future may be able to perform a more
efficient and direct adaptation from a `ReadableStream` or
`WritableStream` to the `nsIAsyncInputStream` and `nsIAsyncOutputStream`
types, but that was not tackled here.

Differential Revision: https://phabricator.services.mozilla.com/D168481
2023-03-30 15:14:00 +00:00
Kagami Sascha Rosylight
6054f3391e Bug 1810759 - Replace ReadableStream internal algorithm uses in Fetch r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D167370
2023-01-24 14:52:03 +00:00
Daniel Holbert
b9fb45ee7a Bug 1800342: Make NS_NewPipe2 and NS_NewPipe infallible, to reflect reality. r=xpcom-reviewers,necko-reviewers,nika,kershaw
This patch doesn't change behavior; these APIs were already effectively
infallible, in the sense that it was impossible for them to return anything
other than NS_OK.

The actual API changes here are in xpcom/io/nsIPipe.idl and
xpcom/io/nsPipe3.cpp, and the rest of this patch is just updates to callsites,
removing code that handled failure-flavored return values from these functions.
(All of this removed code was already dead code, effectively.)

Differential Revision: https://phabricator.services.mozilla.com/D161947
2022-11-14 23:22:16 +00:00
Matthew Gaudet
36b1550bec 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
64d99f7a70 Bug 1795914 - Remove JS Streams implementation r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D159610
2022-10-24 16:05:58 +00:00
Norisz Fay
f20f4b9b72 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
ead54c18cd 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
6e84b31e91 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
9cf3d82c8c 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
Andrew Sutherland
d528d2281e 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
1a0ccba79a 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
7c4e16db03 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
Tom Schuster
1f263720b5 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
Matthew Gaudet
ad845e0b67 Bug 1757241 - Remove !MOZ_DOM_STREAMS code from most files r=smaug
I've also tested to verify that JS Streams remains enabled in the JS Shell package

Differential Revision: https://phabricator.services.mozilla.com/D142620
2022-04-13 18:57:48 +00:00
Tom Schuster
64985daaf7 Bug 1760419 - Try to paper over nullptr.
Differential Revision: https://phabricator.services.mozilla.com/D141553
2022-03-19 17:50:08 +00:00
Tom Schuster
5b7586b636 Bug 1750298 - Use custom ReadRequest for FetchStreamReader. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D137681
2022-03-18 17:46:32 +00:00
Bryan Thrall
d64b59843d 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
Matthew Gaudet
572f0768fd 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
Matthew Gaudet
bf5de24a4f 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
Matthew Gaudet
108063d593 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
Matthew Gaudet
9e76758612 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
7cf26082b1 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
Olli Pettay
d201b6a86d 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
Jens Stutte
0780512aa4 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
Simon Giesecke
2969e54562 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
80cf7cc919 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke
b68ba311a2 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
c351c837d1 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke
e46fd72f6f 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
4a344e2a83 Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke
fa4029ad0a 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
Simon Giesecke
46908cfb51 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
68b806d604 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
a6e7dcc53f Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru
8f709b39e8 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
Andi-Bogdan Postelnicu
1294cccde5 Bug 1671641 - Make dom/fetch buildable outside of unified-build environment. r=sg
Depends on D93998

Differential Revision: https://phabricator.services.mozilla.com/D94015
2020-10-21 08:00:18 +00:00
Simon Giesecke
a69d79b6db Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Andreas Farre
9509fc894a Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936
2020-04-07 15:17:47 +00:00
Simon Giesecke
9bcfd47601 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980
2020-02-13 14:38:48 +00:00
shindli
6bb3487209 Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00