Changeset 155120 in webkit
- Timestamp:
- Sep 5, 2013 8:17:33 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r155119 r155120 1 2013-09-05 Andreas Kling <akling@apple.com> 2 3 Reverting "Cached Page and Frame don't need to be ref-counted. 4 <https://webkit.org/b/120758> 5 6 This didn't work so well on Qt bots. Will have to take bigger steps 7 here instead of iterating. 8 9 * history/CachedFrame.h: 10 (WebCore::CachedFrame::create): 11 * history/CachedPage.cpp: 12 (WebCore::CachedPage::create): 13 * history/CachedPage.h: 14 * history/HistoryItem.h: 15 * loader/FrameLoader.cpp: 16 (WebCore::FrameLoader::commitProvisionalLoad): 17 (WebCore::FrameLoader::transitionToCommitted): 18 * loader/FrameLoader.h: 19 1 20 2013-09-04 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/Source/WebCore/history/CachedFrame.h
r155091 r155120 31 31 #include "ScriptCachedFrameData.h" 32 32 #include <wtf/PassOwnPtr.h> 33 #include <wtf/RefCounted.h> 33 34 #include <wtf/RefPtr.h> 34 35 … … 67 68 #endif 68 69 69 Vector< OwnPtr<CachedFrame>> m_childFrames;70 Vector<RefPtr<CachedFrame>> m_childFrames; 70 71 }; 71 72 72 class CachedFrame : p rivate CachedFrameBase {73 class CachedFrame : public RefCounted<CachedFrame>, private CachedFrameBase { 73 74 public: 74 static Pass OwnPtr<CachedFrame> create(Frame& frame) { return adoptPtr(new CachedFrame(frame)); }75 static PassRefPtr<CachedFrame> create(Frame& frame) { return adoptRef(new CachedFrame(frame)); } 75 76 76 77 void open(); -
trunk/Source/WebCore/history/CachedPage.cpp
r155094 r155120 46 46 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, cachedPageCounter, ("CachedPage")); 47 47 48 Pass OwnPtr<CachedPage> CachedPage::create(Page& page)48 PassRefPtr<CachedPage> CachedPage::create(Page& page) 49 49 { 50 return adopt Ptr(new CachedPage(page));50 return adoptRef(new CachedPage(page)); 51 51 } 52 52 -
trunk/Source/WebCore/history/CachedPage.h
r155094 r155120 28 28 29 29 #include "CachedFrame.h" 30 #include <wtf/RefCounted.h> 30 31 31 32 namespace WebCore { … … 35 36 class Page; 36 37 37 class CachedPage {38 class CachedPage : public RefCounted<CachedPage> { 38 39 public: 39 static Pass OwnPtr<CachedPage> create(Page&);40 static PassRefPtr<CachedPage> create(Page&); 40 41 ~CachedPage(); 41 42 … … 67 68 double m_timeStamp; 68 69 double m_expirationTime; 69 OwnPtr<CachedFrame> m_cachedMainFrame;70 RefPtr<CachedFrame> m_cachedMainFrame; 70 71 bool m_needStyleRecalcForVisitedLinks; 71 72 bool m_needsFullStyleRecalc; -
trunk/Source/WebCore/history/HistoryItem.h
r155086 r155120 287 287 HistoryItem* m_next; 288 288 HistoryItem* m_prev; 289 OwnPtr<CachedPage> m_cachedPage;289 RefPtr<CachedPage> m_cachedPage; 290 290 291 291 #if PLATFORM(MAC) -
trunk/Source/WebCore/loader/FrameLoader.cpp
r155094 r155120 1700 1700 void FrameLoader::commitProvisionalLoad() 1701 1701 { 1702 CachedPage*cachedPage = m_loadingFromCachedPage ? pageCache()->get(history().provisionalItem()) : 0;1702 RefPtr<CachedPage> cachedPage = m_loadingFromCachedPage ? pageCache()->get(history().provisionalItem()) : 0; 1703 1703 RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader; 1704 1704 Ref<Frame> protect(m_frame); … … 1744 1744 pageCache()->remove(history().currentItem()); 1745 1745 1746 // Clear out 'cachedPage' right away since it now points to a deleted object.1747 cachedPage = nullptr;1748 1749 1746 dispatchDidCommitLoad(); 1750 1747 … … 1756 1753 checkCompleted(); 1757 1754 } else { 1758 if (cachedPage) {1755 if (cachedPage) 1759 1756 pageCache()->remove(history().currentItem()); 1760 1761 // Clear out 'cachedPage' right away since it now points to a deleted object.1762 cachedPage = nullptr;1763 }1764 1757 didOpenURL(); 1765 1758 } … … 1797 1790 } 1798 1791 1799 void FrameLoader::transitionToCommitted( CachedPage*cachedPage)1792 void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage) 1800 1793 { 1801 1794 ASSERT(m_client.hasWebView()); -
trunk/Source/WebCore/loader/FrameLoader.h
r155086 r155120 309 309 310 310 void clearProvisionalLoad(); 311 void transitionToCommitted( CachedPage*);311 void transitionToCommitted(PassRefPtr<CachedPage>); 312 312 void frameLoadCompleted(); 313 313
Note: See TracChangeset
for help on using the changeset viewer.