diff options
author | Linus Groh <mail@linusgroh.de> | 2021-10-03 02:21:44 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-03 20:14:03 +0100 |
commit | 3af559ee8a3f2a2a170496e2f46d7caf3439befb (patch) | |
tree | d2db6eaa1acae0649cb0806039bf95bc320d1ac2 /Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp | |
parent | ed5a9aa03850294d7b0280d58ed08f76c606e25c (diff) | |
download | serenity-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.cpp | 4 |
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 |