Changeset 71044 in webkit
- Timestamp:
- Nov 1, 2010 12:16:45 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r71042 r71044 1 2010-11-01 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by John Sullivan. 4 5 Tear down the related WebProcessProxy when a WebContext is deallocated 6 https://bugs.webkit.org/show_bug.cgi?id=48769 7 8 * UIProcess/WebContext.cpp: 9 (WebKit::WebContext::~WebContext): 10 Call WebProcessManager::contextWasDestroyed. 11 12 (WebKit::WebContext::didNavigateWithNavigationData): 13 (WebKit::WebContext::didPerformClientRedirect): 14 (WebKit::WebContext::didPerformServerRedirect): 15 (WebKit::WebContext::didUpdateHistoryTitle): 16 It is valid for a frame to have a null page here, if the frame has outlived 17 its page. 18 19 * UIProcess/WebProcessManager.cpp: 20 (WebKit::WebProcessManager::contextWasDestroyed): 21 Remove the context from the map. 22 23 * UIProcess/WebProcessProxy.cpp: 24 (WebKit::WebProcessProxy::~WebProcessProxy): 25 It's OK for the connection to be non-null here if the process goes away because 26 the context has been deallocated. 27 1 28 2010-11-01 Brady Eidson <beidson@apple.com> 2 29 -
trunk/WebKit2/UIProcess/WebContext.cpp
r70997 r71044 106 106 m_preferences->removeContext(this); 107 107 removeLanguageChangeObserver(this); 108 109 WebProcessManager::shared().contextWasDestroyed(this); 108 110 109 111 #ifndef NDEBUG … … 287 289 void WebContext::didNavigateWithNavigationData(WebFrameProxy* frame, const WebNavigationDataStore& store) 288 290 { 289 ASSERT(frame->page()); 291 if (!frame->page()) 292 return; 293 290 294 m_historyClient.didNavigateWithNavigationData(this, frame->page(), store, frame); 291 295 } … … 293 297 void WebContext::didPerformClientRedirect(WebFrameProxy* frame, const String& sourceURLString, const String& destinationURLString) 294 298 { 295 ASSERT(frame->page()); 299 if (!frame->page()) 300 return; 301 296 302 m_historyClient.didPerformClientRedirect(this, frame->page(), sourceURLString, destinationURLString, frame); 297 303 } … … 299 305 void WebContext::didPerformServerRedirect(WebFrameProxy* frame, const String& sourceURLString, const String& destinationURLString) 300 306 { 301 ASSERT(frame->page()); 307 if (!frame->page()) 308 return; 309 302 310 m_historyClient.didPerformServerRedirect(this, frame->page(), sourceURLString, destinationURLString, frame); 303 311 } … … 305 313 void WebContext::didUpdateHistoryTitle(WebFrameProxy* frame, const String& title, const String& url) 306 314 { 307 ASSERT(frame->page()); 315 if (!frame->page()) 316 return; 317 308 318 m_historyClient.didUpdateHistoryTitle(this, frame->page(), title, url, frame); 309 319 } -
trunk/WebKit2/UIProcess/WebProcessManager.cpp
r61579 r71044 88 88 } 89 89 90 void WebProcessManager::contextWasDestroyed(WebContext* context) 91 { 92 m_processMap.remove(context); 93 } 94 90 95 } // namespace WebKit -
trunk/WebKit2/UIProcess/WebProcessManager.h
r61500 r71044 40 40 void processDidClose(WebProcessProxy*, WebContext*); 41 41 42 void contextWasDestroyed(WebContext*); 43 42 44 private: 43 45 WebProcessManager(); -
trunk/WebKit2/UIProcess/WebProcessProxy.cpp
r70915 r71044 64 64 WebProcessProxy::~WebProcessProxy() 65 65 { 66 ASSERT(!m_connection); 66 ASSERT(m_pageMap.isEmpty()); 67 68 if (m_connection) 69 m_connection->invalidate(); 67 70 68 71 for (size_t i = 0; i < m_pendingMessages.size(); ++i) -
trunk/WebKitTools/ChangeLog
r71030 r71044 1 2010-11-01 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by John Sullivan. 4 5 Tear down the related WebProcessProxy when a WebContext is deallocated 6 https://bugs.webkit.org/show_bug.cgi?id=48769 7 8 * TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp: 9 (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): 10 We don't support empty URLs anymore, update test to expect a null URL instead. 11 1 12 2010-11-01 Søren Gjesse <sgjesse@chromium.org> 2 13 -
trunk/WebKitTools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp
r70062 r71044 42 42 43 43 WKURLRef url = WKFrameCopyProvisionalURL(frame); 44 WKURLRef emptyURL = WKURLCreateWithUTF8CString(""); 45 TEST_ASSERT(WKURLIsEqual(url, emptyURL)); 46 WKRelease(url); 47 WKRelease(emptyURL); 44 TEST_ASSERT(!url); 48 45 49 46 testDone = true;
Note: See TracChangeset
for help on using the changeset viewer.