summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-12-02 12:37:26 -0800
committerGrace Kloba <klobag@google.com>2009-12-03 09:56:04 -0800
commitfdd2ae400181744b916fcc8319e68f1cec57c981 (patch)
treee3004d08380cb816f8aed21b6390a75d6f24829f /WebCore
parentf587615e225cc1d172fe35e0dc744c00e929168d (diff)
downloadexternal_webkit-fdd2ae400181744b916fcc8319e68f1cec57c981.zip
external_webkit-fdd2ae400181744b916fcc8319e68f1cec57c981.tar.gz
external_webkit-fdd2ae400181744b916fcc8319e68f1cec57c981.tar.bz2
After turning on page cache, the parent HistoryItem
can be destroyed before the child HistoryItem, add an extra checking to avoid crash.
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/history/HistoryItem.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/WebCore/history/HistoryItem.cpp b/WebCore/history/HistoryItem.cpp
index 2ca29e3..1e2bc93 100644
--- a/WebCore/history/HistoryItem.cpp
+++ b/WebCore/history/HistoryItem.cpp
@@ -97,6 +97,10 @@ HistoryItem::~HistoryItem()
{
ASSERT(!m_cachedPage);
iconDatabase()->releaseIconForPageURL(m_urlString);
+#ifdef ANDROID_HISTORY_CLIENT
+ if (m_bridge)
+ m_bridge->detach(this);
+#endif
}
inline HistoryItem::HistoryItem(const HistoryItem& item)