summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Completion.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Completion.cpp b/Userland/Libraries/LibJS/Runtime/Completion.cpp
index 0376b5a481..d1187dec34 100644
--- a/Userland/Libraries/LibJS/Runtime/Completion.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Completion.cpp
@@ -115,6 +115,10 @@ ThrowCompletionOr<Value> await(GlobalObject& global_object, Value value)
if (success.value())
return result;
+ // NOTE: This is temporary until we remove VM::exception(). It's required as callers of
+ // AwaitExpression still need to check for an exception rather than a completion
+ // type as long as ASTNode::execute() returns a plain Value.
+ vm.throw_exception(global_object, result);
return throw_completion(result);
}