Changeset 179754 in webkit
- Timestamp:
- Feb 6, 2015 1:21:08 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r179752 r179754 1 2015-02-06 Alexey Proskuryakov <ap@apple.com> 2 3 Report network process crashes during layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=139646 5 6 Reviewed by Anders Carlsson. 7 8 Added a way to get network process pid, modeled after how we do this for web process. 9 10 * UIProcess/API/C/mac/WKContextPrivateMac.h: 11 * UIProcess/API/C/mac/WKContextPrivateMac.mm: 12 (WKContextGetNetworkProcessIdentifier): 13 * UIProcess/WebProcessPool.cpp: 14 (WebKit::WebProcessPool::networkProcessCrashed): Don't reset m_networkProcess until 15 after calling the client, so that the client could retrieve its pid. 16 (WebKit::WebProcessPool::networkProcessIdentifier): 17 * UIProcess/WebProcessPool.h: 18 1 19 2015-02-05 Timothy Hatcher <timothy@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h
r168541 r179754 71 71 WK_EXPORT bool WKContextShouldSuggestBlockWebGL(); 72 72 73 WK_EXPORT pid_t WKContextGetNetworkProcessIdentifier(WKContextRef context); 74 73 75 #ifdef __cplusplus 74 76 } -
trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm
r177699 r179754 147 147 return WKShouldSuggestBlockingWebGL(); 148 148 } 149 150 pid_t WKContextGetNetworkProcessIdentifier(WKContextRef contextRef) 151 { 152 #if ENABLE(NETWORK_PROCESS) 153 return toImpl(contextRef)->networkProcessIdentifier(); 154 #else 155 UNUSED_PARAM(contextRef); 156 return 0; 157 #endif 158 } -
trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp
r179599 r179754 449 449 it->value->processDidClose(networkProcessProxy); 450 450 451 m_client.networkProcessDidCrash(this); 452 453 // Leave the process proxy around during client call, so that the client could query the process identifier. 451 454 m_networkProcess = nullptr; 452 453 m_client.networkProcessDidCrash(this);454 455 } 455 456 … … 940 941 #endif // ENABLE(NETSCAPE_PLUGIN_API) 941 942 943 #if ENABLE(NETWORK_PROCESS) 944 PlatformProcessIdentifier WebProcessPool::networkProcessIdentifier() 945 { 946 if (!m_networkProcess) 947 return 0; 948 949 return m_networkProcess->processIdentifier(); 950 } 951 #endif 952 942 953 void WebProcessPool::setAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText) 943 954 { -
trunk/Source/WebKit2/UIProcess/WebProcessPool.h
r179373 r179754 188 188 #endif 189 189 190 #if ENABLE(NETWORK_PROCESS) 191 PlatformProcessIdentifier networkProcessIdentifier(); 192 #endif 193 190 194 void setAlwaysUsesComplexTextCodePath(bool); 191 195 void setShouldUseFontSmoothing(bool); -
trunk/Tools/ChangeLog
r179747 r179754 1 2015-02-06 Alexey Proskuryakov <ap@apple.com> 2 3 Report network process crashes during layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=139646 5 6 Reviewed by Anders Carlsson. 7 8 * WebKitTestRunner/TestController.cpp: 9 (WTR::TestController::initialize): 10 (WTR::TestController::networkProcessName): 11 (WTR::TestController::networkProcessDidCrash): 12 * WebKitTestRunner/TestController.h: 13 1 14 2015-02-06 Csaba Osztrogonác <ossy@webkit.org> 2 15 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r179588 r179754 57 57 58 58 #if PLATFORM(COCOA) 59 #include <WebKit/WKContextPrivateMac.h> 59 60 #include <WebKit/WKPagePrivateMac.h> 60 61 #endif … … 392 393 WKContextSetInjectedBundleClient(m_context.get(), &injectedBundleClient.base); 393 394 395 WKContextClientV1 contextClient = { 396 { 1, this }, 397 0, // plugInAutoStartOriginHashesChanged 398 networkProcessDidCrash, 399 0, // plugInInformationBecameAvailable 400 0, // copyWebCryptoMasterKey 401 }; 402 WKContextSetClient(m_context.get(), &contextClient.base); 403 394 404 WKContextHistoryClientV0 historyClient = { 395 405 { 0, this }, … … 692 702 } 693 703 704 const char* TestController::networkProcessName() 705 { 706 // FIXME: Find a way to not hardcode the process name. 707 #if PLATFORM(IOS) 708 return "com.apple.WebKit.Networking"; 709 #elif PLATFORM(MAC) 710 return "com.apple.WebKit.Networking.Development"; 711 #else 712 return "NetworkProcess"; 713 #endif 714 } 715 694 716 void TestController::updateWebViewSizeForTest(const TestInvocation& test) 695 717 { … … 915 937 { 916 938 *returnData = static_cast<TestController*>(const_cast<void*>(clientInfo))->didReceiveSynchronousMessageFromInjectedBundle(messageName, messageBody).leakRef(); 939 } 940 941 void TestController::networkProcessDidCrash(WKContextRef context, const void *clientInfo) 942 { 943 static_cast<TestController*>(const_cast<void*>(clientInfo))->networkProcessDidCrash(); 917 944 } 918 945 … … 1201 1228 } 1202 1229 1230 // WKContextClient 1231 1232 void TestController::networkProcessDidCrash() 1233 { 1234 #if PLATFORM(COCOA) 1235 pid_t pid = WKContextGetNetworkProcessIdentifier(m_context.get()); 1236 fprintf(stderr, "#CRASHED - %s (pid %ld)\n", networkProcessName(), static_cast<long>(pid)); 1237 #else 1238 fprintf(stderr, "#CRASHED - %s\n", networkProcessName()); 1239 #endif 1240 exit(1); 1241 } 1242 1203 1243 // WKPageNavigationClient 1204 1244 -
trunk/Tools/WebKitTestRunner/TestController.h
r179588 r179754 106 106 107 107 static const char* webProcessName(); 108 static const char* networkProcessName(); 108 109 109 110 WorkQueueManager& workQueueManager() { return m_workQueueManager; } … … 151 152 void didReceiveKeyDownMessageFromInjectedBundle(WKDictionaryRef messageBodyDictionary, bool synchronous); 152 153 154 // WKContextClient 155 static void networkProcessDidCrash(WKContextRef, const void*); 156 void networkProcessDidCrash(); 157 153 158 // WKPageNavigationClient 154 159 static void didCommitNavigation(WKPageRef, WKNavigationRef, WKTypeRef userData, const void*);
Note: See TracChangeset
for help on using the changeset viewer.