1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +00:00

LibWeb: Fix the prototype of a couple of WebAssembly prototype objects

Like any other regular, non-inheriting web platform prototype, the
prototype's prototype should be Object.prototype, not the global object.

Another reason to get rid of "global object (an object) + prototype
object (also an object)"-style APIs for allocation :^)
This commit is contained in:
Linus Groh 2022-08-16 00:20:49 +01:00
parent 4806567f05
commit 8ceef031e8
4 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ class WebAssemblyInstancePrototype final : public JS::Object {
public:
explicit WebAssemblyInstancePrototype(JS::GlobalObject& global_object)
: Object(global_object)
: JS::Object(*global_object.object_prototype())
{
}

View file

@ -20,7 +20,7 @@ class WebAssemblyMemoryPrototype final : public JS::Object {
public:
explicit WebAssemblyMemoryPrototype(JS::GlobalObject& global_object)
: JS::Object(global_object)
: JS::Object(*global_object.object_prototype())
{
}

View file

@ -20,7 +20,7 @@ class WebAssemblyModulePrototype final : public JS::Object {
public:
explicit WebAssemblyModulePrototype(JS::GlobalObject& global_object)
: JS::Object(global_object)
: JS::Object(*global_object.object_prototype())
{
}
};

View file

@ -20,7 +20,7 @@ class WebAssemblyTablePrototype final : public JS::Object {
public:
explicit WebAssemblyTablePrototype(JS::GlobalObject& global_object)
: JS::Object(global_object)
: JS::Object(*global_object.object_prototype())
{
}