From 1ac3d253c5238fcdbb18f3759737f3b3bda95e27 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 3 Jul 2021 22:38:30 +0100 Subject: [PATCH] LibWeb/WebAssembly+test-wasm: Use get_without_side_effects() more --- Tests/LibWasm/test-wasm.cpp | 2 +- .../LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/LibWasm/test-wasm.cpp b/Tests/LibWasm/test-wasm.cpp index f2cea9f057..62b5f3e49b 100644 --- a/Tests/LibWasm/test-wasm.cpp +++ b/Tests/LibWasm/test-wasm.cpp @@ -119,7 +119,7 @@ TESTJS_GLOBAL_FUNCTION(parse_webassembly_module, parseWebAssemblyModule) if (import_value.is_object()) { auto& import_object = import_value.as_object(); for (auto& property : import_object.shape().property_table()) { - auto value = import_object.get_own_property(property.key, {}, JS::AllowSideEffects::No); + auto value = import_object.get_without_side_effects(property.key); if (!value.is_object() || !is(value.as_object())) continue; auto& module_object = static_cast(value.as_object()); diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp index ed5a454ffa..972266119f 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp @@ -37,8 +37,8 @@ JS::Value WebAssemblyMemoryConstructor::construct(FunctionObject&) if (vm.exception()) return {}; - auto initial_value = descriptor->get_own_property("initial", {}, JS::AllowSideEffects::No); - auto maximum_value = descriptor->get_own_property("maximum", {}, JS::AllowSideEffects::No); + auto initial_value = descriptor->get_without_side_effects("initial"); + auto maximum_value = descriptor->get_without_side_effects("maximum"); if (initial_value.is_empty()) { vm.throw_exception(global_object, JS::ErrorType::NotA, "Number");