mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
LibJS: Add missing exception check in internalize_json_property
The call to enumerable_own_property_names in the non-array case was missing an exception check. Fixes 1 test262 case (JSON/parse/reviver-object-own-keys-err.js)
This commit is contained in:
parent
5c3f781031
commit
99cb54670f
Notes:
sideshowbarker
2024-07-18 10:19:53 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/99cb54670f4 Pull-request: https://github.com/SerenityOS/serenity/pull/8480
@ -509,6 +509,8 @@ Value JSONObject::internalize_json_property(GlobalObject& global_object, Object*
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto property_list = value_object.enumerable_own_property_names(Object::PropertyKind::Key);
|
auto property_list = value_object.enumerable_own_property_names(Object::PropertyKind::Key);
|
||||||
|
if (vm.exception())
|
||||||
|
return {};
|
||||||
for (auto& property_name : property_list) {
|
for (auto& property_name : property_list) {
|
||||||
process_property(property_name.as_string().string());
|
process_property(property_name.as_string().string());
|
||||||
if (vm.exception())
|
if (vm.exception())
|
||||||
|
Loading…
Reference in New Issue
Block a user