mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-05 14:57:11 +00:00
Merge pull request #1467 from lightpanda-io/inspector_context_destroyed
Call Inpsector::ContextDestroyed
This commit is contained in:
@@ -264,8 +264,17 @@ pub fn destroyContext(self: *Env, context: *Context) void {
|
|||||||
@panic("Tried to remove unknown context");
|
@panic("Tried to remove unknown context");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isolate = self.isolate;
|
||||||
|
if (self.inspector) |inspector| {
|
||||||
|
var hs: js.HandleScope = undefined;
|
||||||
|
hs.init(isolate);
|
||||||
|
defer hs.deinit();
|
||||||
|
inspector.contextDestroyed(@ptrCast(v8.v8__Global__Get(&context.handle, isolate.handle)));
|
||||||
|
}
|
||||||
|
|
||||||
context.deinit();
|
context.deinit();
|
||||||
self.isolate.notifyContextDisposed();
|
isolate.notifyContextDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn runMicrotasks(self: *const Env) void {
|
pub fn runMicrotasks(self: *const Env) void {
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ pub fn contextCreated(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn contextDestroyed(self: *Inspector, local: *const js.Local) void {
|
pub fn contextDestroyed(self: *Inspector, context: *const v8.Context) void {
|
||||||
v8.v8_inspector__Inspector__ContextDestroyed(self.handle, local.handle);
|
v8.v8_inspector__Inspector__ContextDestroyed(self.handle, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn resetContextGroup(self: *const Inspector) void {
|
pub fn resetContextGroup(self: *const Inspector) void {
|
||||||
|
|||||||
Reference in New Issue
Block a user