Changeset 255518 in webkit
- Timestamp:
- Jan 31, 2020 12:58:43 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r255516 r255518 1 2020-01-31 Chris Dumez <cdumez@apple.com> 2 3 [ iOS ] imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincrement-indexes-cursors.any.serviceworker.html is flaky failing. 4 https://bugs.webkit.org/show_bug.cgi?id=206934 5 <rdar://problem/58991581> 6 7 Unskip test which should no longer be flaky. 8 9 * platform/ios-wk2/TestExpectations: 10 1 11 2020-01-31 Jason Lawrence <lawrence.j@apple.com> 2 12 -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r255462 r255518 1360 1360 webkit.org/b/206752 imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable.html [ Pass Failure ] 1361 1361 1362 webkit.org/b/206934 imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincrement-indexes-cursors.any.serviceworker.html [ Pass Failure ]1363 1364 1362 webkit.org/b/206946 http/tests/security/cookies/third-party-cookie-blocking-main-frame.html [ Pass Timeout ] 1365 1363 webkit.org/b/206965 storage/indexeddb/intversion-long-queue-private.html [ Pass Failure ] -
trunk/Source/WebKit/ChangeLog
r255517 r255518 1 2020-01-31 Chris Dumez <cdumez@apple.com> 2 3 [ iOS ] imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincrement-indexes-cursors.any.serviceworker.html is flaky failing. 4 https://bugs.webkit.org/show_bug.cgi?id=206934 5 <rdar://problem/58991581> 6 7 Reviewed by Brady Eidson. 8 9 Flakiness would happen when the service worker would take too long to launch and the responsiveness timer would fire and 10 report the process as unresponsive while still launching or very shortly after. When a service worker is reported as 11 unresponsive, we would kill it. 12 13 To address the issue, several changes were made: 14 - Responsiveness checks are now disabled for slow builds (Debug, ASAN, GuardMalloc) 15 - We only start the ResponsivenessTimer after the process has finished launching since the responsiveness 16 check relies on IPC to the process and we cannot send the IPC until after the process has launched. 17 18 * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp: 19 (WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateBackingStoreState): 20 * UIProcess/ProvisionalPageProxy.cpp: 21 (WebKit::ProvisionalPageProxy::goToBackForwardItem): 22 * UIProcess/WebPageProxy.cpp: 23 (WebKit::WebPageProxy::launchProcessForReload): 24 (WebKit::WebPageProxy::launchProcessWithItem): 25 (WebKit::WebPageProxy::loadRequestWithNavigationShared): 26 (WebKit::WebPageProxy::loadFile): 27 (WebKit::WebPageProxy::loadDataWithNavigationShared): 28 (WebKit::WebPageProxy::loadAlternateHTML): 29 (WebKit::WebPageProxy::loadWebArchiveData): 30 (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): 31 (WebKit::WebPageProxy::stopLoading): 32 (WebKit::WebPageProxy::reload): 33 (WebKit::WebPageProxy::goToBackForwardItem): 34 (WebKit::WebPageProxy::dispatchActivityStateChange): 35 (WebKit::WebPageProxy::processNextQueuedMouseEvent): 36 (WebKit::WebPageProxy::handleKeyboardEvent): 37 (WebKit::WebPageProxy::handleGestureEvent): 38 (WebKit::WebPageProxy::handlePreventableTouchEvent): 39 (WebKit::WebPageProxy::handleTouchEvent): 40 (WebKit::WebPageProxy::runJavaScriptAlert): 41 (WebKit::WebPageProxy::runJavaScriptConfirm): 42 (WebKit::WebPageProxy::runJavaScriptPrompt): 43 (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): 44 (WebKit::WebPageProxy::runOpenPanel): 45 * UIProcess/WebProcessProxy.cpp: 46 (WebKit::WebProcessProxy::mayBecomeUnresponsive): 47 (WebKit::WebProcessProxy::didFinishLaunching): 48 (WebKit::WebProcessProxy::startResponsivenessTimer): 49 (WebKit::WebProcessProxy::isResponsive): 50 * UIProcess/WebProcessProxy.h: 51 (WebKit::WebProcessProxy::responsivenessTimer): 52 1 53 2020-01-31 Kate Cheney <katherine_cheney@apple.com> 2 54 -
trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
r255060 r255518 176 176 177 177 // Stop the responsiveness timer that was started in sendUpdateBackingStoreState. 178 process(). responsivenessTimer().stop();178 process().stopResponsivenessTimer(); 179 179 180 180 if (layerTreeContext != m_layerTreeContext) { … … 320 320 // Start the responsiveness timer. We will stop it when we hear back from the WebProcess 321 321 // in didUpdateBackingStoreState. 322 process(). responsivenessTimer().start();322 process().startResponsivenessTimer(); 323 323 } 324 324 -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
r255458 r255518 182 182 send(Messages::WebPage::UpdateBackForwardListForReattach(WTFMove(itemStates))); 183 183 send(Messages::WebPage::GoToBackForwardItem(navigation.navigationID(), item.itemID(), *navigation.backForwardFrameLoadType(), WebCore::ShouldTreatAsContinuingLoad::Yes, WTFMove(websitePolicies))); 184 m_process-> responsivenessTimer().start();184 m_process->startResponsivenessTimer(); 185 185 } 186 186 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r255461 r255518 977 977 // We allow stale content when reloading a WebProcess that's been killed or crashed. 978 978 send(Messages::WebPage::GoToBackForwardItem(navigation->navigationID(), m_backForwardList->currentItem()->itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, WTF::nullopt)); 979 m_process-> responsivenessTimer().start();979 m_process->startResponsivenessTimer(); 980 980 981 981 return navigation; … … 1000 1000 1001 1001 send(Messages::WebPage::GoToBackForwardItem(navigation->navigationID(), item.itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, WTF::nullopt)); 1002 m_process-> responsivenessTimer().start();1002 m_process->startResponsivenessTimer(); 1003 1003 1004 1004 return navigation; … … 1290 1290 process->send(Messages::WebPage::LoadRequest(loadParameters), webPageID); 1291 1291 #endif 1292 process-> responsivenessTimer().start();1292 process->startResponsivenessTimer(); 1293 1293 } 1294 1294 … … 1345 1345 send(Messages::WebPage::LoadRequest(loadParameters)); 1346 1346 #endif 1347 m_process-> responsivenessTimer().start();1347 m_process->startResponsivenessTimer(); 1348 1348 1349 1349 return navigation; … … 1391 1391 process->assumeReadAccessToBaseURL(*this, baseURL); 1392 1392 process->send(Messages::WebPage::LoadData(loadParameters), webPageID); 1393 process-> responsivenessTimer().start();1393 process->startResponsivenessTimer(); 1394 1394 } 1395 1395 … … 1434 1434 m_process->assumeReadAccessToBaseURL(*this, unreachableURL); 1435 1435 send(Messages::WebPage::LoadAlternateHTML(loadParameters)); 1436 m_process-> responsivenessTimer().start();1436 m_process->startResponsivenessTimer(); 1437 1437 } 1438 1438 … … 1461 1461 1462 1462 send(Messages::WebPage::LoadData(loadParameters)); 1463 m_process-> responsivenessTimer().start();1463 m_process->startResponsivenessTimer(); 1464 1464 } 1465 1465 … … 1480 1480 1481 1481 send(Messages::WebPage::NavigateToPDFLinkWithSimulatedClick(urlString, documentPoint, screenPoint)); 1482 m_process-> responsivenessTimer().start();1482 m_process->startResponsivenessTimer(); 1483 1483 } 1484 1484 … … 1497 1497 m_provisionalPage = nullptr; 1498 1498 } 1499 m_process-> responsivenessTimer().start();1499 m_process->startResponsivenessTimer(); 1500 1500 } 1501 1501 … … 1528 1528 1529 1529 send(Messages::WebPage::Reload(navigation->navigationID(), options.toRaw(), sandboxExtensionHandle)); 1530 m_process-> responsivenessTimer().start();1530 m_process->startResponsivenessTimer(); 1531 1531 1532 1532 #if ENABLE(SPEECH_SYNTHESIS) … … 1597 1597 1598 1598 send(Messages::WebPage::GoToBackForwardItem(navigation ? navigation->navigationID() : 0, item.itemID(), frameLoadType, ShouldTreatAsContinuingLoad::No, WTF::nullopt)); 1599 m_process-> responsivenessTimer().start();1599 m_process->startResponsivenessTimer(); 1600 1600 1601 1601 return navigation; … … 1951 1951 // state, it might not send back a reply (since it won't paint anything if the web page is hidden) so we 1952 1952 // stop the unresponsiveness timer here. 1953 m_process-> responsivenessTimer().stop();1953 m_process->stopResponsivenessTimer(); 1954 1954 } 1955 1955 } … … 2481 2481 WebEvent::Type eventType = event.type(); 2482 2482 if (eventType == WebEvent::MouseDown || eventType == WebEvent::MouseForceChanged || eventType == WebEvent::MouseForceDown) 2483 m_process-> responsivenessTimer().startWithLazyStop();2483 m_process->startResponsivenessTimer(WebProcessProxy::UseLazyStop::Yes); 2484 2484 else if (eventType != WebEvent::MouseMove) { 2485 2485 // NOTE: This does not start the responsiveness timer because mouse move should not indicate interaction. 2486 m_process-> responsivenessTimer().start();2486 m_process->startResponsivenessTimer(); 2487 2487 } 2488 2488 … … 2673 2673 m_keyEventQueue.append(event); 2674 2674 2675 ResponsivenessTimer& responsivenessTimer = m_process->responsivenessTimer(); 2676 if (event.type() == WebEvent::KeyDown) 2677 responsivenessTimer.startWithLazyStop(); 2678 else 2679 responsivenessTimer.start(); 2675 m_process->startResponsivenessTimer(event.type() == WebEvent::KeyDown ? WebProcessProxy::UseLazyStop::Yes : WebProcessProxy::UseLazyStop::No); 2680 2676 2681 2677 if (m_keyEventQueue.size() == 1) { // Otherwise, sent from DidReceiveEvent message handler. … … 2848 2844 // FIXME: Consider doing some coalescing here. 2849 2845 2850 ResponsivenessTimer& responsivenessTimer = m_process->responsivenessTimer(); 2851 if (event.type() == WebEvent::GestureStart || event.type() == WebEvent::GestureChange) 2852 responsivenessTimer.startWithLazyStop(); 2853 else 2854 responsivenessTimer.start(); 2846 m_process->startResponsivenessTimer((event.type() == WebEvent::GestureStart || event.type() == WebEvent::GestureChange) ? WebProcessProxy::UseLazyStop::Yes ? WebProcessProxy::UseLazyStop::No); 2855 2847 2856 2848 send(Messages::EventDispatcher::GestureEvent(m_webPageID, event), 0); … … 2923 2915 } 2924 2916 2925 m_process-> responsivenessTimer().start();2917 m_process->startResponsivenessTimer(); 2926 2918 bool handled = false; 2927 2919 bool replyReceived = sendSync(Messages::WebPage::TouchEventSync(event), Messages::WebPage::TouchEventSync::Reply(handled), 1_s, IPC::SendSyncOption::ForceDispatchWhenDestinationIsWaitingForUnboundedSyncReply); … … 2935 2927 else if (handled) 2936 2928 m_handledSynchronousTouchEventWhileDispatchingPreventableTouchStart = true; 2937 m_process-> responsivenessTimer().stop();2929 m_process->stopResponsivenessTimer(); 2938 2930 } 2939 2931 … … 2979 2971 if (!m_isPageSuspended) { 2980 2972 m_touchEventQueue.append(event); 2981 m_process-> responsivenessTimer().start();2973 m_process->startResponsivenessTimer(); 2982 2974 send(Messages::WebPage::TouchEvent(event)); 2983 2975 } else { … … 5456 5448 5457 5449 // Since runJavaScriptAlert() can spin a nested run loop we need to turn off the responsiveness timer. 5458 m_process-> responsivenessTimer().stop();5450 m_process->stopResponsivenessTimer(); 5459 5451 5460 5452 if (m_controlledByAutomation) { … … 5475 5467 5476 5468 // Since runJavaScriptConfirm() can spin a nested run loop we need to turn off the responsiveness timer. 5477 m_process-> responsivenessTimer().stop();5469 m_process->stopResponsivenessTimer(); 5478 5470 5479 5471 if (m_controlledByAutomation) { … … 5494 5486 #endif 5495 5487 // Since runJavaScriptPrompt() can spin a nested run loop we need to turn off the responsiveness timer. 5496 m_process-> responsivenessTimer().stop();5488 m_process->stopResponsivenessTimer(); 5497 5489 5498 5490 if (m_controlledByAutomation) { … … 5661 5653 5662 5654 // Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer. 5663 m_process-> responsivenessTimer().stop();5655 m_process->stopResponsivenessTimer(); 5664 5656 m_tryCloseTimeoutTimer.stop(); 5665 5657 m_uiClient->runBeforeUnloadConfirmPanel(*this, message, frame, WTFMove(securityOrigin), WTFMove(reply)); … … 5708 5700 5709 5701 // Since runOpenPanel() can spin a nested run loop we need to turn off the responsiveness timer. 5710 m_process-> responsivenessTimer().stop();5702 m_process->stopResponsivenessTimer(); 5711 5703 5712 5704 if (!m_uiClient->runOpenPanel(*this, frame, WTFMove(frameSecurityOrigin), parameters.ptr(), m_openPanelResultListener.get())) { … … 6296 6288 6297 6289 // Since showPopupMenu() can spin a nested run loop we need to turn off the responsiveness timer. 6298 m_process-> responsivenessTimer().stop();6290 m_process->stopResponsivenessTimer(); 6299 6291 6300 6292 // Showing a popup menu runs a nested runloop, which can handle messages that cause |this| to get closed. … … 6339 6331 6340 6332 // Since showContextMenu() can spin a nested run loop we need to turn off the responsiveness timer. 6341 m_process-> responsivenessTimer().stop();6333 m_process->stopResponsivenessTimer(); 6342 6334 6343 6335 // m_activeContextMenu might get cleared if WebPageProxy code is re-entered from the menu runloop or delegates. … … 6686 6678 case WebEvent::GestureEnd: 6687 6679 #endif 6688 m_process-> responsivenessTimer().stop();6680 m_process->stopResponsivenessTimer(); 6689 6681 break; 6690 6682 } … … 7941 7933 { 7942 7934 // Since runModal() can (and probably will) spin a nested run loop we need to turn off the responsiveness timer. 7943 m_process-> responsivenessTimer().stop();7935 m_process->stopResponsivenessTimer(); 7944 7936 7945 7937 // Our Connection's run loop might have more messages waiting to be handled after this RunModal message. -
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
r255438 r255518 864 864 bool WebProcessProxy::mayBecomeUnresponsive() 865 865 { 866 return !platformIsBeingDebugged(); 866 #if !defined(NDEBUG) || ASAN_ENABLED 867 // Disable responsiveness checks in slow builds to avoid false positives. 868 return false; 869 #else 870 if (platformIsBeingDebugged()) 871 return false; 872 873 static bool isLibgmallocEnabled = [] { 874 char* variable = getenv("DYLD_INSERT_LIBRARIES"); 875 if (!variable) 876 return false; 877 if (!strstr(variable, "libgmalloc")) 878 return false; 879 return true; 880 }(); 881 if (isLibgmallocEnabled) 882 return false; 883 884 return true; 885 #endif 867 886 } 868 887 … … 893 912 unblockAccessibilityServerIfNeeded(); 894 913 #endif 914 915 if (m_shouldStartResponsivenessTimerWhenLaunched) { 916 auto useLazyStop = *std::exchange(m_shouldStartResponsivenessTimerWhenLaunched, WTF::nullopt); 917 startResponsivenessTimer(useLazyStop); 918 } 895 919 } 896 920 … … 1121 1145 { 1122 1146 responsivenessTimer().stop(); 1147 } 1148 1149 void WebProcessProxy::startResponsivenessTimer(UseLazyStop useLazyStop) 1150 { 1151 if (isLaunching()) { 1152 m_shouldStartResponsivenessTimerWhenLaunched = useLazyStop; 1153 return; 1154 } 1155 1156 if (useLazyStop == UseLazyStop::Yes) 1157 responsivenessTimer().startWithLazyStop(); 1158 else 1159 responsivenessTimer().start(); 1123 1160 } 1124 1161 … … 1343 1380 m_isResponsiveCallbacks.append(WTFMove(callback)); 1344 1381 1345 responsivenessTimer().start();1382 startResponsivenessTimer(); 1346 1383 send(Messages::WebProcess::MainThreadPing(), 0); 1347 1384 } -
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
r255457 r255518 176 176 RefPtr<API::UserInitiatedAction> userInitiatedActivity(uint64_t); 177 177 178 ResponsivenessTimer& responsivenessTimer() { return m_responsivenessTimer; }179 178 bool isResponsive() const; 180 179 … … 218 217 void requestTermination(ProcessTerminationReason); 219 218 219 enum class UseLazyStop : bool { No, Yes }; 220 void startResponsivenessTimer(UseLazyStop = UseLazyStop::No); 220 221 void stopResponsivenessTimer(); 221 222 … … 417 418 static const HashSet<String>& platformPathsWithAssumedReadAccess(); 418 419 420 ResponsivenessTimer& responsivenessTimer() { return m_responsivenessTimer; } 419 421 void updateBackgroundResponsivenessTimer(); 420 422 … … 541 543 bool m_hasIssuedAttachmentElementRelatedSandboxExtensions { false }; 542 544 #endif 545 Optional<UseLazyStop> m_shouldStartResponsivenessTimerWhenLaunched; 543 546 544 547 #if PLATFORM(WATCHOS)
Note: See TracChangeset
for help on using the changeset viewer.