mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: Mark callback methods with CanGc. (#35753)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
3d320fa96a
commit
5650fa2e79
26 changed files with 133 additions and 67 deletions
|
@ -373,6 +373,7 @@ impl WritableStreamDefaultController {
|
|||
self,
|
||||
result.handle_mut(),
|
||||
ExceptionHandling::Rethrow,
|
||||
can_gc,
|
||||
)?;
|
||||
let is_promise = unsafe {
|
||||
if result.is_object() {
|
||||
|
@ -445,6 +446,7 @@ impl WritableStreamDefaultController {
|
|||
&this_object.handle(),
|
||||
Some(reason),
|
||||
ExceptionHandling::Rethrow,
|
||||
can_gc,
|
||||
)
|
||||
} else {
|
||||
Ok(Promise::new_resolved(global, cx, (), can_gc))
|
||||
|
@ -471,6 +473,7 @@ impl WritableStreamDefaultController {
|
|||
chunk,
|
||||
self,
|
||||
ExceptionHandling::Rethrow,
|
||||
can_gc,
|
||||
)
|
||||
} else {
|
||||
Ok(Promise::new_resolved(global, cx, (), can_gc))
|
||||
|
@ -492,7 +495,7 @@ impl WritableStreamDefaultController {
|
|||
this_object.set(self.underlying_sink_obj.get());
|
||||
let algo = self.close.borrow().clone();
|
||||
let result = if let Some(algo) = algo {
|
||||
algo.Call_(&this_object.handle(), ExceptionHandling::Rethrow)
|
||||
algo.Call_(&this_object.handle(), ExceptionHandling::Rethrow, can_gc)
|
||||
} else {
|
||||
Ok(Promise::new_resolved(global, cx, (), can_gc))
|
||||
};
|
||||
|
@ -688,7 +691,7 @@ impl WritableStreamDefaultController {
|
|||
|
||||
// Let returnValue be the result of performing controller.[[strategySizeAlgorithm]],
|
||||
// passing in chunk, and interpreting the result as a completion record.
|
||||
let result = strategy_size.Call__(chunk, ExceptionHandling::Rethrow);
|
||||
let result = strategy_size.Call__(chunk, ExceptionHandling::Rethrow, can_gc);
|
||||
|
||||
match result {
|
||||
// Let chunkSize be result.[[Value]].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue