Commit 5e92adf5 authored by Michal Klocek's avatar Michal Klocek
Browse files

Move QWebEngineUrlRequestInterceptor::intercept to ui thread


Currently interceptor sufferers thread safety issues, when
custom profiles are deleted, interceptor is set to be nullptr,
however it can be still referenced in IO thread. Since
profile was split to ui and io part, where io part can outlive
the ui part, this can boost thread safety issues.
Since QWebEngineUrlRequestInterceptor is living on ui thread
simplify the logic move intercept call to ui thread.
This fixes the issue of referencing interceptor in io thread.

Add new method to install interceptor setUrlRequestInterceptor,
and deprecate old one. Update interceptor install method name
on page to match the profile one.

Task-number: QTBUG-69844
Change-Id: I5dd2b6b734fd91906cccc6c1408ffbe7b1b4250c
Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
Showing with 149 additions and 58 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment