feat: add CanGc argument in get_dictionary_property (#36156)

* feat: add CanGc argument in get_dictionary_property

Signed-off-by: Arya Nair <aryaajitnair@gmail.com>

* feat: add CanGc argument in get_dictionary_property

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-26 00:54:47 +05:30 committed by GitHub
parent 5a5e49ce47
commit 80fc64d063
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 29 additions and 15 deletions

View file

@ -7394,8 +7394,9 @@ impl{self.generic} Clone for {self.makeClassName(self.dictionary)}{self.genericS
conversion = (
"{\n"
" rooted!(in(*cx) let mut rval = UndefinedValue());\n"
f' if get_dictionary_property(*cx, object.handle(), "{member.identifier.name}", rval.handle_mut())?'
" && !rval.is_undefined() {\n"
" if get_dictionary_property(*cx, object.handle(), "
f'"{member.identifier.name}", '
"rval.handle_mut(), CanGc::note())? && !rval.is_undefined() {\n"
f"{indent(conversion)}\n"
" } else {\n"
f"{indent(default)}\n"