Changeset 51980 in webkit
- Timestamp:
- Dec 11, 2009 4:20:43 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51979 r51980 1 2009-12-11 Grace Kloba <klobag@gmail.com> 2 3 Reviewed by Darin Adler. 4 5 [Android] Add detachHistoryItem() to AndroidWebHistoryBridge. And the constructor takes 6 HistoryItem* now. As AndroidWebHistoryBridge holds a dumb pointer of HistoryItem and 7 HistoryItem holds a RefPtr of AndroidWebHistoryBridge, the dumb pointer needs to be cleared 8 when HistoryItem is deleted to avoid potential crash. 9 https://bugs.webkit.org/show_bug.cgi?id=32251 10 11 * history/HistoryItem.cpp: 12 (WebCore::HistoryItem::~HistoryItem): 13 * history/android/AndroidWebHistoryBridge.h: 14 (WebCore::AndroidWebHistoryBridge::AndroidWebHistoryBridge): 15 (WebCore::AndroidWebHistoryBridge::detachHistoryItem): 16 17 1 18 2009-12-11 Fumitoshi Ukai <ukai@chromium.org> 2 19 -
trunk/WebCore/history/HistoryItem.cpp
r51796 r51980 103 103 ASSERT(!m_document); 104 104 iconDatabase()->releaseIconForPageURL(m_urlString); 105 #if PLATFORM(ANDROID) 106 if (m_bridge) 107 m_bridge->detachHistoryItem(); 108 #endif 105 109 } 106 110 -
trunk/WebCore/history/android/AndroidWebHistoryBridge.h
r51628 r51980 35 35 class AndroidWebHistoryBridge : public RefCounted<AndroidWebHistoryBridge> { 36 36 public: 37 AndroidWebHistoryBridge( )37 AndroidWebHistoryBridge(HistoryItem* item) 38 38 : m_scale(100) 39 39 , m_screenWidthScale(100) 40 40 , m_active(false) 41 , m_historyItem( 0) { }41 , m_historyItem(item) { } 42 42 virtual ~AndroidWebHistoryBridge() { } 43 43 virtual void updateHistoryItem(HistoryItem* item) = 0; … … 47 47 int scale() const { return m_scale; } 48 48 int screenWidthScale() const { return m_screenWidthScale; } 49 void detachHistoryItem() { m_historyItem = 0; } 49 50 HistoryItem* historyItem() const { return m_historyItem; } 50 51 void setActive() { m_active = true; }
Note: See TracChangeset
for help on using the changeset viewer.