Changeset 167525 in webkit
- Timestamp:
- Apr 18, 2014 6:38:31 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r167523 r167525 1 2014-04-18 Anders Carlsson <andersca@apple.com> 2 3 Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects 4 https://bugs.webkit.org/show_bug.cgi?id=131872 5 <rdar://problem/15758414> 6 7 Reviewed by Dan Bernstein. 8 9 * UIProcess/PageLoadState.cpp: 10 (WebKit::PageLoadState::PageLoadState): 11 (WebKit::PageLoadState::Transaction::Transaction): 12 (WebKit::PageLoadState::Transaction::~Transaction): 13 * UIProcess/PageLoadState.h: 14 (WebKit::PageLoadState::Transaction::Transaction): Deleted. 15 (WebKit::PageLoadState::Transaction::~Transaction): Deleted. 16 * UIProcess/WebPageProxy.cpp: 17 (WebKit::WebPageProxy::WebPageProxy): 18 1 19 2014-04-18 Stephanie Lewis <slewis@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/PageLoadState.cpp
r160718 r167525 27 27 #include "PageLoadState.h" 28 28 29 #include "WebPageProxy.h" 30 29 31 namespace WebKit { 30 32 … … 32 34 static const double initialProgressValue = 0.1; 33 35 34 PageLoadState::PageLoadState() 35 : m_mayHaveUncommittedChanges(false) 36 PageLoadState::PageLoadState(WebPageProxy& webPageProxy) 37 : m_webPageProxy(webPageProxy) 38 , m_mayHaveUncommittedChanges(false) 36 39 , m_outstandingTransactionCount(0) 37 40 { … … 41 44 { 42 45 ASSERT(m_observers.isEmpty()); 46 } 47 48 PageLoadState::Transaction::Transaction(PageLoadState& pageLoadState) 49 : m_webPageProxy(&pageLoadState.m_webPageProxy) 50 , m_pageLoadState(&pageLoadState) 51 { 52 m_pageLoadState->beginTransaction(); 53 } 54 55 PageLoadState::Transaction::Transaction(Transaction&& other) 56 : m_webPageProxy(std::move(other.m_webPageProxy)) 57 , m_pageLoadState(other.m_pageLoadState) 58 { 59 other.m_pageLoadState = nullptr; 60 } 61 62 PageLoadState::Transaction::~Transaction() 63 { 64 if (m_pageLoadState) 65 m_pageLoadState->endTransaction(); 43 66 } 44 67 -
trunk/Source/WebKit2/UIProcess/PageLoadState.h
r160662 r167525 31 31 namespace WebKit { 32 32 33 class WebPageProxy; 34 33 35 class PageLoadState { 34 36 public: 35 PageLoadState();37 explicit PageLoadState(WebPageProxy&); 36 38 ~PageLoadState(); 37 39 … … 65 67 WTF_MAKE_NONCOPYABLE(Transaction); 66 68 public: 67 Transaction(Transaction&& other) 68 : m_pageLoadState(other.m_pageLoadState) 69 { 70 other.m_pageLoadState = nullptr; 71 } 72 73 ~Transaction() 74 { 75 if (m_pageLoadState) 76 m_pageLoadState->endTransaction(); 77 } 69 Transaction(Transaction&&); 70 ~Transaction(); 78 71 79 72 private: 80 73 friend class PageLoadState; 81 74 82 explicit Transaction(PageLoadState& pageLoadState) 83 : m_pageLoadState(&pageLoadState) 84 { 85 m_pageLoadState->beginTransaction(); 86 } 75 explicit Transaction(PageLoadState&); 87 76 88 77 class Token { … … 101 90 }; 102 91 92 RefPtr<WebPageProxy> m_webPageProxy; 103 93 PageLoadState* m_pageLoadState; 104 94 }; … … 186 176 static double estimatedProgress(const Data&); 187 177 178 WebPageProxy& m_webPageProxy; 179 188 180 Data m_committedState; 189 181 Data m_uncommittedState; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r167519 r167525 327 327 , m_currentDragNumberOfFilesToBeAccepted(0) 328 328 #endif 329 , m_pageLoadState(*this) 329 330 , m_delegatesScrolling(false) 330 331 , m_mainFrameHasHorizontalScrollbar(false)
Note: See TracChangeset
for help on using the changeset viewer.