mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 09:52:54 +00:00
LibWeb/WebAssembly+test-wasm: Use get_without_side_effects() more
This commit is contained in:
parent
9fd9e424ff
commit
1ac3d253c5
Notes:
sideshowbarker
2024-07-18 10:27:02 +09:00
Author: https://github.com/linusg
Commit: 1ac3d253c5
Pull-request: https://github.com/SerenityOS/serenity/pull/8262
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/mattco98
2 changed files with 3 additions and 3 deletions
|
@ -119,7 +119,7 @@ TESTJS_GLOBAL_FUNCTION(parse_webassembly_module, parseWebAssemblyModule)
|
||||||
if (import_value.is_object()) {
|
if (import_value.is_object()) {
|
||||||
auto& import_object = import_value.as_object();
|
auto& import_object = import_value.as_object();
|
||||||
for (auto& property : import_object.shape().property_table()) {
|
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<WebAssemblyModule>(value.as_object()))
|
if (!value.is_object() || !is<WebAssemblyModule>(value.as_object()))
|
||||||
continue;
|
continue;
|
||||||
auto& module_object = static_cast<WebAssemblyModule&>(value.as_object());
|
auto& module_object = static_cast<WebAssemblyModule&>(value.as_object());
|
||||||
|
|
|
@ -37,8 +37,8 @@ JS::Value WebAssemblyMemoryConstructor::construct(FunctionObject&)
|
||||||
if (vm.exception())
|
if (vm.exception())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
auto initial_value = descriptor->get_own_property("initial", {}, JS::AllowSideEffects::No);
|
auto initial_value = descriptor->get_without_side_effects("initial");
|
||||||
auto maximum_value = descriptor->get_own_property("maximum", {}, JS::AllowSideEffects::No);
|
auto maximum_value = descriptor->get_without_side_effects("maximum");
|
||||||
|
|
||||||
if (initial_value.is_empty()) {
|
if (initial_value.is_empty()) {
|
||||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Number");
|
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Number");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue