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:
Arya Nair 2025-03-18 03:59:41 +05:30 committed by GitHub
parent 6807a6e532
commit 94d12de7fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 45 additions and 24 deletions

View file

@ -225,7 +225,7 @@ impl Promise {
let cx = GlobalScope::get_cx();
let _ac = enter_realm(self);
rooted!(in(*cx) let mut v = UndefinedValue());
error.to_jsval(cx, &self.global(), v.handle_mut());
error.to_jsval(cx, &self.global(), v.handle_mut(), can_gc);
self.reject(cx, v.handle(), can_gc);
}