mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb: Perform writes during ReadableStreamPipeTo asynchronously
I don't quite see what spec text requires this, but it is explicitly
checked by WPT. We used to pass this test, but that regressed after
commit 3c6010c663
.
This commit is contained in:
parent
95288e594b
commit
1536d51c5c
2 changed files with 11 additions and 4 deletions
|
@ -497,8 +497,15 @@ private:
|
||||||
|
|
||||||
auto on_chunk = GC::create_function(heap(), [this](JS::Value chunk) {
|
auto on_chunk = GC::create_function(heap(), [this](JS::Value chunk) {
|
||||||
m_unwritten_chunks.append(chunk);
|
m_unwritten_chunks.append(chunk);
|
||||||
write_chunk();
|
|
||||||
process();
|
if (check_for_error_and_close_states())
|
||||||
|
return;
|
||||||
|
|
||||||
|
HTML::queue_a_microtask(nullptr, GC::create_function(m_realm->heap(), [this]() {
|
||||||
|
HTML::TemporaryExecutionContext execution_context { m_realm, HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||||
|
write_chunk();
|
||||||
|
process();
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
auto on_complete = GC::create_function(heap(), [this]() {
|
auto on_complete = GC::create_function(heap(), [this]() {
|
||||||
|
|
|
@ -2,5 +2,5 @@ Harness status: OK
|
||||||
|
|
||||||
Found 1 tests
|
Found 1 tests
|
||||||
|
|
||||||
1 Fail
|
1 Pass
|
||||||
Fail enqueue() must not synchronously call write algorithm
|
Pass enqueue() must not synchronously call write algorithm
|
Loading…
Add table
Add a link
Reference in a new issue