1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

LibJS: Make PrimitiveString::create() infallible

Work towards #20449.
This commit is contained in:
Andreas Kling 2023-08-08 18:25:57 +02:00
parent b7b02693b9
commit 1a27c525d5
69 changed files with 185 additions and 198 deletions

View file

@ -33,7 +33,7 @@ ThrowCompletionOr<Value> Console::assert_()
return js_undefined();
// 2. Let message be a string without any formatting specifiers indicating generically an assertion failure (such as "Assertion failed").
auto message = MUST_OR_THROW_OOM(PrimitiveString::create(vm, "Assertion failed"sv));
auto message = PrimitiveString::create(vm, "Assertion failed"_string);
// NOTE: Assemble `data` from the function arguments.
MarkedVector<Value> data { vm.heap() };