mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibJS: Remove the non-standard put helper and replace it's usages
This removes all usages of the non-standard put helper method and replaces all of it's usages with the specification required alternative or with define_direct_property where appropriate.
This commit is contained in:
parent
53f70e5208
commit
e3ef241108
15 changed files with 40 additions and 49 deletions
|
@ -329,8 +329,8 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::instantiate)
|
|||
auto instance_object = vm.heap().allocate<WebAssemblyInstanceObject>(global_object, global_object, result.value());
|
||||
if (should_return_module) {
|
||||
auto object = JS::Object::create(global_object, nullptr);
|
||||
object->put("module", vm.heap().allocate<WebAssemblyModuleObject>(global_object, global_object, s_compiled_modules.size() - 1));
|
||||
object->put("instance", instance_object);
|
||||
object->define_direct_property("module", vm.heap().allocate<WebAssemblyModuleObject>(global_object, global_object, s_compiled_modules.size() - 1), JS::default_attributes);
|
||||
object->define_direct_property("instance", instance_object, JS::default_attributes);
|
||||
promise->fulfill(object);
|
||||
} else {
|
||||
promise->fulfill(instance_object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue