refactor: add CanGc as argument to exception_to_promise (#35647)

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
Yerkebulan Tulibergenov 2025-02-25 05:21:59 -08:00 committed by GitHub
parent 754b117011
commit 31b2f81bc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 11 deletions

View file

@ -4249,7 +4249,7 @@ class CGMethodPromiseWrapper(CGAbstractExternMethod):
if ok {
return true;
}
return exception_to_promise(cx, (*args).rval());
return exception_to_promise(cx, (*args).rval(), CanGc::note());
""",
methodName=self.method.identifier.name,
args=", ".join(arg.name for arg in self.args),
@ -4284,7 +4284,7 @@ class CGGetterPromiseWrapper(CGAbstractExternMethod):
if ok {
return true;
}
return exception_to_promise(cx, args.rval());
return exception_to_promise(cx, args.rval(), CanGc::note());
""",
methodName=self.method_call,
args=", ".join(arg.name for arg in self.args),