summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-10-03 02:21:44 +0100
committerLinus Groh <mail@linusgroh.de>2021-10-03 20:14:03 +0100
commit3af559ee8a3f2a2a170496e2f46d7caf3439befb (patch)
treed2db6eaa1acae0649cb0806039bf95bc320d1ac2 /Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
parented5a9aa03850294d7b0280d58ed08f76c606e25c (diff)
downloadserenity-3af559ee8a3f2a2a170496e2f46d7caf3439befb.zip
LibJS: Convert test_integrity_level() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
index efd4cafbe2..73f51ccad0 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
@@ -188,7 +188,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_frozen)
auto argument = vm.argument(0);
if (!argument.is_object())
return Value(true);
- return Value(argument.as_object().test_integrity_level(Object::IntegrityLevel::Frozen));
+ return Value(TRY_OR_DISCARD(argument.as_object().test_integrity_level(Object::IntegrityLevel::Frozen)));
}
// 20.1.2.16 Object.isSealed ( O ), https://tc39.es/ecma262/#sec-object.issealed
@@ -197,7 +197,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_sealed)
auto argument = vm.argument(0);
if (!argument.is_object())
return Value(true);
- return Value(argument.as_object().test_integrity_level(Object::IntegrityLevel::Sealed));
+ return Value(TRY_OR_DISCARD(argument.as_object().test_integrity_level(Object::IntegrityLevel::Sealed)));
}
// 20.1.2.18 Object.preventExtensions ( O ), https://tc39.es/ecma262/#sec-object.preventextensions