summaryrefslogtreecommitdiff
path: root/Tests/LibWeb
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-10-12 17:49:01 +0100
committerLinus Groh <mail@linusgroh.de>2021-10-13 09:55:10 +0100
commit4d8912a92b4378d34a06806b3126c8463bdbdcf5 (patch)
tree9d9ed3594c1512756d1c9337794a29a3d5965b5c /Tests/LibWeb
parent5d38cf497331ba9a533d2da64d91f7044b3ee87f (diff)
downloadserenity-4d8912a92b4378d34a06806b3126c8463bdbdcf5.zip
LibJS: Convert to_string() to ThrowCompletionOr
Also update get_function_name() to use ThrowCompletionOr, but this is not a standard AO and should be refactored out of existence eventually.
Diffstat (limited to 'Tests/LibWeb')
-rw-r--r--Tests/LibWeb/test-web.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Tests/LibWeb/test-web.cpp b/Tests/LibWeb/test-web.cpp
index 531f009421..893adab262 100644
--- a/Tests/LibWeb/test-web.cpp
+++ b/Tests/LibWeb/test-web.cpp
@@ -40,9 +40,7 @@ TESTJS_MAIN_HOOK()
TESTJS_GLOBAL_FUNCTION(load_local_page, loadLocalPage)
{
- auto name = vm.argument(0).to_string(global_object);
- if (vm.exception())
- return {};
+ auto name = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
// Clear the hooks
before_initial_load_hooks.clear();