summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/web_contents_adapter.cpp2
-rw-r--r--src/core/web_contents_delegate_qt.cpp7
-rw-r--r--src/core/web_contents_delegate_qt.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 5850b07b5..dc36b98c4 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -363,8 +363,6 @@ WebContentsAdapterPrivate::WebContentsAdapterPrivate()
WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
{
- // Destroy the WebContents first
- webContents.reset();
}
QSharedPointer<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 f51a6dff3..db05fae4b 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -109,6 +109,13 @@ WebContentsDelegateQt::WebContentsDelegateQt(content::WebContents *webContents,
Observe(webContents);
}
+WebContentsDelegateQt::~WebContentsDelegateQt()
+{
+ // The destruction of this object should take place before
+ // WebContents destruction since WebContentsAdapterClient
+ // might be already deleted.
+}
+
content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents *source, const content::OpenURLParams &params)
{
content::WebContents *target = source;
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 8440ec053..2ebdb2ffc 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -92,7 +92,7 @@ class WebContentsDelegateQt : public content::WebContentsDelegate
{
public:
WebContentsDelegateQt(content::WebContents*, WebContentsAdapterClient *adapterClient);
- ~WebContentsDelegateQt() { Q_ASSERT(m_loadingErrorFrameList.isEmpty()); }
+ ~WebContentsDelegateQt();
QString lastSearchedString() const { return m_lastSearchedString; }
void setLastSearchedString(const QString &s) { m_lastSearchedString = s; }
int lastReceivedFindReply() const { return m_lastReceivedFindReply; }