Web+: Use reference for urlcontext in app and window

It needs to be deleted after everything is done.
This seems to fix the crashes I could reproduce on exit in my VM.
So might fix #17583.
(WebView also has fContext, but I assume they are part of a window)

Change-Id: I0125f76b0b2331ac3b6a81d6c20087ebdedbf2f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5486
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Fredrik Holmqvist
2022-07-19 12:22:38 +00:00
parent 7e677cae2c
commit f28e05bce5
3 changed files with 2 additions and 3 deletions
-1
View File
@@ -125,7 +125,6 @@ BrowserApp::~BrowserApp()
delete fSettings;
delete fCookies;
delete fSession;
delete fContext;
}
+1 -1
View File
@@ -80,7 +80,7 @@ private:
SettingsMessage* fSettings;
SettingsMessage* fCookies;
SettingsMessage* fSession;
BPrivate::Network::BUrlContext* fContext;
BReference<BPrivate::Network::BUrlContext> fContext;
DownloadWindow* fDownloadWindow;
SettingsWindow* fSettingsWindow;
+1 -1
View File
@@ -266,7 +266,7 @@ private:
bigtime_t fLastMouseMovedTime;
BPoint fLastMousePos;
BPrivate::Network::BUrlContext* fContext;
BReference<BPrivate::Network::BUrlContext> fContext;
// cached settings
SettingsMessage* fAppSettings;