Changeset 231298 in webkit
- Timestamp:
- May 3, 2018 1:45:32 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r231295 r231298 1 2018-05-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r222772): [GTK][WPE] WebProcess from WebKitGtk+ 2.19.9x SIGSEVs in WebKit::WebProcess::ensureNetworkProcessConnection() at Source/WebKit/WebProcess/WebProcess.cpp:1127 4 https://bugs.webkit.org/show_bug.cgi?id=183348 5 6 Reviewed by Michael Catanzaro. 7 8 When connection doesn't exit in case of sync message failure, always exit in case of failing to send 9 GetNetworkProcessConnection or GetStorageProcessConnection messages. This can happen when the WebView is created 10 and destroyed quickly. 11 12 * WebProcess/WebProcess.cpp: 13 (WebKit::WebProcess::ensureNetworkProcessConnection): 14 (WebKit::WebProcess::ensureWebToStorageProcessConnection): 15 1 16 2018-05-02 Nan Wang <n_wang@apple.com> 2 17 -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r230711 r231298 1149 1149 IPC::Attachment encodedConnectionIdentifier; 1150 1150 1151 if (!parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetNetworkProcessConnection(), Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply)) 1151 if (!parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetNetworkProcessConnection(), Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply)) { 1152 #if PLATFORM(GTK) || PLATFORM(WPE) 1153 // GTK+ and WPE ports don't exit on send sync message failure. 1154 // In this particular case, the network process can be terminated by the UI process while the 1155 // Web process is still initializing, so we always want to exit instead of crashing. This can 1156 // happen when the WebView is created and then destroyed quickly. 1157 // See https://bugs.webkit.org/show_bug.cgi?id=183348. 1158 exit(0); 1159 #else 1152 1160 CRASH(); 1161 #endif 1162 } 1153 1163 1154 1164 #if USE(UNIX_DOMAIN_SOCKETS) … … 1223 1233 IPC::Attachment encodedConnectionIdentifier; 1224 1234 1225 if (!parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetStorageProcessConnection(initialSessionID), Messages::WebProcessProxy::GetStorageProcessConnection::Reply(encodedConnectionIdentifier), 0)) 1235 if (!parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetStorageProcessConnection(initialSessionID), Messages::WebProcessProxy::GetStorageProcessConnection::Reply(encodedConnectionIdentifier), 0)) { 1236 #if PLATFORM(GTK) || PLATFORM(WPE) 1237 // GTK+ and WPE ports don't exit on send sync message failure. 1238 // In this particular case, the storage process can be terminated by the UI process while the 1239 // connection is being done, so we always want to exit instead of crashing. 1240 // See https://bugs.webkit.org/show_bug.cgi?id=183348. 1241 #else 1226 1242 CRASH(); 1243 #endif 1244 } 1227 1245 1228 1246 #if USE(UNIX_DOMAIN_SOCKETS) -
trunk/Tools/ChangeLog
r231276 r231298 1 2018-05-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r222772): [GTK][WPE] WebProcess from WebKitGtk+ 2.19.9x SIGSEVs in WebKit::WebProcess::ensureNetworkProcessConnection() at Source/WebKit/WebProcess/WebProcess.cpp:1127 4 https://bugs.webkit.org/show_bug.cgi?id=183348 5 6 Reviewed by Michael Catanzaro. 7 8 Add a test case to reproduce the crash. 9 10 * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: 11 (testWebViewCloseQuickly): 12 (beforeAll): 13 1 14 2018-05-02 Aditya Keerthi <akeerthi@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp
r231042 r231298 106 106 } 107 107 108 static void testWebViewCloseQuickly(WebViewTest* test, gconstpointer) 109 { 110 auto webView = Test::adoptView(Test::createWebView()); 111 test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webView.get())); 112 g_idle_add([](gpointer userData) -> gboolean { 113 static_cast<WebViewTest*>(userData)->quitMainLoop(); 114 return G_SOURCE_REMOVE; 115 }, test); 116 g_main_loop_run(test->m_mainLoop); 117 webView = nullptr; 118 } 119 108 120 #if PLATFORM(WPE) 109 121 static void testWebViewWebBackend(Test* test, gconstpointer) … … 1204 1216 WebViewTest::add("WebKitWebView", "web-context", testWebViewWebContext); 1205 1217 WebViewTest::add("WebKitWebView", "web-context-lifetime", testWebViewWebContextLifetime); 1218 WebViewTest::add("WebKitWebView", "close-quickly", testWebViewCloseQuickly); 1206 1219 #if PLATFORM(WPE) 1207 1220 Test::add("WebKitWebView", "backend", testWebViewWebBackend);
Note: See TracChangeset
for help on using the changeset viewer.