Check BrowserWindow's lifetime
This commit is contained in:
parent
1569dfa2e8
commit
ae52af3870
2 changed files with 7 additions and 0 deletions
|
@ -177,6 +177,10 @@ mate::Wrappable* Window::New(v8::Isolate* isolate,
|
|||
return new Window(isolate, options);
|
||||
}
|
||||
|
||||
bool Window::IsDestroyed() const {
|
||||
return !window_ || window_->IsClosed();
|
||||
}
|
||||
|
||||
void Window::Destroy() {
|
||||
window_->CloseContents(nullptr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue