Changeset 202331 in webkit
- Timestamp:
- Jun 22, 2016 10:00:23 AM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r202329 r202331 1 2016-06-22 Chris Dumez <cdumez@apple.com> 2 3 Add logging related to process assertions to help debug process suspension issues 4 https://bugs.webkit.org/show_bug.cgi?id=159001 5 6 Reviewed by Antti Koivisto. 7 8 Add logging related to process assertions to help debug process suspension issues. 9 10 * UIProcess/Cocoa/NavigationState.mm: 11 (WebKit::NavigationState::didChangeIsLoading): 12 * UIProcess/Network/NetworkProcessProxy.cpp: 13 (WebKit::NetworkProcessProxy::fetchWebsiteData): 14 (WebKit::NetworkProcessProxy::deleteWebsiteData): 15 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins): 16 (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): 17 * UIProcess/WebPageProxy.cpp: 18 (WebKit::WebPageProxy::updateActivityToken): 19 * UIProcess/WebProcessProxy.cpp: 20 (WebKit::WebProcessProxy::setIsHoldingLockedFiles): 21 1 22 2016-06-21 Sam Weinig <sam@webkit.org> 2 23 -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
r200463 r202331 822 822 { 823 823 #if PLATFORM(IOS) 824 if (m_webView->_page->pageLoadState().isLoading()) 824 if (m_webView->_page->pageLoadState().isLoading()) { 825 LOG_ALWAYS(m_webView->_page->isAlwaysOnLoggingAllowed(), "UIProcess is taking a background assertion because a page load started"); 825 826 m_activityToken = m_webView->_page->process().throttler().backgroundActivityToken(); 826 else 827 } else { 828 LOG_ALWAYS(m_webView->_page->isAlwaysOnLoggingAllowed(), "UIProcess is releasing a background assertion because a page load completed"); 827 829 m_activityToken = nullptr; 830 } 828 831 #endif 829 832 -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
r202242 r202331 127 127 uint64_t callbackID = generateCallbackID(); 128 128 auto token = throttler().backgroundActivityToken(); 129 130 m_pendingFetchWebsiteDataCallbacks.add(callbackID, [token, completionHandler](WebsiteData websiteData) { 129 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "UIProcess is taking a background assertion because the Network process is fetching Website data"); 130 131 m_pendingFetchWebsiteDataCallbacks.add(callbackID, [token, completionHandler, sessionID](WebsiteData websiteData) { 131 132 completionHandler(WTFMove(websiteData)); 133 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "UIProcess is releasing a background assertion because the Network process is done fetching Website data"); 132 134 }); 133 135 … … 139 141 auto callbackID = generateCallbackID(); 140 142 auto token = throttler().backgroundActivityToken(); 141 142 m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [token, completionHandler] { 143 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "UIProcess is taking a background assertion because the Network process is deleting Website data"); 144 145 m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [token, completionHandler, sessionID] { 143 146 completionHandler(); 147 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "UIProcess is releasing a background assertion because the Network process is done deleting Website data"); 144 148 }); 145 149 send(Messages::NetworkProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0); … … 152 156 uint64_t callbackID = generateCallbackID(); 153 157 auto token = throttler().backgroundActivityToken(); 154 155 m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [token, completionHandler] { 158 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "UIProcess is taking a background assertion because the Network process is deleting Website data for several origins"); 159 160 m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [token, completionHandler, sessionID] { 156 161 completionHandler(); 162 LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "UIProcess is releasing a background assertion because the Network process is done deleting Website data for several origins"); 157 163 }); 158 164 … … 384 390 { 385 391 if (!isHoldingLockedFiles) { 392 LOG_ALWAYS(true, "UIProcess is releasing a background assertion because the Network process is no longer holding locked files"); 386 393 m_tokenForHoldingLockedFiles = nullptr; 387 394 return; 388 395 } 389 if (!m_tokenForHoldingLockedFiles) 396 if (!m_tokenForHoldingLockedFiles) { 397 LOG_ALWAYS(true, "UIProcess is taking a background assertion because the Network process is holding locked files"); 390 398 m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken(); 399 } 391 400 } 392 401 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r202316 r202331 181 181 #define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(m_process->checkURLReceivedFromWebProcess(url), m_process->connection()) 182 182 183 #define WEBPAGEPROXY_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__) 184 183 185 using namespace WebCore; 184 186 … … 1486 1488 } 1487 1489 1490 bool WebPageProxy::isAlwaysOnLoggingAllowed() const 1491 { 1492 return sessionID().isAlwaysOnLoggingAllowed(); 1493 } 1494 1488 1495 void WebPageProxy::updateActivityToken() 1489 1496 { … … 1494 1501 1495 1502 #if PLATFORM(IOS) 1496 if (!isViewVisible() && !m_alwaysRunsAtForegroundPriority) 1503 if (!isViewVisible() && !m_alwaysRunsAtForegroundPriority) { 1504 WEBPAGEPROXY_LOG_ALWAYS("UIProcess is releasing a foreground assertion because the view is no longer visible"); 1497 1505 m_activityToken = nullptr; 1498 else if (!m_activityToken) 1506 } else if (!m_activityToken) { 1507 if (isViewVisible()) 1508 WEBPAGEPROXY_LOG_ALWAYS("UIProcess is taking a foreground assertion because the view is visible"); 1509 else 1510 WEBPAGEPROXY_LOG_ALWAYS("UIProcess is taking a foreground assertion even though the view is not visible because m_alwaysRunsAtForegroundPriority is true"); 1499 1511 m_activityToken = m_process->throttler().foregroundActivityToken(); 1512 } 1500 1513 #endif 1501 1514 } -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r202185 r202331 1117 1117 bool hasHadSelectionChangesFromUserInteraction() const { return m_hasHadSelectionChangesFromUserInteraction; } 1118 1118 1119 bool isAlwaysOnLoggingAllowed() const; 1120 1119 1121 private: 1120 1122 WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&); -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r201575 r202331 988 988 { 989 989 if (!isHoldingLockedFiles) { 990 LOG_ALWAYS(true, "UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files"); 990 991 m_tokenForHoldingLockedFiles = nullptr; 991 992 return; 992 993 } 993 if (!m_tokenForHoldingLockedFiles) 994 if (!m_tokenForHoldingLockedFiles) { 995 LOG_ALWAYS(true, "UIProcess is taking a background assertion because the WebContent process is holding locked files"); 994 996 m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken(); 997 } 995 998 } 996 999
Note: See TracChangeset
for help on using the changeset viewer.