Changeset 260382 in webkit
- Timestamp:
- Apr 20, 2020 11:43:45 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r260380 r260382 1 2020-04-20 Chris Dumez <cdumez@apple.com> 2 3 Sending beacons when Fetch KeepAlive feature is disabled crashes the WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=210753 5 <rdar://problem/61896221> 6 7 Reviewed by Geoffrey Garen. 8 9 Add layout test coverage. 10 11 * http/wpt/beacon/beacon-legacy-code-path-expected.txt: Added. 12 * http/wpt/beacon/beacon-legacy-code-path.html: Added. 13 1 14 2020-04-20 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r260380 r260382 1 2020-04-20 Chris Dumez <cdumez@apple.com> 2 3 Sending beacons when Fetch KeepAlive feature is disabled crashes the WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=210753 5 <rdar://problem/61896221> 6 7 Reviewed by Geoffrey Garen. 8 9 Test: http/wpt/beacon/beacon-legacy-code-path.html 10 11 * testing/InternalSettings.cpp: 12 (WebCore::InternalSettings::Backup::Backup): 13 (WebCore::InternalSettings::Backup::restoreTo): 14 (WebCore::InternalSettings::setFetchAPIKeepAliveEnabled): 15 * testing/InternalSettings.h: 16 * testing/InternalSettings.idl: 17 Add internal settings to disable Fetch Keep Alive for layout testing. 18 1 19 2020-04-20 Youenn Fablet <youenn@apple.com> 2 20 -
trunk/Source/WebCore/testing/InternalSettings.cpp
r255342 r260382 120 120 , m_setScreenCaptureEnabled(RuntimeEnabledFeatures::sharedFeatures().screenCaptureEnabled()) 121 121 #endif 122 , m_fetchAPIKeepAliveAPIEnabled(RuntimeEnabledFeatures::sharedFeatures().fetchAPIKeepAliveEnabled()) 122 123 , m_shouldMockBoldSystemFontForAccessibility(RenderTheme::singleton().shouldMockBoldSystemFontForAccessibility()) 123 124 #if USE(AUDIO_SESSION) … … 223 224 RuntimeEnabledFeatures::sharedFeatures().setScreenCaptureEnabled(m_setScreenCaptureEnabled); 224 225 #endif 226 RuntimeEnabledFeatures::sharedFeatures().setFetchAPIKeepAliveEnabled(m_fetchAPIKeepAliveAPIEnabled); 225 227 RuntimeEnabledFeatures::sharedFeatures().setCustomPasteboardDataEnabled(m_customPasteboardDataEnabled); 226 228 … … 810 812 } 811 813 814 void InternalSettings::setFetchAPIKeepAliveEnabled(bool enabled) 815 { 816 RuntimeEnabledFeatures::sharedFeatures().setFetchAPIKeepAliveEnabled(enabled); 817 } 818 812 819 ExceptionOr<String> InternalSettings::userInterfaceDirectionPolicy() 813 820 { -
trunk/Source/WebCore/testing/InternalSettings.h
r255241 r260382 132 132 static void setPictureInPictureAPIEnabled(bool); 133 133 static void setScreenCaptureEnabled(bool); 134 static void setFetchAPIKeepAliveEnabled(bool); 134 135 135 136 static bool webAnimationsCSSIntegrationEnabled(); … … 221 222 bool m_webGL2Enabled; 222 223 bool m_setScreenCaptureEnabled; 224 bool m_fetchAPIKeepAliveAPIEnabled; 223 225 224 226 bool m_shouldMockBoldSystemFontForAccessibility; -
trunk/Source/WebCore/testing/InternalSettings.idl
r255241 r260382 98 98 void setWebGPUEnabled(boolean enabled); 99 99 void setScreenCaptureEnabled(boolean enabled); 100 void setFetchAPIKeepAliveEnabled(boolean enabled); 100 101 101 102 [MayThrowException] DOMString userInterfaceDirectionPolicy(); -
trunk/Source/WebKit/ChangeLog
r260381 r260382 1 2020-04-20 Chris Dumez <cdumez@apple.com> 2 3 Sending beacons when Fetch KeepAlive feature is disabled crashes the WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=210753 5 <rdar://problem/61896221> 6 7 Reviewed by Geoffrey Garen. 8 9 * WebProcess/Network/WebLoaderStrategy.cpp: 10 (WebKit::WebLoaderStrategy::startPingLoad): 11 Make sure NetworkResourceLoadParameters's webPageProxyID / webPageID / webFrameID are properly 12 initialized before sending the IPC or IPC decoding will fail. 13 1 14 2020-04-20 David Kilzer <ddkilzer@apple.com> 2 15 -
trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
r260283 r260382 640 640 void WebLoaderStrategy::startPingLoad(Frame& frame, ResourceRequest& request, const HTTPHeaderMap& originalRequestHeaders, const FetchOptions& options, ContentSecurityPolicyImposition policyCheck, PingLoadCompletionHandler&& completionHandler) 641 641 { 642 auto* webFrame = WebFrame::fromCoreFrame(frame); 642 643 auto* document = frame.document(); 643 if (!document ) {644 if (!document || !webFrame) { 644 645 if (completionHandler) 645 646 completionHandler(internalError(request.url()), { }); … … 647 648 } 648 649 650 auto* webPage = webFrame->page(); 651 if (!webPage) { 652 if (completionHandler) 653 completionHandler(internalError(request.url()), { }); 654 return; 655 } 656 649 657 NetworkResourceLoadParameters loadParameters; 650 658 loadParameters.identifier = generateLoadIdentifier(); 659 loadParameters.webPageProxyID = webPage->webPageProxyIdentifier(); 660 loadParameters.webPageID = webPage->identifier(); 661 loadParameters.webFrameID = webFrame->frameID(); 651 662 loadParameters.request = request; 652 663 loadParameters.sourceOrigin = &document->securityOrigin(); … … 667 678 addParametersShared(&frame, loadParameters); 668 679 669 auto* webFrameLoaderClient = toWebFrameLoaderClient(frame.loader().client()); 670 auto* webFrame = webFrameLoaderClient ? &webFrameLoaderClient->webFrame() : nullptr; 671 auto* webPage = webFrame ? webFrame->page() : nullptr; 672 if (webPage) 673 loadParameters.isNavigatingToAppBoundDomain = webPage->isNavigatingToAppBoundDomain(); 680 loadParameters.isNavigatingToAppBoundDomain = webPage->isNavigatingToAppBoundDomain(); 674 681 675 682 #if ENABLE(CONTENT_EXTENSIONS) 676 683 loadParameters.mainDocumentURL = document->topDocument().url(); 677 684 // FIXME: Instead of passing userContentControllerIdentifier, we should just pass webPageId to NetworkProcess. 678 if (webPage) 679 loadParameters.userContentControllerIdentifier = webPage->userContentControllerIdentifier(); 685 loadParameters.userContentControllerIdentifier = webPage->userContentControllerIdentifier(); 680 686 #endif 681 687
Note: See TracChangeset
for help on using the changeset viewer.