diff options
-rw-r--r-- | src/core/web_contents_adapter.cpp | 2 | ||||
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 5 | ||||
-rw-r--r-- | src/core/web_contents_delegate_qt.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 8c13035e8..e35319fdd 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -330,6 +330,8 @@ WebContentsAdapterPrivate::WebContentsAdapterPrivate() WebContentsAdapterPrivate::~WebContentsAdapterPrivate() { + // Destroy the WebContents first + webContents.reset(); } QExplicitlySharedDataPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient) diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index f9db91b3e..c16c76f75 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -143,6 +143,11 @@ void WebContentsDelegateQt::HandleKeyboardEvent(content::WebContents *, const co m_viewClient->unhandledKeyEvent(reinterpret_cast<QKeyEvent *>(event.os_event)); } +void WebContentsDelegateQt::RenderFrameDeleted(content::RenderFrameHost *render_frame_host) +{ + m_loadingErrorFrameList.removeOne(render_frame_host->GetRoutingID()); +} + void WebContentsDelegateQt::DidStartProvisionalLoadForFrame(content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc) { if (is_error_page) { diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h index 254177d24..41acf7c84 100644 --- a/src/core/web_contents_delegate_qt.h +++ b/src/core/web_contents_delegate_qt.h @@ -91,6 +91,7 @@ public: virtual void MoveValidationMessage(content::WebContents *web_contents, const gfx::Rect &anchor_in_root_view) Q_DECL_OVERRIDE; // WebContentsObserver overrides + virtual void RenderFrameDeleted(content::RenderFrameHost *render_frame_host) Q_DECL_OVERRIDE; virtual void DidStartProvisionalLoadForFrame(content::RenderFrameHost *render_frame_host, const GURL &validated_url, bool is_error_page, bool is_iframe_srcdoc) Q_DECL_OVERRIDE; virtual void DidCommitProvisionalLoadForFrame(content::RenderFrameHost *render_frame_host, const GURL &url, ui::PageTransition transition_type) Q_DECL_OVERRIDE; virtual void DidFailProvisionalLoad(content::RenderFrameHost *render_frame_host, const GURL &validated_url, int error_code, const base::string16 &error_description) Q_DECL_OVERRIDE; |