Implement MicrotaskRunnable for DefaultTeeReadRequestMicrotask (#37404)

Implement `MicrotaskRunnable` for `DefaultTeeReadRequestMicrotask` to
run the microtask, instead of using its own ad-hoc mechanism via
`DefaultTeeReadRequestMicrotask::microtask_chunk_steps`.

Testing: No need for this refactoring.
Fixes: #37246

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This commit is contained in:
Kingsley Yung 2025-06-12 18:46:31 +08:00 committed by GitHub
parent 41bed9840a
commit b28e796647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View file

@ -147,7 +147,8 @@ impl MicrotaskQueue {
MutationObserver::notify_mutation_observers(can_gc);
},
Microtask::ReadableStreamTeeReadRequest(ref task) => {
task.microtask_chunk_steps(cx, can_gc)
let _realm = task.enter_realm();
task.handler(can_gc);
},
}
}