mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
implement Writablestreamdefaultcontroller abortcontroller (#37511)
using abort signal and abortcontroller in Writablestreamdefaultcontroller Part of https://github.com/servo/servo/issues/34866 --------- Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
parent
3ee339eb6d
commit
fc2135cc02
9 changed files with 63 additions and 119 deletions
|
@ -238,6 +238,7 @@ impl WritableStreamDefaultWriter {
|
|||
cx: SafeJSContext,
|
||||
global: &GlobalScope,
|
||||
reason: SafeHandleValue,
|
||||
realm: InRealm,
|
||||
can_gc: CanGc,
|
||||
) -> Rc<Promise> {
|
||||
// Let stream be writer.[[stream]].
|
||||
|
@ -247,7 +248,7 @@ impl WritableStreamDefaultWriter {
|
|||
};
|
||||
|
||||
// Return ! WritableStreamAbort(stream, reason).
|
||||
stream.abort(cx, global, reason, can_gc)
|
||||
stream.abort(cx, global, reason, realm, can_gc)
|
||||
}
|
||||
|
||||
/// <https://streams.spec.whatwg.org/#writable-stream-default-writer-close>
|
||||
|
@ -468,7 +469,7 @@ impl WritableStreamDefaultWriterMethods<crate::DomTypeHolder> for WritableStream
|
|||
}
|
||||
|
||||
// Return ! WritableStreamDefaultWriterAbort(this, reason).
|
||||
self.abort(cx, &global, reason, can_gc)
|
||||
self.abort(cx, &global, reason, realm, can_gc)
|
||||
}
|
||||
|
||||
/// <https://streams.spec.whatwg.org/#default-writer-close>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue