mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
feat: add CanGc argument to Error::to_jsval (#36014)
* feat: add CanGc argument to Error::to_jsval Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * feat: pass CanGc to gen_type_error Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * fix: linting issues Signed-off-by: Arya Nair <aryaajitnair@gmail.com> --------- Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
This commit is contained in:
parent
6807a6e532
commit
94d12de7fd
11 changed files with 45 additions and 24 deletions
|
@ -552,7 +552,7 @@ impl ReadableStreamDefaultController {
|
|||
// TODO: check if `self.global()` is the right globalscope.
|
||||
error
|
||||
.clone()
|
||||
.to_jsval(cx, &self.global(), rval.handle_mut());
|
||||
.to_jsval(cx, &self.global(), rval.handle_mut(), can_gc);
|
||||
let promise = Promise::new(&global, can_gc);
|
||||
promise.reject_native(&rval.handle(), can_gc);
|
||||
promise
|
||||
|
@ -589,7 +589,7 @@ impl ReadableStreamDefaultController {
|
|||
// TODO: check if `self.global()` is the right globalscope.
|
||||
error
|
||||
.clone()
|
||||
.to_jsval(cx, &self.global(), rval.handle_mut());
|
||||
.to_jsval(cx, &self.global(), rval.handle_mut(), can_gc);
|
||||
let promise = Promise::new(&global, can_gc);
|
||||
promise.reject_native(&rval.handle(), can_gc);
|
||||
promise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue