Skip to content

Commit 5ef5cc6

Browse files
committed
Run dispatchProtocolMessage in an explicit HandleScope
1 parent 4810a56 commit 5ef5cc6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/runtime/js.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,9 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
14971497
}
14981498

14991499
pub fn send(self: *const Inspector, msg: []const u8) void {
1500+
var temp_scope: v8.HandleScope = undefined;
1501+
v8.HandleScope.init(&temp_scope, self.isolate);
1502+
defer temp_scope.deinit();
15001503
self.session.dispatchProtocolMessage(self.isolate, msg);
15011504
}
15021505

0 commit comments

Comments
 (0)