Commit Graph

67 Commits

Author SHA1 Message Date
Tom Schuster
a8b70c2cc4 Bug 1772772 - Implement ReadableStream.from. r=saschanaz,spidermonkey-reviewers,webidl,mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D148358
2023-07-04 16:48:23 +00:00
Kagami Sascha Rosylight
6ad1f4444e Bug 1811440 - Part 2: Implement pull-from-bytes algorithm for InputToReadableStreamAlgorithms r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D170499
2023-06-15 01:31:28 +00:00
Kagami Sascha Rosylight
45f0f3457c Bug 1811882 - Part 2: Implement ReadableStream::MaybeGetInputStreamIfUnread r=smaug
All existing GetBodyStreamHolder call is consciously done on unread streams, either to simply detect nsIInputStream-based streams or to get the internal nsIInputStream. The function can directly return nsIInputStream to fulfill the existing purposes.

Differential Revision: https://phabricator.services.mozilla.com/D178359
2023-06-06 13:07:46 +00:00
Kagami Sascha Rosylight
6e9473d59e Bug 1819124 - Mark "native" stream constructors as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=smaug
It's marked as can-run-script because of StartCallback, but Underlying{Source/Sink}AlgorithmsWrapper::StartCallback is empty and thus can't run any scripts.

Differential Revision: https://phabricator.services.mozilla.com/D178356
2023-06-06 13:07:45 +00:00
Randell Jesup
58f8cf5737 Bug 1824225: Add support for Implicit/Explicit to ReadableStream r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D173525
2023-03-24 22:19:08 +00:00
Kagami Sascha Rosylight
02de7b95ee Bug 1816075 - Add ReadableStream::SetUpByteNative r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D169439
2023-02-13 13:36:34 +00:00
Kagami Sascha Rosylight
c48ae28e73 Bug 1809408 - Part 1: Move ReadableStream internal algorithms to internal namespace r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D167782
2023-02-07 11:56:05 +00:00
Marian-Vasile Laza
ad0357fae6 Backed out 3 changesets (bug 1809408) for bustages on ReadableStreamBYOBRequest.cpp. CLOSED TREE
Backed out changeset 7b9ab840dcf1 (bug 1809408)
Backed out changeset 38da95750e3f (bug 1809408)
Backed out changeset 7bc810a8e68a (bug 1809408)
2023-02-06 17:23:47 +02:00
Kagami Sascha Rosylight
2df8510956 Bug 1809408 - Part 1: Move ReadableStream internal algorithms to internal namespace r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D167782
2023-02-06 13:12:53 +00:00
Kagami Sascha Rosylight
5f82e80667 Bug 1812315 - Part 2: Implement ReadableStream::CreateNative and WritableStream::ErrorNative for WebTransport r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D167825
2023-01-31 17:31:09 +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
Kagami Sascha Rosylight
966acf0949 Bug 1809895 - Part 4: Implement ReadableStream::ErrorNative and use it in BodyStream r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D166922
2023-01-17 14:59:29 +00:00
Kagami Sascha Rosylight
954b46fb2a Bug 1809895 - Part 3: Create BodyStream internal stream using ReadableStream::CreateByteNative r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166807
2023-01-17 14:59:28 +00:00
Kagami Sascha Rosylight
d9f131146a Bug 1809895 - Part 2: Implement ReadableStream::CreateByteNative r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166806
2023-01-17 14:59:28 +00:00
Kagami Sascha Rosylight
d096e1a1eb Bug 1809673 - Part 1: Stop using stream internal algorithms from BodyStream r=smaug,evilpie
This adds some of the public helper functions for ReadableStream provided by the spec, that are needed for BodyStream.

Differential Revision: https://phabricator.services.mozilla.com/D166663
2023-01-12 17:27:20 +00:00
Kagami Sascha Rosylight
cb837248d5 Bug 1803386 - Part 2: Remove ReadableStream::ReleaseObjectsFromBodyStream r=smaug
No point to release a stream holder that is then nullified. Holding an empty holder is totally fine.

Differential Revision: https://phabricator.services.mozilla.com/D166534
2023-01-12 13:43:59 +00:00
Kagami Sascha Rosylight
48d0a87dff Bug 1803386 - Part 1: Replace ReadableStream::mNativeUnderlyingSource with GetBodyStreamHolder() r=smaug
The underlying source algorithms class already has strong ref, so just use it.

Differential Revision: https://phabricator.services.mozilla.com/D166533
2023-01-12 13:43:58 +00:00
Tom Schuster
3468d199f9 Bug 1734244 - Implement async iteration of ReadableStream. r=mgaudet,peterv
Differential Revision: https://phabricator.services.mozilla.com/D153312
2022-12-20 16:26:25 +00:00
Kagami Sascha Rosylight
b93a699877 Bug 1803371 - Part 4: Add UnderlyingSourceAlgorithmsBase::ReleaseObjects r=smaug
The existing ErrorCallback is now renamed as ReleaseObjects and is called for any type of frozen streams caused by close/cancel/error.

BodyStream::ErrorPropagation used to call ErrorCallback via calling ReadableStreamError. Now ReadableStreamError does not call ErrorCallback anymore, so ErrorPropagation now has a bit more cleanup steps.

The cleanup steps in BodyStream::CancelCallback is replaced by CloseInputAndReleaseObjects which will be called by new UnderlyingSourceAlgorithmsBase::ReleaseObjects.

Differential Revision: https://phabricator.services.mozilla.com/D163528
2022-12-06 18:37:29 +00:00
Kagami Sascha Rosylight
9b9073afbd Bug 1803371 - Part 1: Remove redundant ReadableStream::mAlgorithms r=smaug
ErrorCallback has surprisingly been broken as nothing currently set the algorithm with SetErrorAlgorithm. This patch removes the unused part, preparing another way in a child patch.

Differential Revision: https://phabricator.services.mozilla.com/D163691
2022-12-06 18:37:27 +00:00
Butkovits Atila
5de0681a6c Backed out changeset 68ca2f48ea95 (bug 1734244) for causing leaks. CLOSED TREE 2022-12-06 18:22:43 +02:00
Tom Schuster
fc53ab5da5 Bug 1734244 - Implement async iteration of ReadableStream. r=mgaudet,peterv
Differential Revision: https://phabricator.services.mozilla.com/D153312
2022-12-06 12:46:44 +00:00
Butkovits Atila
159e10a64c Backed out changeset 2ce86a76d99d (bug 1734244) for causing wpt failures at RuntimeService.cpp 2022-12-01 15:19:16 +02:00
Tom Schuster
d7d76c3cef Bug 1734244 - Implement async iteration of ReadableStream. r=mgaudet,peterv
Differential Revision: https://phabricator.services.mozilla.com/D153312
2022-12-01 09:04:34 +00:00
Butkovits Atila
d742400bef Backed out changeset fd13db3ea2b3 (bug 1734244) for causing failures at idlharness-shadowrealm.window.html. CLOSED TREE 2022-12-01 08:16:58 +02:00
Tom Schuster
df1e680e7f Bug 1734244 - Implement async iteration of ReadableStream. r=mgaudet,peterv
Differential Revision: https://phabricator.services.mozilla.com/D153312
2022-11-30 22:26:28 +00:00
Randell Jesup
c57e1a6027 Bug 1790676: WebTransport DOM API initial framework r=saschanaz,necko-reviewers,emilio,valentin
This includes WebTransport, WebTransportSendStream,
WebTransportReceiveStreams, WebTransportBidirectionalStream and
WebTransportError classes without any actual functionality

Differential Revision: https://phabricator.services.mozilla.com/D162323
2022-11-22 13:43:57 +00:00
Kagami Sascha Rosylight
bbea720e1a Bug 1659025 - Implement [Transferable] for ReadableStream r=smaug,sfink
Differential Revision: https://phabricator.services.mozilla.com/D139525
2022-05-19 11:54:31 +00:00
Kagami Sascha Rosylight
fc38e8526f Bug 1765832 - Part 2: Remove redundant MOZ_KNOWN_LIVE in dom/streams r=smaug
Those are indeed not being mutated during the object's lifetime before
CC, but currently the initialization is being done outside of the
constructor and that violates the newly proposed rule.

The only affected use is TransformStreamDefaultController::mStream
though, as others are exposed by public getters which does not support
MOZ_KNOWN_LIVE yet (and thus MOZ_KnownLive() is used by callers).

Ideally those should be refactored to be initialized within the
constructor, but I'll do that separately.

Differential Revision: https://phabricator.services.mozilla.com/D146209
2022-05-18 18:07:01 +00:00
criss
95341972cc Backed out 2 changesets (bug 1659025) for causing wpt failures. CLOSED TREE
Backed out changeset 9442f1d617ea (bug 1659025)
Backed out changeset a7f050ab968d (bug 1659025)
2022-05-18 16:30:39 +03:00
criss
facc85ec3f Backed out 3 changesets (bug 1765832) for causing build bustages on Transferable.cpp
Backed out changeset c7c5a5208d60 (bug 1765832)
Backed out changeset 05a53421e1d8 (bug 1765832)
Backed out changeset 87cf3ec70aab (bug 1765832)
2022-05-18 16:28:24 +03:00
Kagami Sascha Rosylight
924c5f38f1 Bug 1765832 - Part 2: Remove redundant MOZ_KNOWN_LIVE in dom/streams r=smaug
Those are indeed not being mutated during the object's lifetime before
CC, but currently the initialization is being done outside of the
constructor and that violates the newly proposed rule.

The only affected use is TransformStreamDefaultController::mStream
though, as others are exposed by public getters which does not support
MOZ_KNOWN_LIVE yet (and thus MOZ_KnownLive() is used by callers).

Ideally those should be refactored to be initialized within the
constructor, but I'll do that separately.

Differential Revision: https://phabricator.services.mozilla.com/D146209
2022-05-18 12:57:44 +00:00
Kagami Sascha Rosylight
8369a77580 Bug 1659025 - Implement [Transferable] for ReadableStream r=smaug,sfink
Differential Revision: https://phabricator.services.mozilla.com/D139525
2022-05-18 12:01:01 +00:00
Cristian Tuns
553870246f Backed out 2 changesets (bug 1659025) for causing build bustages on Unified_cpp_netwerk_ipc0.obj CLOSED TREE
Backed out changeset cc94267daae1 (bug 1659025)
Backed out changeset 180af79082fb (bug 1659025)
2022-05-18 05:41:18 -04:00
Kagami Sascha Rosylight
8888e1e1cd Bug 1659025 - Implement [Transferable] for ReadableStream r=smaug,sfink
Differential Revision: https://phabricator.services.mozilla.com/D139525
2022-05-18 09:08:04 +00:00
Kagami Sascha Rosylight
774d2549d3 Bug 1769290 - Part 1: Apply mozilla-js-handle-rooted-typedef against dom/streams r=smaug
Changes done by `./mach static-analysis check --checks="-*,mozilla-js-handle-rooted-typedef" --fix --header-filter=dom dom/streams; ./mach clang-format --outgoing`.

Differential Revision: https://phabricator.services.mozilla.com/D146329
2022-05-18 08:43:08 +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
Kagami Sascha Rosylight
30e23bcca5 Bug 1763142 - Implement transform sink/source algorithms r=mgaudet,emilio
Differential Revision: https://phabricator.services.mozilla.com/D142228
2022-04-06 18:01:28 +00:00
Iulian Moraru
a4f632cb99 Backed out changeset 2a6a62b9c73d (bug 1763142) for causing build bustages on TransformStream.cpp. CLOSED TREE 2022-04-06 19:36:40 +03:00
Kagami Sascha Rosylight
922f5667f9 Bug 1763142 - Implement transform sink/source algorithms r=mgaudet,emilio
Differential Revision: https://phabricator.services.mozilla.com/D142228
2022-04-06 13:09:54 +00:00
Kagami Sascha Rosylight
0c42d5b542 Bug 1734886 - Part 5: Implement InitializeTransformStream r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D140377
2022-03-23 23:30:47 +00:00
Butkovits Atila
645b43a258 Backed out changeset 544d6892423d (bug 1734886) for causing failures attransform-stream.html. CLOSED TREE 2022-03-24 00:29:41 +02:00
Kagami Sascha Rosylight
0e40995c44 Bug 1734886 - Part 5: Implement InitializeTransformStream r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D140377
2022-03-23 20:58:49 +00:00
Butkovits Atila
c0b0c1cb0d Backed out changeset 32e1a02fdd2c (bug 1734886) for causing bustages. CLOSED TREE 2022-03-23 21:39:33 +02:00
Kagami Sascha Rosylight
6cb4c45999 Bug 1734886 - Part 5: Implement InitializeTransformStream r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D140377
2022-03-23 19:05:09 +00:00
Kagami Sascha Rosylight
8ac6a60932 Bug 1757808 - Part 2: Merge SourceCallback classes as UnderlyingSourceAlgorithms r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D140281
2022-03-08 19:29:14 +00:00
Kagami Sascha Rosylight
4db308193a Bug 1757653 - Remove redundant externs in dom/streams r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D139991
2022-03-02 01:31:26 +00:00
Bryan Thrall
b2b39b6348 Bug 1734174 - Remove unneeded implicitJSContext from ReadableStream::GetReader() r=mgaudet
Depends on D139872

Differential Revision: https://phabricator.services.mozilla.com/D139873
2022-02-28 22:31:42 +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
Kagami Sascha Rosylight
332a302c05 Bug 1734243 - Part 2: Implement ReadableStream#pipeThrough r=mgaudet,evilpie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D139506
2022-02-25 20:11:40 +00:00