From cfddf26f78e521809a17d4fab5bb7cfe18d3f08e Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 11 Jan 2018 11:24:48 +0100 Subject: Change BrowserContextAdapter to be QPointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BrowserContextAdapter is living and accessed only in UI thread, remove QSharedPointer usage and change QWebengineProfile to use QPointer. Prevent BrowserContextAdapter outliving WebEngineContext by setting globalObject as a parent to track WebEngineContext destruction. This commits tries to simplify the life cycle handling of browser context, it removes profile shutdown methods and QWebEngineBrowserContext, which was used to track profile destruction. Task-number: QTBUG-62147 Change-Id: I79f2c38a123cd053e3a59f4900afbdc759a396fe Reviewed-by: Qt CI Bot Reviewed-by: Jüri Valdmann Reviewed-by: Michael Brüning --- src/core/web_contents_delegate_qt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/web_contents_delegate_qt.cpp') diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 2de8fd64a..b98c822b0 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -287,7 +287,7 @@ void WebContentsDelegateQt::DidFinishNavigation(content::NavigationHandle *navig return; if (navigation_handle->HasCommitted() && !navigation_handle->IsErrorPage()) { - BrowserContextAdapter *browserContextAdapter = m_viewClient->browserContextAdapter().data(); + BrowserContextAdapter *browserContextAdapter = m_viewClient->browserContextAdapter(); // VisistedLinksMaster asserts !IsOffTheRecord(). if (navigation_handle->ShouldUpdateHistory() && browserContextAdapter->trackVisitedLinks()) { for (const GURL &url : navigation_handle->GetRedirectChain()) -- cgit v1.2.3