mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 11:00:29 +00:00
LibWeb: Use "WebAssembly.Foo" in exception error messages
Not just "Foo" or "WebAssemblyFoo". This is how it's accessed from the outside (JS). Also fix one case of "not an" => "not a".
This commit is contained in:
parent
d713a84851
commit
79d8326370
Notes:
sideshowbarker
2024-07-18 10:23:43 +09:00
5 changed files with 6 additions and 6 deletions
|
@ -26,7 +26,7 @@ WebAssemblyInstanceConstructor::~WebAssemblyInstanceConstructor()
|
|||
|
||||
JS::Value WebAssemblyInstanceConstructor::call()
|
||||
{
|
||||
vm().throw_exception<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "WebAssemblyInstance");
|
||||
vm().throw_exception<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "WebAssembly.Instance");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ JS_DEFINE_NATIVE_GETTER(WebAssemblyInstancePrototype::exports_getter)
|
|||
if (vm.exception())
|
||||
return {};
|
||||
if (!is<WebAssemblyInstanceObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAn, "WebAssemblyInstance");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WebAssembly.Instance");
|
||||
return {};
|
||||
}
|
||||
auto object = static_cast<WebAssemblyInstanceObject*>(this_object);
|
||||
|
|
|
@ -24,7 +24,7 @@ WebAssemblyMemoryConstructor::~WebAssemblyMemoryConstructor()
|
|||
|
||||
JS::Value WebAssemblyMemoryConstructor::call()
|
||||
{
|
||||
vm().throw_exception<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "WebAssemblyMemory");
|
||||
vm().throw_exception<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "WebAssembly.Memory");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow)
|
|||
return {};
|
||||
auto* this_object = vm.this_value(global_object).to_object(global_object);
|
||||
if (!this_object || !is<WebAssemblyMemoryObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Memory");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WebAssembly.Memory");
|
||||
return {};
|
||||
}
|
||||
auto* memory_object = static_cast<WebAssemblyMemoryObject*>(this_object);
|
||||
|
@ -46,7 +46,7 @@ JS_DEFINE_NATIVE_GETTER(WebAssemblyMemoryPrototype::buffer_getter)
|
|||
{
|
||||
auto* this_object = vm.this_value(global_object).to_object(global_object);
|
||||
if (!this_object || !is<WebAssemblyMemoryObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Memory");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WebAssembly.Memory");
|
||||
return {};
|
||||
}
|
||||
auto* memory_object = static_cast<WebAssemblyMemoryObject*>(this_object);
|
||||
|
|
|
@ -26,7 +26,7 @@ WebAssemblyModuleConstructor::~WebAssemblyModuleConstructor()
|
|||
|
||||
JS::Value WebAssemblyModuleConstructor::call()
|
||||
{
|
||||
vm().throw_exception<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "WebAssemblyModule");
|
||||
vm().throw_exception<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "WebAssembly.Module");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue