servo/components/script_bindings
Gregory Terzian 8d39d7706a
Streams: Implement stream pipe-to (#35650)
* implement PipeTo, stub pipe_to

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* define a data structure to manage the piping

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* implement propagation of errors forward and backward, stub shutdown and shutdown with action

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* adding more fine-grain shutdown variants to state

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* implement progagate closing backward and forward

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* implement shutdown and actions

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* implement reading and writing

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* implement shutdown continuation and finalize

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fix typo

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* add can_gc arguments

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* implement writer close with error propagation

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* move and document wait on pending write

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* more docs

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* write pending reads as part of shutdown

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* turn on piping test suite

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* add comment about using Rust api
improve comment on result
add comment on backpressure

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fix multiple propagations

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fix writing of chunks

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fix error and close propagation
update test expectations

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fix warnings

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* improve docs
remove redundant logic in pending writes

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fix clippy

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* remove unnecessary expansion of visibility of enqueued value to_jsval

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* remove unnecessary conditional accessing of streams when propagating states

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* improve docs

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* remove unused result var

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fix typo

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* remove redundant logic dealing with closed sources with pending writes

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* add doc links for shutdown actions

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* add comments on the need to return early when shutting down before checking close and error states

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* fmt

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* Update test expectations

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* fix can_gc

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-03-18 11:13:09 +00:00
..
codegen Streams: Implement stream pipe-to (#35650) 2025-03-18 11:13:09 +00:00
webidls Streams: Implement stream pipe-to (#35650) 2025-03-18 11:13:09 +00:00
build.rs
callback.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
Cargo.toml Move CustomTraceable to script_bindings. (#35988) 2025-03-16 14:08:22 +00:00
constant.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
conversions.rs Move CustomTraceable to script_bindings. (#35988) 2025-03-16 14:08:22 +00:00
error.rs Move more bindings types to script_bindings (#35620) 2025-02-23 14:25:46 +00:00
inheritance.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
iterable.rs Move more bindings types to script_bindings (#35620) 2025-02-23 14:25:46 +00:00
lib.rs Move CustomTraceable to script_bindings. (#35988) 2025-03-16 14:08:22 +00:00
like.rs Move more bindings types to script_bindings (#35620) 2025-02-23 14:25:46 +00:00
record.rs Move CustomTraceable to script_bindings. (#35988) 2025-03-16 14:08:22 +00:00
reflector.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
root.rs Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00
script_runtime.rs Move more bindings code to script_bindings (#35578) 2025-02-22 04:46:56 +00:00
str.rs Use new stylo crate renames (#35898) 2025-03-12 00:02:12 +00:00
trace.rs Move CustomTraceable to script_bindings. (#35988) 2025-03-16 14:08:22 +00:00
utils.rs Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00
weakref.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00