From d262e1f9241778a6d0483945a3e125636cedfb70 Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Thu, 3 Dec 2009 11:39:15 -0800 Subject: [PATCH] Rework CL, https://android-git.corp.google.com/g/#change,34511 due to the history unfork change. --- WebCore/history/HistoryItem.cpp | 4 +--- WebCore/history/android/AndroidWebHistoryBridge.h | 1 + WebKit/android/jni/WebHistory.cpp | 9 --------- WebKit/android/jni/WebHistory.h | 1 - 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/WebCore/history/HistoryItem.cpp b/WebCore/history/HistoryItem.cpp index 331dda14c..d7eec4d22 100644 --- a/WebCore/history/HistoryItem.cpp +++ b/WebCore/history/HistoryItem.cpp @@ -98,10 +98,8 @@ HistoryItem::~HistoryItem() ASSERT(!m_cachedPage); iconDatabase()->releaseIconForPageURL(m_urlString); #ifdef ANDROID_HISTORY_CLIENT -/* if (m_bridge) - m_bridge->detach(this); - */ + m_bridge->detachHistoryItem(); #endif } diff --git a/WebCore/history/android/AndroidWebHistoryBridge.h b/WebCore/history/android/AndroidWebHistoryBridge.h index 338f37cf7..b15cc86b2 100644 --- a/WebCore/history/android/AndroidWebHistoryBridge.h +++ b/WebCore/history/android/AndroidWebHistoryBridge.h @@ -46,6 +46,7 @@ public: void setScreenWidthScale(int s) { m_screenWidthScale = s; } int scale() const { return m_scale; } int screenWidthScale() const { return m_screenWidthScale; } + void detachHistoryItem() { m_historyItem = 0; } HistoryItem* historyItem() const { return m_historyItem; } void setActive() { m_active = true; } diff --git a/WebKit/android/jni/WebHistory.cpp b/WebKit/android/jni/WebHistory.cpp index 86eeffefe..3741e03bf 100644 --- a/WebKit/android/jni/WebHistory.cpp +++ b/WebKit/android/jni/WebHistory.cpp @@ -242,15 +242,6 @@ WebHistoryItem::~WebHistoryItem() { } } -void WebHistoryItem::detach(WebCore::HistoryItem* item) { -/* if (mHistoryItem == item) { - mHistoryItem = NULL; - } else if (mHistoryItem) { - LOGE("WebHistoryItem::detach doesn't have a matching HistoryItem"); - } - */ -} - void WebHistoryItem::updateHistoryItem(WebCore::HistoryItem* item) { // Do not want to update during inflation. if (!m_active) diff --git a/WebKit/android/jni/WebHistory.h b/WebKit/android/jni/WebHistory.h index b75646406..baba1fd97 100644 --- a/WebKit/android/jni/WebHistory.h +++ b/WebKit/android/jni/WebHistory.h @@ -55,7 +55,6 @@ public: , m_object(NULL) { } WebHistoryItem(JNIEnv*, jobject, WebCore::HistoryItem*); ~WebHistoryItem(); - void detach(WebCore::HistoryItem* item); void updateHistoryItem(WebCore::HistoryItem* item); void setParent(WebHistoryItem* parent) { m_parent = parent; } WebHistoryItem* parent() const { return m_parent.get(); } -- 2.11.0