From c5127389caeab57f1f90d722350f691b0365a5fc Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 14 Aug 2020 17:30:34 +0200 Subject: [PATCH] LibJS: Assert that there's no exception on entry in Interpreter::call() --- Libraries/LibJS/Interpreter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibJS/Interpreter.cpp b/Libraries/LibJS/Interpreter.cpp index 5c9836789b..a795b5126b 100644 --- a/Libraries/LibJS/Interpreter.cpp +++ b/Libraries/LibJS/Interpreter.cpp @@ -247,6 +247,8 @@ void Interpreter::gather_roots(Badge, HashTable& roots) Value Interpreter::call(Function& function, Value this_value, Optional arguments) { + ASSERT(!exception()); + auto& call_frame = push_call_frame(); call_frame.function_name = function.name(); call_frame.this_value = function.bound_this().value_or(this_value);