increment call_depth on callWithThis

This commit is contained in:
Muki Kiboigo
2026-01-05 09:27:17 -08:00
parent b911051842
commit 05da040ce1

View File

@@ -115,6 +115,8 @@ pub fn tryCallWithThis(self: *const Function, comptime T: type, this: anytype, a
pub fn callWithThis(self: *const Function, comptime T: type, this: anytype, args: anytype) !T {
const context = self.context;
context.call_depth += 1;
defer context.call_depth -= 1;
const js_this = try context.valueToExistingObject(this);