Changeset 187303 in webkit
- Timestamp:
- Jul 23, 2015, 11:56:46 PM (11 years ago)
- Location:
- branches/safari-601.1-branch/Source
- Files:
-
- 7 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/RefCounter.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/WebProcessPool.cpp (modified) (3 diffs)
-
WebKit2/UIProcess/WebProcessPool.h (modified) (1 diff)
-
WebKit2/UIProcess/WebProcessProxy.cpp (modified) (2 diffs)
-
WebKit2/UIProcess/WebProcessProxy.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601.1-branch/Source/WTF/ChangeLog
r187087 r187303 1 2015-07-23 Lucas Forschler <lforschler@apple.com> 2 3 Merge r187129 4 5 2015-07-21 Daniel Bates <dabates@apple.com> 6 7 WTFCrash() in WebKit::WebProcess::networkConnection() 8 https://bugs.webkit.org/show_bug.cgi?id=147112 9 <rdar://problem/18477459> 10 11 Reviewed by Gavin Barraclough. 12 13 Add explicit boolean conversion function and remove overload of operator! to support 14 checking whether an activity token is valid more directly than using the overloaded operator!. 15 16 * wtf/RefCounter.h: 17 (WTF::RefCounter::Token::operator bool): Added. 18 (WTF::RefCounter::Token::operator!): Deleted. 19 1 20 2015-07-20 Matthew Hanson <matthew_hanson@apple.com> 2 21 -
branches/safari-601.1-branch/Source/WTF/wtf/RefCounter.h
r185273 r187303 68 68 inline Token<T>& operator=(Token<T>&&); 69 69 70 bool operator!() const { return !m_ptr; }70 explicit operator bool() const { return m_ptr; } 71 71 72 72 private: -
branches/safari-601.1-branch/Source/WebKit2/ChangeLog
r187302 r187303 1 2015-07-23 Lucas Forschler <lforschler@apple.com> 2 3 Merge r187129 4 5 2015-07-21 Daniel Bates <dabates@apple.com> 6 7 WTFCrash() in WebKit::WebProcess::networkConnection() 8 https://bugs.webkit.org/show_bug.cgi?id=147112 9 <rdar://problem/18477459> 10 11 Reviewed by Gavin Barraclough. 12 13 Fixes an issue where a newly launched network process may be jetsam'd because it has not 14 taken a process assertion between the time it was launched and the time when a web process 15 makes use of it. 16 17 Initially a network process does not have a process assertion. A process assertion is taken 18 (if one has not been taken) for the network process when a process assertion is taken for at 19 least one web process. When the network process crashes a WebProcess may ultimately launch a 20 new network process in WebProcess::networkConnection(). The new network process may be jetsam'd 21 immediately when the system is under some measure pressure because it has a low jetsam priority, 22 0 (since it does not have a process assertion and higher priority implies that a process is less 23 likely to be jetsam'd). And the logic in WebProcess::networkConnection() explicitly calls 24 CRASH() if the newly launched network process crashes immediately. Towards preventing the newly 25 launched network process from being jetsam'd we should obtain a process assertion for it. 26 27 * UIProcess/WebProcessPool.cpp: 28 (WebKit::WebProcessPool::WebProcessPool): Initialize m_didNetworkProcessCrash to false. 29 (WebKit::WebProcessPool::ensureNetworkProcess): If the network process crashed (m_didNetworkProcessCrash == true) 30 then tell each process in the pool to reinstate their network activity token for the new network process. 31 (WebKit::WebProcessPool::networkProcessCrashed): Set m_didNetworkProcessCrash to true when the 32 network process crashed. 33 * UIProcess/WebProcessPool.h: 34 * UIProcess/WebProcessProxy.cpp: 35 (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Added. 36 (WebKit::WebProcessProxy::didSetAssertionState): Add assert to ensure we never have both 37 a background- and foreground- activity token for the network process. 38 * UIProcess/WebProcessProxy.h: 39 1 40 2015-07-23 Lucas Forschler <lforschler@apple.com> 2 41 -
branches/safari-601.1-branch/Source/WebKit2/UIProcess/WebProcessPool.cpp
r186059 r187303 161 161 #if ENABLE(NETWORK_PROCESS) 162 162 , m_canHandleHTTPSServerTrustEvaluation(true) 163 , m_didNetworkProcessCrash(false) 163 164 #endif 164 165 #if USE(SOUP) … … 420 421 #endif 421 422 423 if (m_didNetworkProcessCrash) { 424 m_didNetworkProcessCrash = false; 425 for (auto& process : m_processes) 426 process->reinstateNetworkProcessAssertionState(*m_networkProcess); 427 } 428 422 429 return *m_networkProcess; 423 430 } … … 427 434 ASSERT(m_networkProcess); 428 435 ASSERT(networkProcessProxy == m_networkProcess.get()); 436 m_didNetworkProcessCrash = true; 429 437 430 438 WebContextSupplementMap::const_iterator it = m_supplements.begin(); -
branches/safari-601.1-branch/Source/WebKit2/UIProcess/WebProcessPool.h
r185736 r187303 499 499 #if ENABLE(NETWORK_PROCESS) 500 500 bool m_canHandleHTTPSServerTrustEvaluation; 501 bool m_didNetworkProcessCrash; 501 502 RefPtr<NetworkProcessProxy> m_networkProcess; 502 503 #endif -
branches/safari-601.1-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r187078 r187303 926 926 } 927 927 928 #if ENABLE(NETWORK_PROCESS) 929 void WebProcessProxy::reinstateNetworkProcessAssertionState(NetworkProcessProxy& newNetworkProcessProxy) 930 { 931 ASSERT(!m_backgroundTokenForNetworkProcess || !m_foregroundTokenForNetworkProcess); 932 933 // The network process crashed; take new tokens for the new network process. 934 if (m_backgroundTokenForNetworkProcess) 935 m_backgroundTokenForNetworkProcess = newNetworkProcessProxy.throttler().backgroundActivityToken(); 936 else if (m_foregroundTokenForNetworkProcess) 937 m_foregroundTokenForNetworkProcess = newNetworkProcessProxy.throttler().foregroundActivityToken(); 938 } 939 #endif 940 928 941 void WebProcessProxy::didSetAssertionState(AssertionState state) 929 942 { 930 943 #if PLATFORM(IOS) && ENABLE(NETWORK_PROCESS) 944 ASSERT(!m_backgroundTokenForNetworkProcess || !m_foregroundTokenForNetworkProcess); 945 931 946 switch (state) { 932 947 case AssertionState::Suspended: … … 951 966 break; 952 967 } 968 969 ASSERT(!m_backgroundTokenForNetworkProcess || !m_foregroundTokenForNetworkProcess); 953 970 #else 954 971 UNUSED_PARAM(state); -
branches/safari-601.1-branch/Source/WebKit2/UIProcess/WebProcessProxy.h
r184774 r187303 60 60 61 61 class DownloadProxyMap; 62 class NetworkProcessProxy; 62 63 class WebBackForwardListItem; 63 64 class WebPageGroup; … … 151 152 ProcessThrottler& throttler() { return m_throttler; } 152 153 154 #if ENABLE(NETWORK_PROCESS) 155 void reinstateNetworkProcessAssertionState(NetworkProcessProxy&); 156 #endif 157 153 158 private: 154 159 explicit WebProcessProxy(WebProcessPool&);
Note:
See TracChangeset
for help on using the changeset viewer.