mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -702,7 +702,7 @@ impl WritableStreamDefaultController {
|
|||
// Perform ! WritableStreamDefaultControllerErrorIfNeeded(controller, returnValue.[[Value]]).
|
||||
// Create a rooted value for the error.
|
||||
rooted!(in(*cx) let mut rooted_error = UndefinedValue());
|
||||
error.to_jsval(cx, global, rooted_error.handle_mut());
|
||||
error.to_jsval(cx, global, rooted_error.handle_mut(), can_gc);
|
||||
self.error_if_needed(cx, rooted_error.handle(), global, can_gc);
|
||||
|
||||
// Return 1.
|
||||
|
@ -734,7 +734,7 @@ impl WritableStreamDefaultController {
|
|||
// Perform ! WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueResult.[[Value]]).
|
||||
// Create a rooted value for the error.
|
||||
rooted!(in(*cx) let mut rooted_error = UndefinedValue());
|
||||
error.to_jsval(cx, global, rooted_error.handle_mut());
|
||||
error.to_jsval(cx, global, rooted_error.handle_mut(), can_gc);
|
||||
self.error_if_needed(cx, rooted_error.handle(), global, can_gc);
|
||||
|
||||
// Return.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue