mirror of
https://github.com/Adamcake/Bolt.git
synced 2026-04-18 00:06:52 -04:00
app: delete window.close()
window.close() is completely broken in CEF, it destroys the browser and calls OnBeforeClose before calling CanClose, which generally leads to segmentation faults no matter how you handle it. So don't use it. Close via the Bolt API instead.
This commit is contained in:
@@ -43,7 +43,9 @@ void Browser::App::OnBrowserCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<Cef
|
||||
}
|
||||
|
||||
void Browser::App::OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) {
|
||||
context->GetGlobal()->SetValue("s", CefV8Value::CreateFunction("s", this), V8_PROPERTY_ATTRIBUTE_READONLY);
|
||||
const CefRefPtr<CefV8Value> global = context->GetGlobal();
|
||||
global->SetValue("s", CefV8Value::CreateFunction("s", this), V8_PROPERTY_ATTRIBUTE_READONLY);
|
||||
global->SetValue("close", CefV8Value::CreateUndefined(), V8_PROPERTY_ATTRIBUTE_READONLY);
|
||||
}
|
||||
|
||||
void Browser::App::OnUncaughtException(
|
||||
|
||||
Reference in New Issue
Block a user