summaryrefslogtreecommitdiff
path: root/Libraries/LibJS
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-14 17:30:34 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-14 17:30:34 +0200
commitc5127389caeab57f1f90d722350f691b0365a5fc (patch)
treeb6aa17b7fc6f03d880da48f7f4c1365a0fed8a2d /Libraries/LibJS
parent19b329ee96f455e60df0fbb126ea1e692ef71190 (diff)
downloadserenity-c5127389caeab57f1f90d722350f691b0365a5fc.zip
LibJS: Assert that there's no exception on entry in Interpreter::call()
Diffstat (limited to 'Libraries/LibJS')
-rw-r--r--Libraries/LibJS/Interpreter.cpp2
1 files changed, 2 insertions, 0 deletions
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<Heap>, HashTable<Cell*>& roots)
Value Interpreter::call(Function& function, Value this_value, Optional<MarkedValueList> 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);