summaryrefslogtreecommitdiffstats
path: root/src/core/profile_io_data_qt.h
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-10-07 10:59:45 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-10-10 14:22:52 +0200
commit7d08de5b527cb2112556a126b889dd7d0d888d22 (patch)
tree92c03667f705d86bf8643ce704b6d366e9d76da5 /src/core/profile_io_data_qt.h
parentb44ed0fb99cd3d7047fcd322010c27cfa7989a18 (diff)
Fix life cycle issue of QWebEngineUrlRequestInterceptor
Since 5e92adf intercept() is called on ui thread, however this patch does not consider deletion of interceptor while io thread still process the request and for examples checks interceptor's deprecated property. Fix it. Note this only fixes issue for interceptors which are not deprecated therefore run on ui thread. Change-Id: I5d5909065563e57a0cacb81fd04271b3f88596de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/profile_io_data_qt.h')
-rw-r--r--src/core/profile_io_data_qt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/profile_io_data_qt.h b/src/core/profile_io_data_qt.h
index 570365085..a1b123771 100644
--- a/src/core/profile_io_data_qt.h
+++ b/src/core/profile_io_data_qt.h
@@ -120,7 +120,8 @@ public:
void setGlobalCertificateVerification();
// Used in NetworkDelegateQt::OnBeforeURLRequest.
- QWebEngineUrlRequestInterceptor *acquireInterceptor();
+ bool isInterceptorDeprecated() const; // Remove for Qt6
+ QWebEngineUrlRequestInterceptor *acquireInterceptor(); // Remove for Qt6
void releaseInterceptor();
QWebEngineUrlRequestInterceptor *requestInterceptor();
@@ -191,6 +192,7 @@ private:
base::WeakPtrFactory<ProfileIODataQt> m_weakPtrFactory; // this should be always the last member
QString m_dataPath;
bool m_pendingStorageRequestGeneration = false;
+ volatile bool m_isInterceptorDeprecated = false; // Remove for Qt6
DISALLOW_COPY_AND_ASSIGN(ProfileIODataQt);
friend class BrowsingDataRemoverObserverQt;