mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
errdefer in the right scope
This commit is contained in:
@@ -309,10 +309,8 @@ pub fn Env(comptime S: type, comptime types: anytype) type {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const context = v8.Context.init(isolate, global_template, null);
|
const context = v8.Context.init(isolate, global_template, null);
|
||||||
if (kind == .main) {
|
if (kind == .main) context.enter();
|
||||||
context.enter();
|
errdefer if (kind == .main) context.exit();
|
||||||
errdefer context.exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// This shouldn't be necessary, but it is:
|
// This shouldn't be necessary, but it is:
|
||||||
// https://groups.google.com/g/v8-users/c/qAQQBmbi--8
|
// https://groups.google.com/g/v8-users/c/qAQQBmbi--8
|
||||||
|
|||||||
Reference in New Issue
Block a user