mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
script: add CanGc
argument to Promise::new_resolved
and Promise::new_rejected
(#35605)
* add CanGc to new_resolved and use it where possible Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * add CanGc to new_rejected Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
dd13342f18
commit
adb831eefe
8 changed files with 23 additions and 29 deletions
|
@ -115,7 +115,7 @@ impl DefaultTeeUnderlyingSource {
|
|||
// Return a promise resolved with undefined.
|
||||
let cx = GlobalScope::get_cx();
|
||||
rooted!(in(*cx) let mut rval = UndefinedValue());
|
||||
return Promise::new_resolved(&self.stream.global(), cx, rval.handle());
|
||||
return Promise::new_resolved(&self.stream.global(), cx, rval.handle(), can_gc);
|
||||
}
|
||||
|
||||
// Set reading to true.
|
||||
|
@ -147,7 +147,12 @@ impl DefaultTeeUnderlyingSource {
|
|||
// Return a promise resolved with undefined.
|
||||
let cx = GlobalScope::get_cx();
|
||||
rooted!(in(*cx) let mut rval = UndefinedValue());
|
||||
Promise::new_resolved(&self.stream.global(), GlobalScope::get_cx(), rval.handle())
|
||||
Promise::new_resolved(
|
||||
&self.stream.global(),
|
||||
GlobalScope::get_cx(),
|
||||
rval.handle(),
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
|
||||
/// <https://streams.spec.whatwg.org/#abstract-opdef-readablestreamdefaulttee>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue