[webkit-changes] [230640] trunk
Title: [230640] trunk Revision 230640 Author beid...@apple.com Date 2018-04-13 11:04:22 -0700 (Fri, 13 Apr 2018) Log Message Introduce SuspendedPageProxy to keep old web processes around after their WebPageProxy has been swapped to a new one. https://bugs.webkit.org/show_bug.cgi?id=184559 Reviewed by Alex Christensen. Source/WebCore: Covered by new API test. WebCore changes rework the meaning of a "ForSuspension" policy to simply navigate the page to about:blank. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::redirectReceived): (WebCore::DocumentLoader::willSendRequest): (WebCore::DocumentLoader::startLoadingMainResource): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::init): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Source/WebKit: Before this patch, when a WebPageProxy navigates and is swapped to a new process, the old process almost always goes away. This is not desirable for a few reasons: 1 - We can't keep the PageCache working for back/forward scenarios 2 - We throw away a "foo.com" web process, meaning the next time we need to host a "foo.com" web page we have to launch and initialize a new web process. This patch adds a SuspendedPageProxy object to keep around the old web process and to manage communication with it. For now, a WebPageProxy keeps exactly one "suspended page" representing the most recently visited page and its process. Additionally, that process is never reused. So no benefit is achieved with this patch, but it enables future benefits. * Platform/Logging.h: * Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::setSuspendedPage): * Shared/WebBackForwardListItem.h: New object to represent the state of a WebPageProxy in an old web process that is not currently hosting the view. * UIProcess/SuspendedPageProxy.cpp: Added. (WebKit::SuspendedPageProxy::SuspendedPageProxy): (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::webProcessDidClose): (WebKit::SuspendedPageProxy::didFinishLoad): (WebKit::SuspendedPageProxy::didReceiveMessage): (WebKit::SuspendedPageProxy::loggingString const): * UIProcess/SuspendedPageProxy.h: Copied from Source/WebKit/Platform/Logging.h. (WebKit::SuspendedPageProxy::create): (WebKit::SuspendedPageProxy::page const): (WebKit::SuspendedPageProxy::process const): (WebKit::SuspendedPageProxy::item const): (WebKit::SuspendedPageProxy::finishedSuspending const): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): (WebKit::WebPageProxy::attachToProcessForNavigation): (WebKit::WebPageProxy::maybeCreateSuspendedPage): (WebKit::WebPageProxy::suspendedPageProcessClosed): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::didFinishLoadForFrame): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::suspendWebPageProxy): (WebKit::WebProcessProxy::suspendedPageWasDestroyed): (WebKit::WebProcessProxy::removeWebPage): (WebKit::WebProcessProxy::didReceiveMessage): Optionally pass WebPageProxy messages along to SuspendedPageProxy objects. (WebKit::WebProcessProxy::didClose): (WebKit::WebProcessProxy::maybeShutDown): (WebKit::WebProcessProxy::canTerminateChildProcess): Don't terminate child processes if they still have suspended pages. * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setIsSuspended): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::isSuspended const): For now, used only by WebProcess::updateActivePages. Will have more uses soon. * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebProcess.messages.in: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::updateActivePages): Allow the UIProcess to request an update of the web processes user visible name. Source/WTF: * wtf/DebugUtilities.h: (WTF::debugString): Add a debug utility to easily construct a "const char*" that is released after a spin of the run loop. This greatly eases uses our String classes and functions inside of "%s" style environments like printf and LOG. Tools: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/DebugUtilities.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/DocumentLoader.cpp trunk/Source/WebCore/loader/DocumentLoader.h trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Platform/Logging.h trunk/Source/WebKit/Shared/WebBackForwardListItem.cpp trunk/Source/WebKit/Shared/WebBackForwardListItem.h trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/WebPageProxy.h trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp trunk/Source/WebKit/UIProcess/WebProcessProxy.h trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp trunk/Source/WebKit/WebProcess/WebPage/WebPage.h trunk/Source/WebKit/WebProcess/WebPa
[webkit-changes] [230458] trunk/Source/WebCore
Title: [230458] trunk/Source/WebCore Revision 230458 Author beid...@apple.com Date 2018-04-09 17:31:02 -0700 (Mon, 09 Apr 2018) Log Message Expand WebCore policy concept of "shouldContinue" to allow for more than true/false https://bugs.webkit.org/show_bug.cgi?id=184424 Reviewed by Alex Christensen. No new tests (No behavior change, refactor only) Specifically this expands the "shouldContinue" bool to be an enum class with: -Yes -No -ForSuspension * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): * loader/FrameLoader.h: * loader/PolicyChecker.cpp: (WebCore::PolicyChecker::checkNavigationPolicy): (WebCore::PolicyChecker::checkNewWindowPolicy): * loader/PolicyChecker.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/DocumentLoader.cpp trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebCore/loader/FrameLoader.h trunk/Source/WebCore/loader/PolicyChecker.cpp trunk/Source/WebCore/loader/PolicyChecker.h Diff Modified: trunk/Source/WebCore/ChangeLog (230457 => 230458) --- trunk/Source/WebCore/ChangeLog 2018-04-10 00:28:24 UTC (rev 230457) +++ trunk/Source/WebCore/ChangeLog 2018-04-10 00:31:02 UTC (rev 230458) @@ -1,3 +1,32 @@ +2018-04-09 Brady Eidson + +Expand WebCore policy concept of "shouldContinue" to allow for more than true/false +https://bugs.webkit.org/show_bug.cgi?id=184424 + +Reviewed by Alex Christensen. + +No new tests (No behavior change, refactor only) + +Specifically this expands the "shouldContinue" bool to be an enum class with: +-Yes +-No +-ForSuspension + +* loader/DocumentLoader.cpp: +(WebCore::DocumentLoader::willSendRequest): +* loader/FrameLoader.cpp: +(WebCore::FrameLoader::loadURL): +(WebCore::FrameLoader::load): +(WebCore::FrameLoader::loadWithDocumentLoader): +(WebCore::FrameLoader::loadPostRequest): +(WebCore::FrameLoader::continueLoadAfterNavigationPolicy): +(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): +* loader/FrameLoader.h: +* loader/PolicyChecker.cpp: +(WebCore::PolicyChecker::checkNavigationPolicy): +(WebCore::PolicyChecker::checkNewWindowPolicy): +* loader/PolicyChecker.h: + 2018-04-09 Sihui Liu REGRESSION(r229929): localStorage is broken for WebInspector Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (230457 => 230458) --- trunk/Source/WebCore/loader/DocumentLoader.cpp 2018-04-10 00:28:24 UTC (rev 230457) +++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2018-04-10 00:31:02 UTC (rev 230458) @@ -639,10 +639,19 @@ ASSERT(!m_waitingForNavigationPolicy); m_waitingForNavigationPolicy = true; -frameLoader()->policyChecker().checkNavigationPolicy(ResourceRequest(newRequest), didReceiveRedirectResponse, [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (ResourceRequest&& request, FormState*, bool shouldContinue) mutable { +frameLoader()->policyChecker().checkNavigationPolicy(ResourceRequest(newRequest), didReceiveRedirectResponse, [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (ResourceRequest&& request, FormState*, ShouldContinue shouldContinue) mutable { m_waitingForNavigationPolicy = false; -if (!shouldContinue) +switch (shouldContinue) { +case ShouldContinue::ForSuspension: +FALLTHROUGH; +// FIXME: Setup this page for suspension (e.g. Page Cache) here. +case ShouldContinue::No: stopLoadingForPolicyChange(); +break; +case ShouldContinue::Yes: +break; +} + completionHandler(WTFMove(request)); }); } Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (230457 => 230458) --- trunk/Source/WebCore/loader/FrameLoader.cpp 2018-04-10 00:28:24 UTC (rev 230457) +++ trunk/Source/WebCore/loader/FrameLoader.cpp 2018-04-10 00:31:02 UTC (rev 230458) @@ -1316,7 +1316,7 @@ if (!targetFrame && !frameName.isEmpty()) { action = "" frameLoadRequest)); -policyChecker().checkNewWindowPolicy(WTFMove(action), request, formState, frameName, [this, allowNavigationToInvalidURL, openerPolicy, completionHandler = completionHandlerCaller.release()] (const ResourceRequest& request, FormState* formState, const String& frameName, const NavigationAction& action, bool shouldContinue) { +policyChecker().checkNewWindowPolicy(WTFMove(action), request, formState, frameName, [this, allowNavigationToInvalidURL, openerPolicy, completionHandler = completionHandlerCaller.release()]
[webkit-changes] [230315] trunk
Title: [230315] trunk Revision 230315 Author beid...@apple.com Date 2018-04-05 16:18:01 -0700 (Thu, 05 Apr 2018) Log Message Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations. and https://bugs.webkit.org/show_bug.cgi?id=184318 Reviewed by Andy Estes. Source/WebKit: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): Don't consider a swap if the navigation is not in the main frame. Tools: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]): (-[PSONScheme addMappingFromURLString:toData:]): (-[PSONScheme webView:startURLSchemeTask:]): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm Diff Modified: trunk/Source/WebKit/ChangeLog (230314 => 230315) --- trunk/Source/WebKit/ChangeLog 2018-04-05 21:21:50 UTC (rev 230314) +++ trunk/Source/WebKit/ChangeLog 2018-04-05 23:18:01 UTC (rev 230315) @@ -1,3 +1,13 @@ +2018-04-05 Brady Eidson + +Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations. + and https://bugs.webkit.org/show_bug.cgi?id=184318 + +Reviewed by Andy Estes. + +* UIProcess/WebPageProxy.cpp: +(WebKit::WebPageProxy::receivedPolicyDecision): Don't consider a swap if the navigation is not in the main frame. + 2018-04-05 Ryosuke Niwa WebContent process sometimes hangs in WebProcess::ensureNetworkProcessConnection Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (230314 => 230315) --- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-04-05 21:21:50 UTC (rev 230314) +++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-04-05 23:18:01 UTC (rev 230315) @@ -2350,7 +2350,7 @@ if (activePolicyListener && activePolicyListener->policyListenerType() == PolicyListenerType::NavigationAction) { ASSERT(activePolicyListener->listenerID() == listenerID); -if (action == PolicyAction::Use && navigation) { +if (action == PolicyAction::Use && navigation && frame.isMainFrame()) { auto proposedProcess = process().processPool().processForNavigation(*this, *navigation, action); if (proposedProcess.ptr() != &process()) { Modified: trunk/Tools/ChangeLog (230314 => 230315) --- trunk/Tools/ChangeLog 2018-04-05 21:21:50 UTC (rev 230314) +++ trunk/Tools/ChangeLog 2018-04-05 23:18:01 UTC (rev 230315) @@ -1,3 +1,15 @@ +2018-04-05 Brady Eidson + +Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations. + and https://bugs.webkit.org/show_bug.cgi?id=184318 + +Reviewed by Andy Estes. + +* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: +(-[PSONMessageHandler userContentController:didReceiveScriptMessage:]): +(-[PSONScheme addMappingFromURLString:toData:]): +(-[PSONScheme webView:startURLSchemeTask:]): + 2018-04-05 Yusuke Suzuki [WTF] Remove StaticLock Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (230314 => 230315) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm 2018-04-05 21:21:50 UTC (rev 230314) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm 2018-04-05 23:18:01 UTC (rev 230315) @@ -73,6 +73,7 @@ [receivedMessages addObject:@""]; receivedMessage = true; +seenPIDs.add([message.webView _webProcessIdentifier]); } @end @@ -134,9 +135,11 @@ @interface PSONScheme : NSObject { const char* _bytes; HashMap _redirects; +HashMap> _dataMappings; } - (instancetype)initWithBytes:(const char*)bytes; - (void)addRedirectFromURLString:(NSString *)sourceURLString toURLString:(NSString *)destinationURLString; +- (void)addMappingFromURLString:(NSString *)urlString toData:(const char*)data; @end @implementation PSONScheme @@ -153,6 +156,11 @@ _redirects.set(sourceURLString, destinationURLString); } +- (void)addMappingFromURLString:(NSString *)urlString toData:(const char*)data +{ +_dataMappings.set(urlString, [NSData dataWithBytesNoCopy:(void*)data length:strlen(data) freeWhenDone:NO]); +} + - (void)webView:(WKWebView *)webView startURLSchemeTask:(id )task { NSURL *finalURL = task.request.URL; @@ -169,7 +177,9 @@ RetainPtr response = adoptNS([[NSURLResponse alloc] initWithURL:finalURL MIMEType:@"text/html" expectedContentLength:1 textEncodingName:nil]); [task didReceiveResponse:response.get()]; -if (_bytes) { +if (auto data = "" absoluteString])) +[task didReceiveData:data.get()]; +else if (_bytes) { RetainPtr data = "" alloc] initWithBytesNoCopy:(void *)_bytes length:strlen(_bytes) freeWhenDone:NO]); [task didReceive
[webkit-changes] [230219] trunk
Title: [230219] trunk Revision 230219 Author beid...@apple.com Date 2018-04-03 13:01:27 -0700 (Tue, 03 Apr 2018) Log Message Make SessionStorage work with process swapping. https://bugs.webkit.org/show_bug.cgi?id=184270 Reviewed by Andy Estes. Source/WebKit: Due to a minor process accounting error, WebPageProxys weren't always being reconnected with their WebsiteDataStore's StorageManager when doing process swaps. Fix that error, and SessionStorage "just works." * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::webProcessWillShutDown): (WebKit::WebPageProxy::processDidTerminate): For NavigationSwap termination, make sure to tell the process lifetime tracker that this page was removed. * UIProcess/WebProcessLifetimeObserver.h: (WebKit::WebProcessLifetimeObserver::webPageWasInvalidated): Renamed from "webPageWasRemoved" (WebKit::WebProcessLifetimeObserver::webPageWasRemoved): Deleted. * UIProcess/WebProcessLifetimeTracker.cpp: (WebKit::WebProcessLifetimeTracker::webPageLeavingWebProcess): Renamed from "webProcessWillShutDown" (WebKit::WebProcessLifetimeTracker::pageWasInvalidated): (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown): Deleted. * UIProcess/WebProcessLifetimeTracker.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::webPageWasInvalidated): (WebKit::WebsiteDataStore::webPageWasRemoved): Deleted. * UIProcess/WebsiteData/WebsiteDataStore.h: Tools: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/WebProcessLifetimeObserver.h trunk/Source/WebKit/UIProcess/WebProcessLifetimeTracker.cpp trunk/Source/WebKit/UIProcess/WebProcessLifetimeTracker.h trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm Diff Modified: trunk/Source/WebKit/ChangeLog (230218 => 230219) --- trunk/Source/WebKit/ChangeLog 2018-04-03 19:58:09 UTC (rev 230218) +++ trunk/Source/WebKit/ChangeLog 2018-04-03 20:01:27 UTC (rev 230219) @@ -1,3 +1,35 @@ +2018-04-03 Brady Eidson + +Make SessionStorage work with process swapping. +https://bugs.webkit.org/show_bug.cgi?id=184270 + +Reviewed by Andy Estes. + +Due to a minor process accounting error, WebPageProxys weren't always being reconnected with their +WebsiteDataStore's StorageManager when doing process swaps. + +Fix that error, and SessionStorage "just works." + +* UIProcess/WebPageProxy.cpp: +(WebKit::WebPageProxy::webProcessWillShutDown): +(WebKit::WebPageProxy::processDidTerminate): For NavigationSwap termination, make sure to tell the + process lifetime tracker that this page was removed. + +* UIProcess/WebProcessLifetimeObserver.h: +(WebKit::WebProcessLifetimeObserver::webPageWasInvalidated): Renamed from "webPageWasRemoved" +(WebKit::WebProcessLifetimeObserver::webPageWasRemoved): Deleted. + +* UIProcess/WebProcessLifetimeTracker.cpp: +(WebKit::WebProcessLifetimeTracker::webPageLeavingWebProcess): Renamed from "webProcessWillShutDown" +(WebKit::WebProcessLifetimeTracker::pageWasInvalidated): +(WebKit::WebProcessLifetimeTracker::webProcessWillShutDown): Deleted. +* UIProcess/WebProcessLifetimeTracker.h: + +* UIProcess/WebsiteData/WebsiteDataStore.cpp: +(WebKit::WebsiteDataStore::webPageWasInvalidated): +(WebKit::WebsiteDataStore::webPageWasRemoved): Deleted. +* UIProcess/WebsiteData/WebsiteDataStore.h: + 2018-04-03 Commit Queue Unreviewed, rolling out r230210. Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (230218 => 230219) --- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-04-03 19:58:09 UTC (rev 230218) +++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-04-03 20:01:27 UTC (rev 230219) @@ -4167,7 +4167,7 @@ void WebPageProxy::webProcessWillShutDown() { -m_webProcessLifetimeTracker.webProcessWillShutDown(); +m_webProcessLifetimeTracker.webPageLeavingWebProcess(); } void WebPageProxy::processDidFinishLaunching() @@ -5619,7 +5619,9 @@ // For bringup of process swapping, NavigationSwap termination will not go out to clients. // If it does *during* process swapping, and the client triggers a reload, that causes bizarre WebKit re-entry. // FIXME: This might have to change -if (reason != ProcessTerminationReason::NavigationSwap) { +if (reason == ProcessTerminationReason::NavigationSwap) +m_webProcessLifetimeTracker.webPageLeavingWebProcess(); +else { navigationState().clearAllNavigations(); if (m_navigationClient) Modified: trunk/Source/WebKit/UIProcess/WebProcessLifetimeOb
[webkit-changes] [230195] trunk
Title: [230195] trunk Revision 230195 Author beid...@apple.com Date 2018-04-02 18:03:46 -0700 (Mon, 02 Apr 2018) Log Message Process swapping on navigation needs to handle server redirects. and https://bugs.webkit.org/show_bug.cgi?id=184142 Reviewed by Alex Christensen. Source/WebKit: The same rules we apply to process swapping for basic navigations need to apply to server redirects as well. There's three interesting cases we need to support that are covered by new API tests: 1 - The initial load in a WKWebView redirects cross-origin. 2 - A WKWebView is showing content from a.com, we start a load to b.com, and that redirects to c.com 3 - A WKWebView is showing content from a.com, we start a load to a.com, that that redirects to b.com. Supporting all 3 of these brought their own little challenges. By teaching Navigation objects more about redirects I was able to support all 3 cases. * UIProcess/API/APINavigation.cpp: (API::Navigation::Navigation): (API::Navigation::setCurrentRequest): (API::Navigation::appendRedirectionURL): (API::Navigation::loggingString const): (API::Navigation::loggingURL const): Deleted. * UIProcess/API/APINavigation.h: (API::Navigation::originalRequest const): (API::Navigation::currentRequest const): (API::Navigation::currentRequestProcessIdentifier const): (API::Navigation::setCurrentRequestIsRedirect): (API::Navigation::currentRequestIsRedirect const): (API::Navigation::request const): Deleted. * UIProcess/API/Cocoa/WKNavigation.mm: (-[WKNavigation _request]): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::continueNavigationInNewProcess): If this continued navigation is currently in a server redirect, save off a lambda to synthesize a "did receive server redirect" callback once the new WebProcess is running. (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Possibly ignore this notification if it is really a cross-origin redirect that is just starting back up in a new WebProcess. (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::resetStateAfterProcessExited): Do not clear pageLoadState if the process is exitting for a navigation swap, as we will need to pick up where we left off when the load continues in a new WebProcess. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processForNavigation): If a process has never committed any provisional load, it can always be used to continue a navigation. * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::didCommitProvisionalLoad): (WebKit::WebProcessProxy::hasCommittedAnyProvisionalLoads const): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Tools: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:didFinishNavigation:]): (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]): (-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]): (-[PSONScheme addRedirectFromURLString:toURLString:]): (-[PSONScheme webView:startURLSchemeTask:]): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APINavigation.cpp trunk/Source/WebKit/UIProcess/API/APINavigation.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigation.mm trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/WebPageProxy.h trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebProcessProxy.h trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm Diff Modified: trunk/Source/WebKit/ChangeLog (230194 => 230195) --- trunk/Source/WebKit/ChangeLog 2018-04-03 00:50:29 UTC (rev 230194) +++ trunk/Source/WebKit/ChangeLog 2018-04-03 01:03:46 UTC (rev 230195) @@ -1,3 +1,67 @@ +2018-04-02 Brady Eidson + +Process swapping on navigation needs to handle server redirects. + and https://bugs.webkit.org/show_bug.cgi?id=184142 + +Reviewed by Alex Christensen. + +The same rules we apply to process swapping for basic navigations need to apply +to server redirects as well. + +There's three interesting cases we need to support that are covered by new API tests: +1 - The initial load in a WKWebView redirects cross-origin. +2 - A WKWebView is showing content from a.com, we start a load to b.com, and that re
[webkit-changes] [230174] trunk
Title: [230174] trunk Revision 230174 Author beid...@apple.com Date 2018-04-02 13:05:48 -0700 (Mon, 02 Apr 2018) Log Message Process swapping on navigation needs to handle server redirects. and https://bugs.webkit.org/show_bug.cgi?id=184142 Reviewed by Alex Christensen. Source/WebKit: The same rules we apply to process swapping for basic navigations need to apply to server redirects as well. There's three interesting cases we need to support that are covered by new API tests: 1 - The initial load in a WKWebView redirects cross-origin. 2 - A WKWebView is showing content from a.com, we start a load to b.com, and that redirects to c.com 3 - A WKWebView is showing content from a.com, we start a load to a.com, that that redirects to b.com. Supporting all 3 of these brought their own little challenges. By teaching Navigation objects more about redirects I was able to support all 3 cases. * UIProcess/API/APINavigation.cpp: (API::Navigation::Navigation): (API::Navigation::setCurrentRequest): (API::Navigation::appendRedirectionURL): (API::Navigation::loggingString const): (API::Navigation::loggingURL const): Deleted. * UIProcess/API/APINavigation.h: (API::Navigation::originalRequest const): (API::Navigation::currentRequest const): (API::Navigation::currentRequestProcessIdentifier const): (API::Navigation::setCurrentRequestIsRedirect): (API::Navigation::currentRequestIsRedirect const): (API::Navigation::request const): Deleted. * UIProcess/API/Cocoa/WKNavigation.mm: (-[WKNavigation _request]): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::continueNavigationInNewProcess): If this continued navigation is currently in a server redirect, save off a lambda to synthesize a "did receive server redirect" callback once the new WebProcess is running. (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Possibly ignore this notification if it is really a cross-origin redirect that is just starting back up in a new WebProcess. (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::resetStateAfterProcessExited): Do not clear pageLoadState if the process is exitting for a navigation swap, as we will need to pick up where we left off when the load continues in a new WebProcess. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processForNavigation): If a process has never committed any provisional load, it can always be used to continue a navigation. * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::didCommitProvisionalLoad): (WebKit::WebProcessProxy::hasCommittedAnyProvisionalLoads const): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Tools: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:didFinishNavigation:]): (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]): (-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]): (-[PSONScheme addRedirectFromURLString:toURLString:]): (-[PSONScheme webView:startURLSchemeTask:]): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APINavigation.cpp trunk/Source/WebKit/UIProcess/API/APINavigation.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigation.mm trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/WebPageProxy.h trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebProcessProxy.h trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm Diff Modified: trunk/Source/WebKit/ChangeLog (230173 => 230174) --- trunk/Source/WebKit/ChangeLog 2018-04-02 19:59:42 UTC (rev 230173) +++ trunk/Source/WebKit/ChangeLog 2018-04-02 20:05:48 UTC (rev 230174) @@ -1,3 +1,67 @@ +2018-04-02 Brady Eidson + +Process swapping on navigation needs to handle server redirects. + and https://bugs.webkit.org/show_bug.cgi?id=184142 + +Reviewed by Alex Christensen. + +The same rules we apply to process swapping for basic navigations need to apply +to server redirects as well. + +There's three interesting cases we need to support that are covered by new API tests: +1 - The initial load in a WKWebView redirects cross-origin. +2 - A WKWebView is showing content from a.com, we start a load to b.com, and that re
[webkit-changes] [230081] trunk/Source/WebCore
Title: [230081] trunk/Source/WebCore Revision 230081 Author beid...@apple.com Date 2018-03-29 14:15:26 -0700 (Thu, 29 Mar 2018) Log Message Update Service Worker feature status. https://bugs.webkit.org/show_bug.cgi?id=184139 Reviewed by Chris Dumez. * features.json: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/features.json Diff Modified: trunk/Source/WebCore/ChangeLog (230080 => 230081) --- trunk/Source/WebCore/ChangeLog 2018-03-29 21:13:03 UTC (rev 230080) +++ trunk/Source/WebCore/ChangeLog 2018-03-29 21:15:26 UTC (rev 230081) @@ -1,3 +1,12 @@ +2018-03-29 Brady Eidson + +Update Service Worker feature status. +https://bugs.webkit.org/show_bug.cgi?id=184139 + +Reviewed by Chris Dumez. + +* features.json: + 2018-03-29 Chris Dumez Drop DOMWindow::frames() / DOMWindow::window() methods Modified: trunk/Source/WebCore/features.json (230080 => 230081) --- trunk/Source/WebCore/features.json 2018-03-29 21:13:03 UTC (rev 230080) +++ trunk/Source/WebCore/features.json 2018-03-29 21:15:26 UTC (rev 230081) @@ -497,7 +497,7 @@ { "name": "Service Workers", "status": { -"status": "Supported In Preview" +"status": "Supported" }, "url": "https://w3c.github.io/ServiceWorker/", "webkit-url": "https://webkit.org/b/174541", ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [229926] trunk
Title: [229926] trunk Revision 229926 Author beid...@apple.com Date 2018-03-23 15:15:23 -0700 (Fri, 23 Mar 2018) Log Message Go to back/forward list items after a process-swapped navigation. and https://bugs.webkit.org/show_bug.cgi?id=183920 Reviewed by Andy Estes. Source/WebCore: Covered by new API test. Most of the changes to WebCore are teaching HistoryItem navigations to know when they should do a policy check or not. * WebCore.xcodeproj/project.pbxproj: * history/BackForwardController.cpp: (WebCore::BackForwardController::goBackOrForward): (WebCore::BackForwardController::goBack): (WebCore::BackForwardController::goForward): * history/HistoryItem.cpp: (WebCore::HistoryItem::setStateObject): Actually push state object changes to the UIProcess. This was a long standing bug that made it difficult to effectively test this change. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame): (WebCore::FrameLoader::loadDifferentDocumentItem): (WebCore::FrameLoader::loadItem): (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad): * loader/FrameLoader.h: * loader/FrameLoaderTypes.h: * loader/HistoryController.cpp: (WebCore::HistoryController::goToItem): (WebCore::HistoryController::setDefersLoading): (WebCore::HistoryController::recursiveGoToItem): * loader/HistoryController.h: * loader/NavigationPolicyCheck.h: * page/Page.cpp: (WebCore::Page::goToItem): * page/Page.h: Source/WebKit: This takes the initial work of "process swap a normal navigation" and extends it to process swapping for back/forward item navigations. * Scripts/webkit/messages.py: Make sure state objects are serialized to the UI Process back/forward list items, as otherwise they will be lost in process-swap scenarios: * Shared/SessionState.cpp: (WebKit::PageState::encode const): (WebKit::PageState::decode): * Shared/SessionState.h: Make a new variant of APINavigation specifically for back/forward list items. * UIProcess/API/APINavigation.cpp: (API::Navigation::Navigation): (API::Navigation::loggingURL const): * UIProcess/API/APINavigation.h: (API::Navigation::create): (API::Navigation::backForwardListItem): (API::Navigation::backForwardFrameLoadType const): * UIProcess/API/C/WKPage.cpp: (WKPageGoToBackForwardListItem): * UIProcess/API/Cocoa/WKBrowsingContextController.mm: (-[WKBrowsingContextController goToBackForwardListItem:]): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView goToBackForwardListItem:]): * UIProcess/WebNavigationState.cpp: (WebKit::WebNavigationState::createLoadRequestNavigation): (WebKit::WebNavigationState::createBackForwardNavigation): * UIProcess/WebNavigationState.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcessForReload): (WebKit::WebPageProxy::reattachToWebProcessWithItem): (WebKit::WebPageProxy::goForward): (WebKit::WebPageProxy::goBack): (WebKit::WebPageProxy::goToBackForwardItem): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::continueNavigationInNewProcess): Handle back/forward navigations differently than others. (WebKit::WebPageProxy::restoreFromSessionState): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::addOrUpdateBackForwardItem): Renamed from "addBackForwardItem" for clarity (WebKit::WebProcessProxy::addBackForwardItem): Deleted. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::endSwipeGesture): * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::endSwipeGesture): * WebProcess/WebCoreSupport/SessionStateConversion.cpp: (WebKit::toPageState): (WebKit::toHistoryItem): * WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::updateBackForwardItem): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::goToBackForwardItem): Combined "goBack" and "goForward" with this method, passing the appropriate FrameLoadType around as needed to remember the specific type. (WebKit::WebPage::goForward): Deleted. (WebKit::WebPage::goBack): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _loadBackForwardListFromOtherView:]): (-[WebView goToBackForwardItem:]): Source/WebKitLegacy/win: * WebView.cpp: (WebView::goToBackForwardItem): (WebView::loadBackForwardListFromOtherView): Tools: Add a new API test that does some process-swapping navigations (including a back navigation) and verifies the state of the engine afterwards. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]): (-[PSONScheme initWithBytes:]): (-[PSONScheme webView:startURLSchemeTask:]): (log): (function): (TEST): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/history/BackForwardController.cpp trunk/Source/WebCore/history/History
[webkit-changes] [229778] trunk
Title: [229778] trunk Revision 229778 Author beid...@apple.com Date 2018-03-20 17:05:58 -0700 (Tue, 20 Mar 2018) Log Message First piece of process swapping on navigation. https://bugs.webkit.org/show_bug.cgi?id=183665 Reviewed by Andy Estes. Source/WebCore: Covered by API test(s) This patch: - A new PolicyAction::Suspend for future use in this feature - Makes sure that loads triggered as part of a process swap do *not* re-consult the policy delegate * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::continueAfterContentPolicy): * loader/FrameLoadRequest.h: (WebCore::FrameLoadRequest::setShouldCheckNavigationPolicy): (WebCore::FrameLoadRequest::shouldCheckNavigationPolicy const): * loader/FrameLoader.cpp: (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithDocumentLoader): * loader/FrameLoader.h: * loader/FrameLoaderTypes.h: Add a new Policy type "Suspend" to be used in the future by the process-swap-on-navigation mechanism. * loader/PolicyChecker.cpp: (WebCore::PolicyChecker::checkNavigationPolicy): (WebCore::PolicyChecker::checkNewWindowPolicy): Source/WebKit: This patch adds the first pieces of the following feature: "When a navigation originating inside a WKWebView goes to a different origin, swap to a new WebProcess for that navigation" There are significant bugs to be resolved and significant optimizations to be made. Which is why the feature is disabled by default. Besides the core logic implementing the feature, this patch does a lot of related work such as: - Removing some now-invalid ASSERTs - Adding some ASSERTs - Update various switch states to handle the new "Suspend" policy and "NavigationSwap" process termination reason * NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): * NetworkProcess/capture/NetworkDataTaskReplay.cpp: (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (toNSURLSessionResponseDisposition): * Platform/Logging.h: * Shared/LoadParameters.cpp: (WebKit::LoadParameters::encode const): (WebKit::LoadParameters::decode): * Shared/LoadParameters.h: * Shared/ProcessTerminationReason.h: Add "NavigationSwap" as a process termination reason. * UIProcess/API/APINavigation.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): * UIProcess/Cocoa/NavigationState.mm: (WebKit::wkProcessTerminationReason): * UIProcess/WebFramePolicyListenerProxy.cpp: (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy): * UIProcess/WebFramePolicyListenerProxy.h: (WebKit::WebFramePolicyListenerProxy::create): (WebKit::WebFramePolicyListenerProxy::policyListenerType const): * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::setUpPolicyListenerProxy): (WebKit::WebFrameProxy::activePolicyListenerProxy): * UIProcess/WebFrameProxy.h: * UIProcess/WebNavigationState.cpp: (WebKit::WebNavigationState::navigation): (WebKit::WebNavigationState::takeNavigation): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): (WebKit::WebPageProxy::attachToProcessForNavigation): Pretend that the existing process terminated using the new "NavigationSwap" reason, then manually start the next load. (WebKit::WebPageProxy::loadRequest): (WebKit::WebPageProxy::loadRequestWithNavigation): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::processDidTerminate): (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::resetStateAfterProcessExited): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processForNavigation): Determine which process should be used for a proposed navigation, creating a new one if necessary. * UIProcess/WebProcessPool.h: * UIProcess/WebStorage/StorageManager.cpp: (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadRequest): Tools: Expose the "swaps processes on navigation" setting in MiniBrowser UI for testing: * MiniBrowser/mac/AppDelegate.m: (defaultConfiguration): * MiniBrowser/mac/SettingsController.h: * MiniBrowser/mac/SettingsController.m: (-[SettingsController _populateMenu]): (-[SettingsController validateMenuItem:]): (-[SettingsController processSwapOnNavigationEnabled]): (-[SettingsController toggleProcessSwapOnNavigation:]): Makes sure the current behavior is tested: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Added. (-[PSONNavigationDelegate webView:didFinishNavigation:]): (-[PSONScheme webView:startURLSchemeTask:]): (-[PSONScheme webView:stopURLSchemeTask:]): (TEST): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/
[webkit-changes] [229733] trunk/LayoutTests
Title: [229733] trunk/LayoutTests Revision 229733 Author beid...@apple.com Date 2018-03-19 19:27:57 -0700 (Mon, 19 Mar 2018) Log Message Add a layout test verifying AppCache resource fetches have the document's cookie in place. https://bugs.webkit.org/show_bug.cgi?id=183757 Reviewed by Alex Christensen. * http/tests/appcache/document-cookie-expected.txt: Added. * http/tests/appcache/document-cookie.php: Added. * http/tests/appcache/resources/cookie-protected-script.php: Added. * http/tests/appcache/resources/document-cookie.manifest: Added. Modified Paths trunk/LayoutTests/ChangeLog Added Paths trunk/LayoutTests/http/tests/appcache/document-cookie-expected.txt trunk/LayoutTests/http/tests/appcache/document-cookie.php trunk/LayoutTests/http/tests/appcache/resources/cookie-protected-script.php trunk/LayoutTests/http/tests/appcache/resources/document-cookie.manifest Diff Modified: trunk/LayoutTests/ChangeLog (229732 => 229733) --- trunk/LayoutTests/ChangeLog 2018-03-20 01:56:45 UTC (rev 229732) +++ trunk/LayoutTests/ChangeLog 2018-03-20 02:27:57 UTC (rev 229733) @@ -1,3 +1,15 @@ +2018-03-19 Brady Eidson + +Add a layout test verifying AppCache resource fetches have the document's cookie in place. +https://bugs.webkit.org/show_bug.cgi?id=183757 + +Reviewed by Alex Christensen. + +* http/tests/appcache/document-cookie-expected.txt: Added. +* http/tests/appcache/document-cookie.php: Added. +* http/tests/appcache/resources/cookie-protected-script.php: Added. +* http/tests/appcache/resources/document-cookie.manifest: Added. + 2018-03-19 Chris Dumez Make policy decisions asynchronous Added: trunk/LayoutTests/http/tests/appcache/document-cookie-expected.txt (0 => 229733) --- trunk/LayoutTests/http/tests/appcache/document-cookie-expected.txt (rev 0) +++ trunk/LayoutTests/http/tests/appcache/document-cookie-expected.txt 2018-03-20 02:27:57 UTC (rev 229733) @@ -0,0 +1,3 @@ +CONSOLE MESSAGE: line 1: ApplicationCache is deprecated. Please use ServiceWorkers instead. +This tests that cookies set on the main document are used when accessing resources in the manifest. +PASSED: Cookie is set to 'bar' Added: trunk/LayoutTests/http/tests/appcache/document-cookie.php (0 => 229733) --- trunk/LayoutTests/http/tests/appcache/document-cookie.php (rev 0) +++ trunk/LayoutTests/http/tests/appcache/document-cookie.php 2018-03-20 02:27:57 UTC (rev 229733) @@ -0,0 +1,28 @@ + + + +This tests that cookies set on the main document are used when accessing resources in the manifest. +Not run yet + +if (window.testRunner) { +testRunner.dumpAsText() +testRunner.waitUntilDone(); +} + +function dynamicScriptLoad() { + var script = document.createElement("script"); + script.type = "text/_javascript_"; + script.src = "" + document.getElementsByTagName("head")[0].appendChild(script); +} + +function cached() +{ + setTimeout("dynamicScriptLoad();", 0); +} + +applicationCache.addEventListener('cached', cached, false); + + Added: trunk/LayoutTests/http/tests/appcache/resources/cookie-protected-script.php (0 => 229733) --- trunk/LayoutTests/http/tests/appcache/resources/cookie-protected-script.php (rev 0) +++ trunk/LayoutTests/http/tests/appcache/resources/cookie-protected-script.php 2018-03-20 02:27:57 UTC (rev 229733) @@ -0,0 +1,18 @@ +';"; +} + +?> + +if (cookieVal == "bar") + document.getElementById("result").innerHTML = "PASSED: Cookie is set to 'bar'"; +else + document.getElementById("result").innerHTML = "FAILED: Cookie should be 'bar', is set to '" + cookieVal + "'"; + +if (window.testRunner) + testRunner.notifyDone(); Added: trunk/LayoutTests/http/tests/appcache/resources/document-cookie.manifest (0 => 229733) --- trunk/LayoutTests/http/tests/appcache/resources/document-cookie.manifest (rev 0) +++ trunk/LayoutTests/http/tests/appcache/resources/document-cookie.manifest 2018-03-20 02:27:57 UTC (rev 229733) @@ -0,0 +1,4 @@ +CACHE MANIFEST +/appcache/resources/cookie-protected-script.php +NETWORK: +/favicon.ico ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [228723] trunk/Source/WebKit
Title: [228723] trunk/Source/WebKit Revision 228723 Author beid...@apple.com Date 2018-02-19 18:12:04 -0800 (Mon, 19 Feb 2018) Log Message Add WebProcessPool option for process swapping on navigation. https://bugs.webkit.org/show_bug.cgi?id=182945 Reviewed by Alex Christensen. Just the most basic groundwork for testing a new WK2 feature. * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationProcessSwapsOnNavigation): (WKContextConfigurationSetProcessSwapsOnNavigation): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: (-[_WKProcessPoolConfiguration setProcessSwapsOnNavigation:]): (-[_WKProcessPoolConfiguration processSwapsOnNavigation]): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm Diff Modified: trunk/Source/WebKit/ChangeLog (228722 => 228723) --- trunk/Source/WebKit/ChangeLog 2018-02-20 02:04:30 UTC (rev 228722) +++ trunk/Source/WebKit/ChangeLog 2018-02-20 02:12:04 UTC (rev 228723) @@ -1,3 +1,24 @@ +2018-02-19 Brady Eidson + +Add WebProcessPool option for process swapping on navigation. +https://bugs.webkit.org/show_bug.cgi?id=182945 + +Reviewed by Alex Christensen. + +Just the most basic groundwork for testing a new WK2 feature. + +* UIProcess/API/APIProcessPoolConfiguration.h: + +* UIProcess/API/C/WKContextConfigurationRef.cpp: +(WKContextConfigurationProcessSwapsOnNavigation): +(WKContextConfigurationSetProcessSwapsOnNavigation): +* UIProcess/API/C/WKContextConfigurationRef.h: + +* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: +* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: +(-[_WKProcessPoolConfiguration setProcessSwapsOnNavigation:]): +(-[_WKProcessPoolConfiguration processSwapsOnNavigation]): + 2018-02-19 Daniel Bates Null pointer dereference in WebPageProxy::urlSchemeHandlerForScheme() Modified: trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h (228722 => 228723) --- trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h 2018-02-20 02:04:30 UTC (rev 228722) +++ trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h 2018-02-20 02:12:04 UTC (rev 228723) @@ -135,6 +135,9 @@ ProcessID presentingApplicationPID() const { return m_presentingApplicationPID; } void setPresentingApplicationPID(ProcessID pid) { m_presentingApplicationPID = pid; } +bool processSwapsOnNavigation() const { return m_processSwapsOnNavigation; } +void setProcessSwapsOnNavigation(bool swaps) { m_processSwapsOnNavigation = swaps; } + private: bool m_shouldHaveLegacyDataStore { false }; @@ -166,6 +169,8 @@ bool m_shouldTakeUIBackgroundAssertion { true }; bool m_shouldCaptureAudioInUIProcess { false }; ProcessID m_presentingApplicationPID { getCurrentProcessID() }; +bool m_processSwapsOnNavigation { false }; + #if PLATFORM(IOS) WTF::String m_ctDataConnectionServiceType; #endif Modified: trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp (228722 => 228723) --- trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp 2018-02-20 02:04:30 UTC (rev 228722) +++ trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp 2018-02-20 02:12:04 UTC (rev 228723) @@ -157,3 +157,13 @@ { toImpl(configuration)->setShouldCaptureAudioInUIProcess(should); } + +bool WKContextConfigurationProcessSwapsOnNavigation(WKContextConfigurationRef configuration) +{ +return toImpl(configuration)->processSwapsOnNavigation(); +} + +void WKContextConfigurationSetProcessSwapsOnNavigation(WKContextConfigurationRef configuration, bool swaps) +{ +toImpl(configuration)->setProcessSwapsOnNavigation(swaps); +} Modified: trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h (228722 => 228723) --- trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h 2018-02-20 02:04:30 UTC (rev 228722) +++ trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h 2018-02-20 02:12:04 UTC (rev 228723) @@ -68,6 +68,9 @@ WK_EXPORT bool WKContextConfigurationShouldCaptureAudioInUIProcess(WKContextConfigurationRef configuration); WK_EXPORT void WKContextConfigurationSetShouldCaptureAudioInUIProcess(WKContextConfigurationRef configuration, bool allowed); +WK_EXPORT bool WKContextConfigurationProcessSwapsOnNavigation(WKContextConfigurationRef configuration); +WK_EXPORT void WKContextConfigurationSetProcessSwapsOnNavigation(WKContextConfigurationRef configuration, bool swaps); + #ifdef
[webkit-changes] [227748] trunk/Tools
Title: [227748] trunk/Tools Revision 227748 Author beid...@apple.com Date 2018-01-29 12:34:38 -0800 (Mon, 29 Jan 2018) Log Message Make the API test added in r227737 be Mac-only. Unreviewed gardening. * TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm: Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm Diff Modified: trunk/Tools/ChangeLog (227747 => 227748) --- trunk/Tools/ChangeLog 2018-01-29 20:31:06 UTC (rev 227747) +++ trunk/Tools/ChangeLog 2018-01-29 20:34:38 UTC (rev 227748) @@ -1,3 +1,11 @@ +2018-01-29 Brady Eidson + +Make the API test added in r227737 be Mac-only. + +Unreviewed gardening. + +* TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm: + 2018-01-29 Matt Lewis Unreviewed, rolling out r227731. Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm (227747 => 227748) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm 2018-01-29 20:31:06 UTC (rev 227747) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm 2018-01-29 20:34:38 UTC (rev 227748) @@ -25,7 +25,7 @@ #import "config.h" -#if WK_API_ENABLED +#if WK_API_ENABLED && PLATFORM(MAC) #import "PlatformUtilities.h" #import "TestWKWebView.h" @@ -68,4 +68,4 @@ } // namespace TestWebKitAPI -#endif // WK_API_ENABLED +#endif // WK_API_ENABLED && PLATFORM(MAC) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [227737] trunk
Title: [227737] trunk Revision 227737 Author beid...@apple.com Date 2018-01-29 09:45:17 -0800 (Mon, 29 Jan 2018) Log Message Make it possible for apps that use both WK1 and WK2 to use MessagePorts. https://bugs.webkit.org/show_bug.cgi?id=182229 Reviewed by Chris Dumez. Source/WebCore: Covered by existing LayoutTests and a new API test. * dom/messageports/MessagePortChannel.cpp: (WebCore::MessagePortChannel::checkRemotePortForActivity): Don't use the global singleton provider. Instead use the provider that belongs to the owning registry. * dom/messageports/MessagePortChannelProviderImpl.cpp: (WebCore::MessagePortChannelProviderImpl::MessagePortChannelProviderImpl): Pass a reference to *this to the Registry. * dom/messageports/MessagePortChannelProviderImpl.h: * dom/messageports/MessagePortChannelRegistry.cpp: (WebCore::MessagePortChannelRegistry::MessagePortChannelRegistry): Keep a Provider member so MessagePortChannels can get to it instead of relying on the global singleton provider. * dom/messageports/MessagePortChannelRegistry.h: (WebCore::MessagePortChannelRegistry::provider): Source/WebKit: * UIProcess/UIMessagePortChannelProvider.cpp: (WebKit::UIMessagePortChannelProvider::UIMessagePortChannelProvider): * UIProcess/WebPageProxy.cpp: (WebKit::m_configurationPreferenceValues): The UI process does not need to override the global singleton provider. It can remain the default ProviderImpl to allow WK1 views to work fine, too. Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm: Added. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/messageports/MessagePortChannel.cpp trunk/Source/WebCore/dom/messageports/MessagePortChannelProviderImpl.cpp trunk/Source/WebCore/dom/messageports/MessagePortChannelProviderImpl.h trunk/Source/WebCore/dom/messageports/MessagePortChannelRegistry.cpp trunk/Source/WebCore/dom/messageports/MessagePortChannelRegistry.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/UIMessagePortChannelProvider.cpp trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm Diff Modified: trunk/Source/WebCore/ChangeLog (227736 => 227737) --- trunk/Source/WebCore/ChangeLog 2018-01-29 17:07:22 UTC (rev 227736) +++ trunk/Source/WebCore/ChangeLog 2018-01-29 17:45:17 UTC (rev 227737) @@ -1,3 +1,27 @@ +2018-01-29 Brady Eidson + +Make it possible for apps that use both WK1 and WK2 to use MessagePorts. +https://bugs.webkit.org/show_bug.cgi?id=182229 + +Reviewed by Chris Dumez. + +Covered by existing LayoutTests and a new API test. + +* dom/messageports/MessagePortChannel.cpp: +(WebCore::MessagePortChannel::checkRemotePortForActivity): Don't use the global singleton + provider. Instead use the provider that belongs to the owning registry. + +* dom/messageports/MessagePortChannelProviderImpl.cpp: +(WebCore::MessagePortChannelProviderImpl::MessagePortChannelProviderImpl): Pass a reference + to *this to the Registry. +* dom/messageports/MessagePortChannelProviderImpl.h: + +* dom/messageports/MessagePortChannelRegistry.cpp: +(WebCore::MessagePortChannelRegistry::MessagePortChannelRegistry): Keep a Provider member so + MessagePortChannels can get to it instead of relying on the global singleton provider. +* dom/messageports/MessagePortChannelRegistry.h: +(WebCore::MessagePortChannelRegistry::provider): + 2018-01-29 Per Arne Vollan Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing Modified: trunk/Source/WebCore/dom/messageports/MessagePortChannel.cpp (227736 => 227737) --- trunk/Source/WebCore/dom/messageports/MessagePortChannel.cpp 2018-01-29 17:07:22 UTC (rev 227736) +++ trunk/Source/WebCore/dom/messageports/MessagePortChannel.cpp 2018-01-29 17:45:17 UTC (rev 227737) @@ -240,7 +240,7 @@ callback(hasActivity); } }; -MessagePortChannelProvider::singleton().checkProcessLocalPortForActivity(remotePort, *m_processes[i], WTFMove(outerCallback)); +m_registry.provider().checkProcessLocalPortForActivity(remotePort, *m_processes[i], WTFMove(outerCallback)); } bool MessagePortChannel::hasAnyMessagesPendingOrInFlight() const Modified: trunk/Source/WebCore/dom/messageports/MessagePortChannelProviderImpl.cpp (227736 => 227737) --- trunk/Source/WebCore/dom/messageports/MessagePortChannelProviderImpl.cpp 2018-01-29 17:07:22 UTC (rev 227736) +++ trunk/Source/WebCore/dom/messageports/MessagePortChannelProviderImpl.cpp 2018-01-29 17:45:17 UTC (rev 227737) @@ -33,6 +33,11 @@ namespace WebCore { +MessagePortChannelProviderImpl::MessagePortChannelProviderImpl() +: m_registry(*this) +{ +} + MessagePortChannelProviderImpl::
[webkit-changes] [227425] trunk
Title: [227425] trunk Revision 227425 Author beid...@apple.com Date 2018-01-23 11:24:23 -0800 (Tue, 23 Jan 2018) Log Message Allow passing MessagePorts across processes (e.g. ServiceWorkers). https://bugs.webkit.org/show_bug.cgi?id=181178 Reviewed by Andy Estes. LayoutTests/imported/w3c: Re-baseline for many new passes and a few new failure modes. * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event.https-expected.txt: * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/postmessage.https-expected.txt: * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/registration-attribute.https-expected.txt: * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/unregister.https-expected.txt: * web-platform-tests/service-workers/service-worker/claim-affect-other-registration.https-expected.txt: * web-platform-tests/service-workers/service-worker/claim-fetch.https-expected.txt: * web-platform-tests/service-workers/service-worker/claim-not-using-registration.https-expected.txt: * web-platform-tests/service-workers/service-worker/claim-using-registration.https-expected.txt: * web-platform-tests/service-workers/service-worker/claim-worker-fetch.https-expected.txt: * web-platform-tests/service-workers/service-worker/client-id.https-expected.txt: * web-platform-tests/service-workers/service-worker/clients-get-cross-origin.https-expected.txt: * web-platform-tests/service-workers/service-worker/clients-get.https-expected.txt: * web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https-expected.txt: * web-platform-tests/service-workers/service-worker/clients-matchall-exact-controller.https-expected.txt: * web-platform-tests/service-workers/service-worker/clients-matchall-order.https-expected.txt: * web-platform-tests/service-workers/service-worker/clients-matchall.https-expected.txt: * web-platform-tests/service-workers/service-worker/extendable-event-async-waituntil.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-event-async-respond-with.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-event-respond-with-stops-propagation.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-event-throws-after-respond-with.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-request-css-base-url.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-request-css-images.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-request-fallback.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-request-no-freshness-headers.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt: * web-platform-tests/service-workers/service-worker/immutable-prototype-serviceworker.https-expected.txt: * web-platform-tests/service-workers/service-worker/registration-end-to-end.https-expected.txt: * web-platform-tests/service-workers/service-worker/registration-events.https-expected.txt: * web-platform-tests/service-workers/service-worker/skip-waiting-installed.https-expected.txt: Source/WebCore: Test: http/tests/workers/service/basic-messageport.html * dom/MessagePort.cpp: (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::~MessagePort): * dom/messageports/MessagePortChannel.cpp: (WebCore::MessagePortChannel::entanglePortWithProcess): * dom/messageports/MessagePortChannel.h: * workers/service/SWClientConnection.cpp: (WebCore::SWClientConnection::postMessageToServiceWorkerClient): * workers/service/SWClientConnection.h: * workers/service/ServiceWorker.cpp: (WebCore::ServiceWorker::postMessage): * workers/service/ServiceWorkerClient.cpp: (WebCore::ServiceWorkerClient::postMessage): * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::postMessageToServiceWorker): * workers/service/context/SWContextManager.h: Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::postMessageToServiceWorker): (WebKit::WebSWServerConnection::postMessageToServiceWorkerClient): * StorageProcess/ServiceWorker/WebSWServerConnection.h: * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::postMessageToServiceWorkerClient): * StorageProcess/StorageProcess.h: * StorageProcess/StorageProcess.messages.in: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::entangleLocalPortInThisProcessToRemote): (WebKit::WebProcessProxy::postMessageToRemote): * WebProcess/Storage/WebSWClientConnection.cpp: (WebKit::WebSWClientConnection::postMessageToServiceWorker): (WebKit::WebSWClientConnection::postMessageToServiceWorkerClient): * WebProcess/Storage/WebSWClientConnection.h: * WebProcess/Storage/WebSWClientConnection.messages.in: * WebProcess/Sto
[webkit-changes] [227340] trunk/Source
Title: [227340] trunk/Source Revision 227340 Author beid...@apple.com Date 2018-01-22 10:35:23 -0800 (Mon, 22 Jan 2018) Log Message In WebKit2, make the MessagePortChannelRegistry live in the UI process. https://bugs.webkit.org/show_bug.cgi?id=181922 Reviewed by Andy Estes. Source/WebCore: No new tests (Refactor, no behavior change) Add encoder/decoders and EXPORT a whole bunch of stuff. * WebCore.xcodeproj/project.pbxproj: * dom/MessagePort.h: * dom/messageports/MessagePortChannel.cpp: (WebCore::MessagePortChannel::processForPort): * dom/messageports/MessagePortChannel.h: * dom/messageports/MessagePortChannelProvider.h: * dom/messageports/MessagePortChannelRegistry.h: * dom/messageports/MessageWithMessagePorts.h: (WebCore::MessageWithMessagePorts::encode const): (WebCore::MessageWithMessagePorts::decode): Source/WebKit: With all of the work that went into making MessagePorts be fully asynchronous and to be process-aware, formally moving them out-of-process is just a matter of adding WebKit IPC layers. The basic unit of asynchronicity is "MessagePortChannelProvider", and this patch adds both a WebMessagePortChannelProvider and UIMessagePortChannelProvider for each side of the process divide. * UIProcess/UIMessagePortChannelProvider.cpp: Added. (WebKit::UIMessagePortChannelProvider::singleton): (WebKit::UIMessagePortChannelProvider::UIMessagePortChannelProvider): (WebKit::UIMessagePortChannelProvider::~UIMessagePortChannelProvider): (WebKit::UIMessagePortChannelProvider::createNewMessagePortChannel): (WebKit::UIMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote): (WebKit::UIMessagePortChannelProvider::messagePortDisentangled): (WebKit::UIMessagePortChannelProvider::messagePortClosed): (WebKit::UIMessagePortChannelProvider::takeAllMessagesForPort): (WebKit::UIMessagePortChannelProvider::postMessageToRemote): (WebKit::UIMessagePortChannelProvider::checkRemotePortForActivity): (WebKit::UIMessagePortChannelProvider::checkProcessLocalPortForActivity): * UIProcess/UIMessagePortChannelProvider.h: Added. (WebKit::UIMessagePortChannelProvider::registry): * UIProcess/WebPageProxy.cpp: (WebKit::m_configurationPreferenceValues): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::processForIdentifier): (WebKit::m_userMediaCaptureManagerProxy): (WebKit::WebProcessProxy::~WebProcessProxy): (WebKit::WebProcessProxy::shutDown): (WebKit::WebProcessProxy::createNewMessagePortChannel): (WebKit::WebProcessProxy::entangleLocalPortInThisProcessToRemote): (WebKit::WebProcessProxy::messagePortDisentangled): (WebKit::WebProcessProxy::messagePortClosed): (WebKit::WebProcessProxy::takeAllMessagesForPort): (WebKit::WebProcessProxy::didDeliverMessagePortMessages): (WebKit::WebProcessProxy::postMessageToRemote): (WebKit::WebProcessProxy::checkRemotePortForActivity): (WebKit::WebProcessProxy::checkProcessLocalPortForActivity): (WebKit::WebProcessProxy::didCheckProcessLocalPortForActivity): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp: Added. (WebKit::WebMessagePortChannelProvider::singleton): (WebKit::WebMessagePortChannelProvider::WebMessagePortChannelProvider): (WebKit::WebMessagePortChannelProvider::~WebMessagePortChannelProvider): (WebKit::WebMessagePortChannelProvider::createNewMessagePortChannel): (WebKit::WebMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote): (WebKit::WebMessagePortChannelProvider::messagePortDisentangled): (WebKit::WebMessagePortChannelProvider::messagePortClosed): (WebKit::WebMessagePortChannelProvider::takeAllMessagesForPort): (WebKit::WebMessagePortChannelProvider::didTakeAllMessagesForPort): (WebKit::WebMessagePortChannelProvider::didCheckRemotePortForActivity): (WebKit::WebMessagePortChannelProvider::postMessageToRemote): (WebKit::WebMessagePortChannelProvider::checkProcessLocalPortForActivity): (WebKit::WebMessagePortChannelProvider::checkRemotePortForActivity): * WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeProcess): (WebKit::WebProcess::didTakeAllMessagesForPort): (WebKit::WebProcess::checkProcessLocalPortForActivity): (WebKit::WebProcess::didCheckRemotePortForActivity): (WebKit::WebProcess::messagesAvailableForPort): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/dom/MessagePort.h trunk/Source/WebCore/dom/messageports/MessagePortChannel.cpp trunk/Source/WebCore/dom/messageports/MessagePortChannel.h trunk/Source/WebCore/dom/messageports/MessagePortChannelProvider.h trunk/Source/WebCore/dom/messageports/MessagePortChannelRegistry.h trunk/Source/WebCore/dom/messageports/MessageWithMessagePorts.h trunk/Source/WebKit/CMakeLists.txt trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebPageProx
[webkit-changes] [227275] trunk/Source/WebCore
Title: [227275] trunk/Source/WebCore Revision 227275 Author beid...@apple.com Date 2018-01-20 23:07:49 -0800 (Sat, 20 Jan 2018) Log Message Make garbage collection of MessagePort objects be asynchronous. https://bugs.webkit.org/show_bug.cgi?id=181910 Reviewed by Andy Estes. No new tests (Covered by existing tests, including GC-specific ones). The basic premise here is as follows: - You can *always* GC a MessagePort that is closed - You can *always* GC a MessagePort that has no onmessage handler, as incoming messages cannot possibly revive it. - You can GC a MessagePort, even if it has a message handler, as long as there are no messages in flight between it and the remote port, and as long as the remote port is "maybe eligible for GC." A MessagePort is considered "maybe eligible for GC" once hasPendingActivity is asked once. A MessagePort loses "maybe eligible for GC" status once it is used for sending or receiving a message. The changes to MessagePort.cpp implement the above with a tiny little bool-driven state machine. * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): (WebCore::MessagePort::disentangle): (WebCore::MessagePort::registerLocalActivity): (WebCore::MessagePort::start): (WebCore::MessagePort::close): (WebCore::MessagePort::contextDestroyed): (WebCore::MessagePort::dispatchMessages): (WebCore::MessagePort::hasPendingActivity const): (WebCore::MessagePort::isLocallyReachable const): (WebCore::MessagePort::addEventListener): (WebCore::MessagePort::removeEventListener): * dom/MessagePort.h: - Remove the lock and any background-thread code paths - Add ASSERT(isMainThread())s throughout * dom/messageports/MessagePortChannel.cpp: (WebCore::MessagePortChannel::MessagePortChannel): (WebCore::MessagePortChannel::includesPort): (WebCore::MessagePortChannel::entanglePortWithProcess): (WebCore::MessagePortChannel::disentanglePort): (WebCore::MessagePortChannel::closePort): (WebCore::MessagePortChannel::postMessageToRemote): (WebCore::MessagePortChannel::takeAllMessagesForPort): (WebCore::MessagePortChannel::checkRemotePortForActivity): (WebCore::MessagePortChannel::hasAnyMessagesPendingOrInFlight const): * dom/messageports/MessagePortChannel.h: Add a callback for a MessagePortChannel to go ask the remote MessagePort object about local activity: * dom/messageports/MessagePortChannelProvider.h: * dom/messageports/MessagePortChannelProviderImpl.cpp: (WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity): (WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity): (WebCore::MessagePortChannelProviderImpl::hasMessagesForPorts_temporarySync): Deleted. * dom/messageports/MessagePortChannelProviderImpl.h: - Remove the lock and any background-thread code paths - Add ASSERT(isMainThread())s throughout * dom/messageports/MessagePortChannelRegistry.cpp: (WebCore::MessagePortChannelRegistry::messagePortChannelCreated): (WebCore::MessagePortChannelRegistry::messagePortChannelDestroyed): (WebCore::MessagePortChannelRegistry::didEntangleLocalToRemote): (WebCore::MessagePortChannelRegistry::didDisentangleMessagePort): (WebCore::MessagePortChannelRegistry::didCloseMessagePort): (WebCore::MessagePortChannelRegistry::didPostMessageToRemote): (WebCore::MessagePortChannelRegistry::takeAllMessagesForPort): (WebCore::MessagePortChannelRegistry::checkRemotePortForActivity): (WebCore::MessagePortChannelRegistry::existingChannelContainingPort): (WebCore::MessagePortChannelRegistry::hasMessagesForPorts_temporarySync): Deleted. * dom/messageports/MessagePortChannelRegistry.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/MessagePort.cpp trunk/Source/WebCore/dom/MessagePort.h trunk/Source/WebCore/dom/messageports/MessagePortChannel.cpp trunk/Source/WebCore/dom/messageports/MessagePortChannel.h trunk/Source/WebCore/dom/messageports/MessagePortChannelProvider.h trunk/Source/WebCore/dom/messageports/MessagePortChannelProviderImpl.cpp trunk/Source/WebCore/dom/messageports/MessagePortChannelProviderImpl.h trunk/Source/WebCore/dom/messageports/MessagePortChannelRegistry.cpp trunk/Source/WebCore/dom/messageports/MessagePortChannelRegistry.h Diff Modified: trunk/Source/WebCore/ChangeLog (227274 => 227275) --- trunk/Source/WebCore/ChangeLog 2018-01-21 04:29:46 UTC (rev 227274) +++ trunk/Source/WebCore/ChangeLog 2018-01-21 07:07:49 UTC (rev 227275) @@ -1,3 +1,75 @@ +2018-01-20 Brady Eidson + +Make garbage collection of MessagePort objects be asynchronous. +https://bugs.webkit.org/show_bug.cgi?id=181910 + +Reviewed by Andy Estes. + +No new tests (Covered by existing tests, including GC-specific ones). + +The basic premise here is as follows: +- You can *always* GC a MessagePort that is closed +- You can *always* GC a MessagePort that has no onmessage handler, as incoming messages cannot + possibly revive it. +- You can GC a MessagePort, even if it has a message handler, as lo
[webkit-changes] [226343] trunk/Source/WebCore
Title: [226343] trunk/Source/WebCore Revision 226343 Author beid...@apple.com Date 2018-01-02 16:51:01 -0800 (Tue, 02 Jan 2018) Log Message Make MessagePortChannel::takeAllMessagesFromRemote asynchronous. https://bugs.webkit.org/show_bug.cgi?id=181205 Reviewed by Alex Christensen. No new tests (No behavior change) This is needed for the ongoing WK2 MessagePort work. For WK1 in-process MessagePorts it is still synchronous; no behavior change. * dom/InProcessMessagePortChannel.cpp: (WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote): * dom/InProcessMessagePortChannel.h: * dom/MessagePort.cpp: (WebCore::MessagePort::dispatchMessages): * dom/MessagePortChannel.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/InProcessMessagePortChannel.cpp trunk/Source/WebCore/dom/InProcessMessagePortChannel.h trunk/Source/WebCore/dom/MessagePort.cpp trunk/Source/WebCore/dom/MessagePortChannel.h Diff Modified: trunk/Source/WebCore/ChangeLog (226342 => 226343) --- trunk/Source/WebCore/ChangeLog 2018-01-03 00:20:48 UTC (rev 226342) +++ trunk/Source/WebCore/ChangeLog 2018-01-03 00:51:01 UTC (rev 226343) @@ -1,3 +1,24 @@ +2018-01-02 Brady Eidson + +Make MessagePortChannel::takeAllMessagesFromRemote asynchronous. +https://bugs.webkit.org/show_bug.cgi?id=181205 + +Reviewed by Alex Christensen. + +No new tests (No behavior change) + +This is needed for the ongoing WK2 MessagePort work. + +For WK1 in-process MessagePorts it is still synchronous; no behavior change. + +* dom/InProcessMessagePortChannel.cpp: +(WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote): +* dom/InProcessMessagePortChannel.h: + +* dom/MessagePort.cpp: +(WebCore::MessagePort::dispatchMessages): +* dom/MessagePortChannel.h: + 2018-01-02 Jiewen Tan Add a WebAuthentication runtime feature flag Modified: trunk/Source/WebCore/dom/InProcessMessagePortChannel.cpp (226342 => 226343) --- trunk/Source/WebCore/dom/InProcessMessagePortChannel.cpp 2018-01-03 00:20:48 UTC (rev 226342) +++ trunk/Source/WebCore/dom/InProcessMessagePortChannel.cpp 2018-01-03 00:51:01 UTC (rev 226343) @@ -27,6 +27,7 @@ #include "InProcessMessagePortChannel.h" #include "MessagePort.h" +#include #include namespace WebCore { @@ -75,10 +76,15 @@ m_remotePort->messageAvailable(); } -Deque> InProcessMessagePortChannel::takeAllMessagesFromRemote() +void InProcessMessagePortChannel::takeAllMessagesFromRemote(CompletionHandler>&&)>&& callback) { -Locker locker(m_lock); -return m_incomingQueue->takeAllMessages(); +Deque> messages; +{ +Locker locker(m_lock); +messages = m_incomingQueue->takeAllMessages(); +} + +callback(WTFMove(messages)); } bool InProcessMessagePortChannel::isConnectedTo(const MessagePortIdentifier& identifier) Modified: trunk/Source/WebCore/dom/InProcessMessagePortChannel.h (226342 => 226343) --- trunk/Source/WebCore/dom/InProcessMessagePortChannel.h 2018-01-03 00:20:48 UTC (rev 226342) +++ trunk/Source/WebCore/dom/InProcessMessagePortChannel.h 2018-01-03 00:51:01 UTC (rev 226343) @@ -37,7 +37,7 @@ ~InProcessMessagePortChannel() final; void postMessageToRemote(Ref&&, std::unique_ptr&&) final; -Deque> takeAllMessagesFromRemote() final; +void takeAllMessagesFromRemote(CompletionHandler>&&)>&&) final; bool isConnectedTo(const MessagePortIdentifier&) final; bool entangleWithRemoteIfOpen(const MessagePortIdentifier&) final; void disentangle() final; Modified: trunk/Source/WebCore/dom/MessagePort.cpp (226342 => 226343) --- trunk/Source/WebCore/dom/MessagePort.cpp 2018-01-03 00:20:48 UTC (rev 226342) +++ trunk/Source/WebCore/dom/MessagePort.cpp 2018-01-03 00:51:01 UTC (rev 226343) @@ -203,17 +203,19 @@ if (!m_entangledChannel) return; -bool contextIsWorker = is(*m_scriptExecutionContext); - -auto pendingMessages = m_entangledChannel->takeAllMessagesFromRemote(); -for (auto& message : pendingMessages) { -// close() in Worker onmessage handler should prevent next message from dispatching. -if (contextIsWorker && downcast(*m_scriptExecutionContext).isClosing()) +m_entangledChannel->takeAllMessagesFromRemote([this, protectedThis = makeRef(*this)](Deque>&& messages) { +if (!m_scriptExecutionContext) return; -auto ports = MessagePort::entanglePorts(*m_scriptExecutionContext, WTFMove(message->channels)); -dispatchEvent(MessageEvent::create(WTFMove(ports), WTFMove(message->message))); -} +bool contextIsWorker = is(*m_scriptExecutionContext); +for (auto& message : messages) { +// close() in Worker onmessage handler should prevent next message from dispatching. +if (contextIsWorker && downcast(*m_scriptExecutionContext).isClosing()) +return; +auto ports =
[webkit-changes] [226336] trunk/Source/WebCore
Title: [226336] trunk/Source/WebCore Revision 226336 Author beid...@apple.com Date 2018-01-02 14:42:16 -0800 (Tue, 02 Jan 2018) Log Message Identify MessagePorts by a globally unique MessagePortIdentifier. https://bugs.webkit.org/show_bug.cgi?id=181172 Reviewed by Alex Christensen. No new tests (Behavior change covered by all existing tests). This cleans up the abstract MessagePortChannel interface to be in terms of identifiers instead of actual MessagePort objects. The identifiers are compounded with the current ProcessIdentifier meaning they are global across all processes for the running UI process, enabling easy cross-process communication. (Actual cross-process communication comes in a followup) * WebCore.xcodeproj/project.pbxproj: * dom/InProcessMessagePortChannel.cpp: (WebCore::InProcessMessagePortChannel::createChannelBetweenPorts): (WebCore::InProcessMessagePortChannel::isConnectedTo): (WebCore::InProcessMessagePortChannel::entangleWithRemoteIfOpen): (WebCore::InProcessMessagePortChannel::entangleIfOpen): Deleted. * dom/InProcessMessagePortChannel.h: * dom/MessageChannel.cpp: (WebCore::MessageChannel::MessageChannel): (WebCore::m_port2): * dom/MessagePort.cpp: (WebCore::allMessagePortsLock): (WebCore::MessagePort::ref const): (WebCore::MessagePort::deref const): (WebCore::MessagePort::existingMessagePortForIdentifier): (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::~MessagePort): (WebCore::MessagePort::postMessage): (WebCore::MessagePort::entangleWithRemote): (WebCore::MessagePort::entanglePorts): (WebCore::MessagePort::entangle): Deleted. * dom/MessagePort.h: * dom/MessagePortChannel.h: * dom/MessagePortIdentifier.h: Added. (WebCore::operator==): (WebCore::MessagePortIdentifier::encode const): (WebCore::MessagePortIdentifier::decode): (WebCore::MessagePortIdentifier::hash const): (WTF::MessagePortIdentifierHash::hash): (WTF::MessagePortIdentifierHash::equal): (WTF::HashTraits::emptyValue): (WTF::HashTraits::constructDeletedValue): (WTF::HashTraits::isDeletedValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/dom/InProcessMessagePortChannel.cpp trunk/Source/WebCore/dom/InProcessMessagePortChannel.h trunk/Source/WebCore/dom/MessageChannel.cpp trunk/Source/WebCore/dom/MessagePort.cpp trunk/Source/WebCore/dom/MessagePort.h trunk/Source/WebCore/dom/MessagePortChannel.h Added Paths trunk/Source/WebCore/dom/MessagePortIdentifier.h Diff Modified: trunk/Source/WebCore/ChangeLog (226335 => 226336) --- trunk/Source/WebCore/ChangeLog 2018-01-02 21:06:46 UTC (rev 226335) +++ trunk/Source/WebCore/ChangeLog 2018-01-02 22:42:16 UTC (rev 226336) @@ -1,3 +1,59 @@ +2018-01-02 Brady Eidson + +Identify MessagePorts by a globally unique MessagePortIdentifier. +https://bugs.webkit.org/show_bug.cgi?id=181172 + +Reviewed by Alex Christensen. + +No new tests (Behavior change covered by all existing tests). + +This cleans up the abstract MessagePortChannel interface to be in terms of identifiers +instead of actual MessagePort objects. + +The identifiers are compounded with the current ProcessIdentifier meaning they are global +across all processes for the running UI process, enabling easy cross-process communication. + +(Actual cross-process communication comes in a followup) + +* WebCore.xcodeproj/project.pbxproj: + +* dom/InProcessMessagePortChannel.cpp: +(WebCore::InProcessMessagePortChannel::createChannelBetweenPorts): +(WebCore::InProcessMessagePortChannel::isConnectedTo): +(WebCore::InProcessMessagePortChannel::entangleWithRemoteIfOpen): +(WebCore::InProcessMessagePortChannel::entangleIfOpen): Deleted. +* dom/InProcessMessagePortChannel.h: + +* dom/MessageChannel.cpp: +(WebCore::MessageChannel::MessageChannel): +(WebCore::m_port2): + +* dom/MessagePort.cpp: +(WebCore::allMessagePortsLock): +(WebCore::MessagePort::ref const): +(WebCore::MessagePort::deref const): +(WebCore::MessagePort::existingMessagePortForIdentifier): +(WebCore::MessagePort::MessagePort): +(WebCore::MessagePort::~MessagePort): +(WebCore::MessagePort::postMessage): +(WebCore::MessagePort::entangleWithRemote): +(WebCore::MessagePort::entanglePorts): +(WebCore::MessagePort::entangle): Deleted. +* dom/MessagePort.h: + +* dom/MessagePortChannel.h: + +* dom/MessagePortIdentifier.h: Added. +(WebCore::operator==): +(WebCore::MessagePortIdentifier::encode const): +(WebCore::MessagePortIdentifier::decode): +(WebCore::MessagePortIdentifier::hash const): +(WTF::MessagePortIdentifierHash::hash): +(WTF::MessagePortIdentifierHash::equal): +(WTF::HashTraits::empty
[webkit-changes] [226252] trunk/Source/WebCore
Title: [226252] trunk/Source/WebCore Revision 226252 Author beid...@apple.com Date 2017-12-21 17:17:45 -0800 (Thu, 21 Dec 2017) Log Message Refactor MessagePortChannel family classes for an easier multi-process split. https://bugs.webkit.org/show_bug.cgi?id=180981 Reviewed by Andy Estes. No new tests (Refactor, no behavior change) - Make MessagePortChannel an abstract class instead of a wrapper around a mysterious "platform" class. - Implement the "in-process" channel for WK1 and WK2-for-now. - Other random cleanup and modernization of this code. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/InProcessMessagePortChannel.cpp: Added. (WebCore::InProcessMessagePortChannel::createChannelBetweenPorts): (WebCore::InProcessMessagePortChannel::create): (WebCore::InProcessMessagePortChannel::InProcessMessagePortChannel): (WebCore::InProcessMessagePortChannel::~InProcessMessagePortChannel): (WebCore::InProcessMessagePortChannel::postMessageToRemote): (WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote): (WebCore::InProcessMessagePortChannel::isConnectedTo): (WebCore::InProcessMessagePortChannel::entangleIfOpen): (WebCore::InProcessMessagePortChannel::disentangle): (WebCore::InProcessMessagePortChannel::hasPendingActivity): (WebCore::InProcessMessagePortChannel::locallyEntangledPort): (WebCore::InProcessMessagePortChannel::takeEntangledChannel): (WebCore::InProcessMessagePortChannel::close): (WebCore::InProcessMessagePortChannel::setRemotePort): * dom/InProcessMessagePortChannel.h: Added. (WebCore::InProcessMessagePortChannel::MessagePortQueue::create): (WebCore::InProcessMessagePortChannel::MessagePortQueue::takeAllMessages): (WebCore::InProcessMessagePortChannel::MessagePortQueue::appendAndCheckEmpty): (WebCore::InProcessMessagePortChannel::MessagePortQueue::isEmpty): (WebCore::InProcessMessagePortChannel::MessagePortQueue::MessagePortQueue): * dom/MessageChannel.cpp: (WebCore::MessageChannel::MessageChannel): * dom/MessageChannel.h: (WebCore::MessageChannel::create): (WebCore::MessageChannel::port1 const): (WebCore::MessageChannel::port2 const): * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): (WebCore::MessagePort::disentangle): (WebCore::MessagePort::entangle): (WebCore::MessagePort::hasPendingActivity const): * dom/MessagePort.h: * dom/MessagePortChannel.cpp: Added. (WebCore::MessagePortChannel::createChannelBetweenPorts): (WebCore::MessagePortChannel::MessagePortChannel): * dom/MessagePortChannel.h: (WebCore::MessagePortChannel::EventData::EventData): (WebCore::MessagePortChannel::~MessagePortChannel): * dom/default/PlatformMessagePortChannel.cpp: Removed. * dom/default/PlatformMessagePortChannel.h: Removed. * workers/service/context/ServiceWorkerThread.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Sources.txt trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/dom/MessageChannel.cpp trunk/Source/WebCore/dom/MessageChannel.h trunk/Source/WebCore/dom/MessagePort.cpp trunk/Source/WebCore/dom/MessagePort.h trunk/Source/WebCore/dom/MessagePortChannel.h trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h Added Paths trunk/Source/WebCore/dom/InProcessMessagePortChannel.cpp trunk/Source/WebCore/dom/InProcessMessagePortChannel.h trunk/Source/WebCore/dom/MessagePortChannel.cpp Removed Paths trunk/Source/WebCore/dom/default/ Diff Modified: trunk/Source/WebCore/ChangeLog (226251 => 226252) --- trunk/Source/WebCore/ChangeLog 2017-12-22 01:10:32 UTC (rev 226251) +++ trunk/Source/WebCore/ChangeLog 2017-12-22 01:17:45 UTC (rev 226252) @@ -1,3 +1,66 @@ +2017-12-21 Brady Eidson + +Refactor MessagePortChannel family classes for an easier multi-process split. +https://bugs.webkit.org/show_bug.cgi?id=180981 + +Reviewed by Andy Estes. + +No new tests (Refactor, no behavior change) + +- Make MessagePortChannel an abstract class instead of a wrapper around a mysterious "platform" class. +- Implement the "in-process" channel for WK1 and WK2-for-now. +- Other random cleanup and modernization of this code. + +* Sources.txt: +* WebCore.xcodeproj/project.pbxproj: + +* dom/InProcessMessagePortChannel.cpp: Added. +(WebCore::InProcessMessagePortChannel::createChannelBetweenPorts): +(WebCore::InProcessMessagePortChannel::create): +(WebCore::InProcessMessagePortChannel::InProcessMessagePortChannel): +(WebCore::InProcessMessagePortChannel::~InProcessMessagePortChannel): +(WebCore::InProcessMessagePortChannel::postMessageToRemote): +(WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote): +(WebCore::InProcessMessagePortChannel::isConnectedTo): +(WebCore::InProcessMessagePortChannel::entangleIfOpen): +(WebCore::InProcessMessagePortChannel::disentangle): +(WebCore::InProcessMessagePortChannel::hasPendingActivity): +(WebCore:
[webkit-changes] [226202] trunk
Title: [226202] trunk Revision 226202 Author beid...@apple.com Date 2017-12-20 14:47:20 -0800 (Wed, 20 Dec 2017) Log Message Assertion failure in MessagePort::contextDestroyed in http/tests/security/MessagePort/event-listener-context.html, usually attributed to later tests. https://bugs.webkit.org/show_bug.cgi?id=94458 Reviewed by Chris Dumez. Source/WebCore: No new tests (Changed existing test to reliably crash before this change, and work after it) There was already a glaring FIXME that said "MessagePorts should be ActiveDOMObjects" It was right, and it fixes up this subtle lifetime issue. * dom/MessagePort.cpp: (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::hasPendingActivity const): (WebCore::MessagePort::locallyEntangledPort const): (WebCore::MessagePort::activeDOMObjectName const): (WebCore::MessagePort::hasPendingActivity): Deleted. (WebCore::MessagePort::locallyEntangledPort): Deleted. * dom/MessagePort.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::stopActiveDOMObjects): (WebCore::ScriptExecutionContext::hasPendingActivity const): LayoutTests: * fast/events/message-port-constructor-for-deleted-document-expected.txt: * fast/events/message-port-constructor-for-deleted-document.html: * fast/events/resources/copy-of-message-port-context-destroyed.html: Added. * platform/mac/TestExpectations: Reenable the now-reliable and now-passing test. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document-expected.txt trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document.html trunk/LayoutTests/platform/mac/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/MessagePort.cpp trunk/Source/WebCore/dom/MessagePort.h trunk/Source/WebCore/dom/ScriptExecutionContext.cpp Added Paths trunk/LayoutTests/fast/events/resources/copy-of-message-port-context-destroyed.html Diff Modified: trunk/LayoutTests/ChangeLog (226201 => 226202) --- trunk/LayoutTests/ChangeLog 2017-12-20 22:09:01 UTC (rev 226201) +++ trunk/LayoutTests/ChangeLog 2017-12-20 22:47:20 UTC (rev 226202) @@ -1,3 +1,15 @@ +2017-12-20 Brady Eidson + +Assertion failure in MessagePort::contextDestroyed in http/tests/security/MessagePort/event-listener-context.html, usually attributed to later tests. +https://bugs.webkit.org/show_bug.cgi?id=94458 + +Reviewed by Chris Dumez. + +* fast/events/message-port-constructor-for-deleted-document-expected.txt: +* fast/events/message-port-constructor-for-deleted-document.html: +* fast/events/resources/copy-of-message-port-context-destroyed.html: Added. +* platform/mac/TestExpectations: Reenable the now-reliable and now-passing test. + 2017-12-20 Youenn Fablet LayoutTests/http/tests/workers/service/service-worker-cache-api.https.html is failing on most platforms Modified: trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document-expected.txt (226201 => 226202) --- trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document-expected.txt 2017-12-20 22:09:01 UTC (rev 226201) +++ trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document-expected.txt 2017-12-20 22:47:20 UTC (rev 226202) @@ -1,4 +1 @@ -Test that destroying a document doesn't cause a crash when executing MessageChannel constructor saved from its Window object. - Didn't crash: SUCCESS - Modified: trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document.html (226201 => 226202) --- trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document.html 2017-12-20 22:09:01 UTC (rev 226201) +++ trunk/LayoutTests/fast/events/message-port-constructor-for-deleted-document.html 2017-12-20 22:47:20 UTC (rev 226202) @@ -44,10 +44,7 @@ } catch (ex) { } -log("Didn't crash: SUCCESS"); - -if (window.testRunner) -testRunner.notifyDone(); +location.href=''; } Added: trunk/LayoutTests/fast/events/resources/copy-of-message-port-context-destroyed.html (0 => 226202) --- trunk/LayoutTests/fast/events/resources/copy-of-message-port-context-destroyed.html (rev 0) +++ trunk/LayoutTests/fast/events/resources/copy-of-message-port-context-destroyed.html 2017-12-20 22:47:20 UTC (rev 226202) @@ -0,0 +1,41 @@ + +if (window.testRunner) { +testRunner.dumpAsText(); +testRunner.waitUntilDone(); +} + +var port; +var gc_stuff = new Array(); + +gc_and_crash = function() { +if (this.GCController) +GCController.collect(); +else { +// V8 needs that many objects to run GC. +for(i = 0; i < 10; i++) { +p = new Object(); +gc_stuff.push(p); +gc_stuff.push(p + p); +} +} + +// If the bug 43140 is regressed, this will crash, at least in v8-based ports. +port.start(); + +
[webkit-changes] [226088] trunk
Title: [226088] trunk Revision 226088 Author beid...@apple.com Date 2017-12-18 17:16:57 -0800 (Mon, 18 Dec 2017) Log Message Add ability to API test Service Workers via a custom protocol. https://bugs.webkit.org/show_bug.cgi?id=180911 Reviewed by Chris Dumez. Source/WebCore: Covered by API test ServiceWorkers.Basic This adds a set of "Service Workers can handle this" schemes to the scheme registry and uses it for SW decisions instead of a handful of previous techniques. * bindings/scripts/CodeGeneratorJS.pm: (NeedsRuntimeCheck): (GenerateRuntimeEnableConditionalString): * bindings/scripts/IDLAttributes.json: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::hasServiceWorkerScheme): * dom/ScriptExecutionContext.h: * page/NavigatorServiceWorker.idl: * platform/SchemeRegistry.cpp: (WebCore::serviceWorkerSchemesLock): (WebCore::serviceWorkerSchemes): (WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle): (WebCore::SchemeRegistry::canServiceWorkersHandleURLScheme): (WebCore::SchemeRegistry::isServiceWorkerContainerCustomScheme): * platform/SchemeRegistry.h: * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::addRegistration): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runRegisterJob): Source/WebKit: This adds a set of "Service Workers can handle this" schemes to the scheme registry and most of these WebKit changes are to support getting those values out to all processes. Additionally, WebsiteDataRecords used to be file/http(s)-only. That seems bizarre and definitely got in the way of testing. So I also added a way to allow any scheme to result in a valid record. * Shared/ChildProcess.cpp: (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): * Shared/ChildProcess.h: * Shared/ChildProcess.messages.in: * Shared/Storage/StorageProcessCreationParameters.cpp: (WebKit::StorageProcessCreationParameters::encode const): (WebKit::StorageProcessCreationParameters::decode): * Shared/Storage/StorageProcessCreationParameters.h: * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::initializeWebsiteDataStore): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _registerURLSchemeServiceWorkersCanHandle:]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (+[WKWebsiteDataStore _allowWebsiteDataRecordsForAllOrigins]): * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::initializeNewWebProcess): (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle): * UIProcess/WebProcessPool.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::allowWebsiteDataRecordsForAllOrigins): (WebKit::WebsiteDataStore::fetchDataAndApply): * UIProcess/WebsiteData/WebsiteDataStore.h: * WebProcess/Storage/WebServiceWorkerProvider.cpp: (WebKit::WebServiceWorkerProvider::handleFetch): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Tools: Adds a very basic SW test: - Verify WebsiteDataStore can wipe all SW registration data. - Fire up a web page with a service worker - Verify SW registration data for that page exists in the WebsiteDataStore. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: Added. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm trunk/Source/WebCore/bindings/scripts/IDLAttributes.json trunk/Source/WebCore/dom/ScriptExecutionContext.cpp trunk/Source/WebCore/dom/ScriptExecutionContext.h trunk/Source/WebCore/page/NavigatorServiceWorker.idl trunk/Source/WebCore/platform/SchemeRegistry.cpp trunk/Source/WebCore/platform/SchemeRegistry.h trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/ChildProcess.cpp trunk/Source/WebKit/Shared/ChildProcess.h trunk/Source/WebKit/Shared/ChildProcess.messages.in trunk/Source/WebKit/Shared/Storage/StorageProcessCreationParameters.cpp trunk/Source/WebKit/Shared/Storage/StorageProcessCreationParameters.h trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp trunk/Source/WebKit/Shared/WebProcessCreationParameters.h trunk/Source/WebKit/StorageProcess/StorageProcess.cpp trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPoo
[webkit-changes] [226083] trunk/Source/WebKit
Title: [226083] trunk/Source/WebKit Revision 226083 Author beid...@apple.com Date 2017-12-18 16:14:24 -0800 (Mon, 18 Dec 2017) Log Message Apps that use both WK1 and WK2 can crash creating a WKWebsiteDataStore. https://bugs.webkit.org/show_bug.cgi?id=180953 Reviewed by Chris Dumez. * UIProcess/WebsiteData/WebsiteDataStore.cpp: Make an isMainThread() asset be an isUIThread() assert. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (226082 => 226083) --- trunk/Source/WebKit/ChangeLog 2017-12-18 23:02:40 UTC (rev 226082) +++ trunk/Source/WebKit/ChangeLog 2017-12-19 00:14:24 UTC (rev 226083) @@ -1,3 +1,12 @@ +2017-12-18 Brady Eidson + +Apps that use both WK1 and WK2 can crash creating a WKWebsiteDataStore. +https://bugs.webkit.org/show_bug.cgi?id=180953 + +Reviewed by Chris Dumez. + +* UIProcess/WebsiteData/WebsiteDataStore.cpp: Make an isMainThread() asset be an isUIThread() assert. + 2017-12-18 Brent Fulgham [macOS, iOS] Add new mach lookup port for CoreMedia remote control Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (226082 => 226083) --- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2017-12-18 23:02:40 UTC (rev 226082) +++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2017-12-19 00:14:24 UTC (rev 226083) @@ -57,7 +57,7 @@ static HashMap& nonDefaultDataStores() { -RELEASE_ASSERT(isMainThread()); +RELEASE_ASSERT(isUIThread()); static NeverDestroyed> map; return map; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [226064] trunk/Source/WebCore
Title: [226064] trunk/Source/WebCore Revision 226064 Author beid...@apple.com Date 2017-12-18 11:20:40 -0800 (Mon, 18 Dec 2017) Log Message REGRESSION: ASSERTION FAILED: !m_importCompleted https://bugs.webkit.org/show_bug.cgi?id=180935 Unreviewed bot gardening. No new tests (Covered by existing tests) The ASSERT was invalid for database pushes failing to open databases like this, so skip it for that scenario. * workers/service/server/RegistrationStore.cpp: (WebCore::RegistrationStore::databaseFailedToOpen): * workers/service/server/SWServer.cpp: (WebCore::SWServer::registrationStoreDatabaseFailedToOpen): * workers/service/server/SWServer.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h Diff Modified: trunk/Source/WebCore/ChangeLog (226063 => 226064) --- trunk/Source/WebCore/ChangeLog 2017-12-18 18:54:36 UTC (rev 226063) +++ trunk/Source/WebCore/ChangeLog 2017-12-18 19:20:40 UTC (rev 226064) @@ -1,3 +1,20 @@ +2017-12-18 Brady Eidson + +REGRESSION: ASSERTION FAILED: !m_importCompleted +https://bugs.webkit.org/show_bug.cgi?id=180935 + +Unreviewed bot gardening. + +No new tests (Covered by existing tests) + +The ASSERT was invalid for database pushes failing to open databases like this, so skip it for that scenario. + +* workers/service/server/RegistrationStore.cpp: +(WebCore::RegistrationStore::databaseFailedToOpen): +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::registrationStoreDatabaseFailedToOpen): +* workers/service/server/SWServer.h: + 2017-12-18 Jer Noble Playing media elements which call "pause(); play()" will have the play promise rejected. Modified: trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp (226063 => 226064) --- trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp 2017-12-18 18:54:36 UTC (rev 226063) +++ trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp 2017-12-18 19:20:40 UTC (rev 226064) @@ -100,7 +100,7 @@ void RegistrationStore::databaseFailedToOpen() { -m_server.registrationStoreImportComplete(); +m_server.registrationStoreDatabaseFailedToOpen(); } void RegistrationStore::databaseOpenedAndRecordsImported() Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (226063 => 226064) --- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-12-18 18:54:36 UTC (rev 226063) +++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-12-18 19:20:40 UTC (rev 226064) @@ -114,6 +114,12 @@ performGetOriginsWithRegistrationsCallbacks(); } +void SWServer::registrationStoreDatabaseFailedToOpen() +{ +if (!m_importCompleted) +registrationStoreImportComplete(); +} + void SWServer::addRegistrationFromStore(ServiceWorkerContextData&& data) { // Pages should not have been able to make a new registration to this key while the import was still taking place. Modified: trunk/Source/WebCore/workers/service/server/SWServer.h (226063 => 226064) --- trunk/Source/WebCore/workers/service/server/SWServer.h 2017-12-18 18:54:36 UTC (rev 226063) +++ trunk/Source/WebCore/workers/service/server/SWServer.h 2017-12-18 19:20:40 UTC (rev 226064) @@ -173,6 +173,7 @@ void addRegistrationFromStore(ServiceWorkerContextData&&); void registrationStoreImportComplete(); +void registrationStoreDatabaseFailedToOpen(); WEBCORE_EXPORT void getOriginsWithRegistrations(WTF::Function&)>); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [226003] trunk/Source
Title: [226003] trunk/Source Revision 226003 Author beid...@apple.com Date 2017-12-16 10:54:04 -0800 (Sat, 16 Dec 2017) Log Message Implement getting ServiceWorker registrations for the WKWebsiteDataStore API https://bugs.webkit.org/show_bug.cgi?id=180886 Reviewed by Chris Dumez. Source/WebCore: No new tests (API test coming soon). * workers/service/server/SWServer.cpp: (WebCore::SWServer::registrationStoreImportComplete): (WebCore::SWServer::SWServer): (WebCore::SWServer::getOriginsWithRegistrations): (WebCore::SWServer::performGetOriginsWithRegistrationsCallbacks): * workers/service/server/SWServer.h: Source/WebKit: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::fetchWebsiteData): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/StorageProcess.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (226002 => 226003) --- trunk/Source/WebCore/ChangeLog 2017-12-16 18:33:31 UTC (rev 226002) +++ trunk/Source/WebCore/ChangeLog 2017-12-16 18:54:04 UTC (rev 226003) @@ -1,3 +1,19 @@ +2017-12-16 Brady Eidson + +Implement getting ServiceWorker registrations for the WKWebsiteDataStore API +https://bugs.webkit.org/show_bug.cgi?id=180886 + +Reviewed by Chris Dumez. + +No new tests (API test coming soon). + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::registrationStoreImportComplete): +(WebCore::SWServer::SWServer): +(WebCore::SWServer::getOriginsWithRegistrations): +(WebCore::SWServer::performGetOriginsWithRegistrationsCallbacks): +* workers/service/server/SWServer.h: + 2017-12-16 Yusuke Suzuki Remove unnecessary boolean result of start() functions Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (226002 => 226003) --- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-12-16 18:33:31 UTC (rev 226002) +++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-12-16 18:54:04 UTC (rev 226003) @@ -108,7 +108,10 @@ void SWServer::registrationStoreImportComplete() { +ASSERT(!m_importCompleted); +m_importCompleted = true; m_originStore->importComplete(); +performGetOriginsWithRegistrationsCallbacks(); } void SWServer::addRegistrationFromStore(ServiceWorkerContextData&& data) @@ -228,7 +231,7 @@ m_server.syncTerminateWorker(*worker); } -SWServer::SWServer(UniqueRef&& originStore, String&& registrationDatabaseDirectory, PAL::SessionID sessionID) +SWServer::SWServer(UniqueRef&& originStore, String&& registrationDatabaseDirectory, PAL::SessionID sessionID) : m_originStore(WTFMove(originStore)) , m_registrationStore(*this, WTFMove(registrationDatabaseDirectory)) , m_sessionID(sessionID) @@ -768,6 +771,33 @@ }); } +void SWServer::getOriginsWithRegistrations(WTF::Function&)> callback) +{ +m_getOriginsWithRegistrationsCallbacks.append(WTFMove(callback)); + +if (m_importCompleted) +performGetOriginsWithRegistrationsCallbacks(); +} + +void SWServer::performGetOriginsWithRegistrationsCallbacks() +{ +ASSERT(isMainThread()); +ASSERT(m_importCompleted); + +if (m_getOriginsWithRegistrationsCallbacks.isEmpty()) +return; + +HashSet originsWithRegistrations; +for (auto& key : m_registrations.keys()) { +originsWithRegistrations.add(key.topOrigin()); +originsWithRegistrations.add(SecurityOriginData { key.scope().protocol().toString(), key.scope().host(), key.scope().port() }); +} + +auto callbacks = WTFMove(m_getOriginsWithRegistrationsCallbacks); +for (auto& callback : callbacks) +callback(originsWithRegistrations); +} + } // namespace WebCore #endif // ENABLE(SERVICE_WORKER) Modified: trunk/Source/WebCore/workers/service/server/SWServer.h (226002 => 226003) --- trunk/Source/WebCore/workers/service/server/SWServer.h 2017-12-16 18:33:31 UTC (rev 226002) +++ trunk/Source/WebCore/workers/service/server/SWServer.h 2017-12-16 18:54:04 UTC (rev 226003) @@ -174,6 +174,8 @@ void addRegistrationFromStore(ServiceWorkerContextData&&); void registrationStoreImportComplete(); +WEBCORE_EXPORT void getOriginsWithRegistrations(WTF::Function&)>); + private: void registerConnection(Connection&); void unregisterConnection(Connection&); @@ -197,6 +199,8 @@ SWServerRegistration* registrationFromServiceWorkerIdentifier(ServiceWorkerIdentifier); void forEachClientForOrigin(const ClientOrigin&, const WTF::Function&); +void performGetOriginsWithRegistrationsCallbacks(); + enum TerminationMode { Synchronous, Asynchronous, @@ -231,6 +235,8 @@ Deque m_pendingContextDatas; HashMap> m_serviceWorkerRunRequests; PAL::SessionID m_sessionID; +bool m_importCompleted { false }; +Vector&)>>
[webkit-changes] [225982] trunk/Source/WebKit
Title: [225982] trunk/Source/WebKit Revision 225982 Author beid...@apple.com Date 2017-12-15 13:15:17 -0800 (Fri, 15 Dec 2017) Log Message Make sure only WebsiteDataStores with valid SessionIDs register themselves. https://bugs.webkit.org/show_bug.cgi?id=180869 Reviewed by Chris Dumez. Some code in WebsiteDataStore assumes an invalid SessionID is a possibility, but we didn't account for that in the map added in r225935. Seems prudent to make sure we're not doing hash table operations with invalid keys. * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::WebsiteDataStore::~WebsiteDataStore): (WebKit::WebsiteDataStore::maybeRegisterWithSessionIDMap): (WebKit::WebsiteDataStore::existingNonDefaultDataStoreForSessionID): * UIProcess/WebsiteData/WebsiteDataStore.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h Diff Modified: trunk/Source/WebKit/ChangeLog (225981 => 225982) --- trunk/Source/WebKit/ChangeLog 2017-12-15 21:12:43 UTC (rev 225981) +++ trunk/Source/WebKit/ChangeLog 2017-12-15 21:15:17 UTC (rev 225982) @@ -1,3 +1,22 @@ +2017-12-15 Brady Eidson + +Make sure only WebsiteDataStores with valid SessionIDs register themselves. +https://bugs.webkit.org/show_bug.cgi?id=180869 + +Reviewed by Chris Dumez. + +Some code in WebsiteDataStore assumes an invalid SessionID is a possibility, +but we didn't account for that in the map added in r225935. + +Seems prudent to make sure we're not doing hash table operations with invalid keys. + +* UIProcess/WebsiteData/WebsiteDataStore.cpp: +(WebKit::WebsiteDataStore::WebsiteDataStore): +(WebKit::WebsiteDataStore::~WebsiteDataStore): +(WebKit::WebsiteDataStore::maybeRegisterWithSessionIDMap): +(WebKit::WebsiteDataStore::existingNonDefaultDataStoreForSessionID): +* UIProcess/WebsiteData/WebsiteDataStore.h: + 2017-12-14 Simon Fraser Rotating when zoomed in with fingers down can result in a broken tab Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (225981 => 225982) --- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2017-12-15 21:12:43 UTC (rev 225981) +++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2017-12-15 21:15:17 UTC (rev 225982) @@ -78,11 +78,7 @@ , m_storageManager(StorageManager::create(m_configuration.localStorageDirectory)) , m_queue(WorkQueue::create("com.apple.WebKit.WebsiteDataStore")) { -if (m_sessionID != PAL::SessionID::defaultSessionID()) { -auto result = nonDefaultDataStores().add(sessionID, this); -ASSERT_UNUSED(result, result.isNewEntry); -} - +maybeRegisterWithSessionIDMap(); platformInitialize(); } @@ -91,32 +87,33 @@ , m_configuration() , m_queue(WorkQueue::create("com.apple.WebKit.WebsiteDataStore")) { -if (m_sessionID != PAL::SessionID::defaultSessionID()) { -auto result = nonDefaultDataStores().add(sessionID, this); -ASSERT_UNUSED(result, result.isNewEntry); -} - +maybeRegisterWithSessionIDMap(); platformInitialize(); } WebsiteDataStore::~WebsiteDataStore() { -if (m_sessionID != PAL::SessionID::defaultSessionID()) { -ASSERT(nonDefaultDataStores().get(m_sessionID) == this); -nonDefaultDataStores().remove(m_sessionID); -} - platformDestroy(); if (m_sessionID.isValid() && m_sessionID != PAL::SessionID::defaultSessionID()) { +ASSERT(nonDefaultDataStores().get(m_sessionID) == this); +nonDefaultDataStores().remove(m_sessionID); for (auto& processPool : WebProcessPool::allProcessPools()) processPool->sendToNetworkingProcess(Messages::NetworkProcess::DestroySession(m_sessionID)); } } +void WebsiteDataStore::maybeRegisterWithSessionIDMap() +{ +if (m_sessionID.isValid() && m_sessionID != PAL::SessionID::defaultSessionID()) { +auto result = nonDefaultDataStores().add(m_sessionID, this); +ASSERT_UNUSED(result, result.isNewEntry); +} +} + WebsiteDataStore* WebsiteDataStore::existingNonDefaultDataStoreForSessionID(PAL::SessionID sessionID) { -return nonDefaultDataStores().get(sessionID); +return sessionID.isValid() && sessionID != PAL::SessionID::defaultSessionID() ? nonDefaultDataStores().get(sessionID) : nullptr; } WebProcessPool* WebsiteDataStore::processPoolForCookieStorageOperations() Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (225981 => 225982) --- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2017-12-15 21:12:43 UTC (rev 225981) +++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2017-12-15 21:15:17 UTC (rev 225982) @@ -183,6 +183,8 @@ static void removeMediaKeys(const String& mediaKeysStorageDirectory, std::chrono:
[webkit-changes] [225980] trunk/Source/WebKit
Title: [225980] trunk/Source/WebKit Revision 225980 Author beid...@apple.com Date 2017-12-15 13:11:52 -0800 (Fri, 15 Dec 2017) Log Message API test WebKit.WebsiteDataStoreCustomPaths is failing https://bugs.webkit.org/show_bug.cgi?id=180870 Reviewed by Chris Dumez. To avoid unintentionally creating the default WebsiteDataStore we need to pass around the relevant SessionID to more places. * UIProcess/ServiceWorkerProcessProxy.cpp: (WebKit::ServiceWorkerProcessProxy::start): * UIProcess/ServiceWorkerProcessProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::getStorageProcessConnection): (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getStorageProcessConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: (WebKit::WebIDBConnectionToServer::messageSenderConnection): * WebProcess/Databases/WebDatabaseProvider.cpp: (WebKit::WebDatabaseProvider::idbConnectionToServerForSession): * WebProcess/Storage/WebServiceWorkerProvider.cpp: (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession): (WebKit::WebServiceWorkerProvider::handleFetch): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensureWebToStorageProcessConnection): (WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp trunk/Source/WebKit/UIProcess/WebProcessProxy.h trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp trunk/Source/WebKit/WebProcess/Databases/WebDatabaseProvider.cpp trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp trunk/Source/WebKit/WebProcess/WebProcess.cpp trunk/Source/WebKit/WebProcess/WebProcess.h trunk/Source/WebKit/WebProcess/WebProcess.messages.in Diff Modified: trunk/Source/WebKit/ChangeLog (225979 => 225980) --- trunk/Source/WebKit/ChangeLog 2017-12-15 20:35:27 UTC (rev 225979) +++ trunk/Source/WebKit/ChangeLog 2017-12-15 21:11:52 UTC (rev 225980) @@ -1,3 +1,43 @@ +2017-12-15 Brady Eidson + +API test WebKit.WebsiteDataStoreCustomPaths is failing +https://bugs.webkit.org/show_bug.cgi?id=180870 + +Reviewed by Chris Dumez. + +To avoid unintentionally creating the default WebsiteDataStore we need to pass around the +relevant SessionID to more places. + +* UIProcess/ServiceWorkerProcessProxy.cpp: +(WebKit::ServiceWorkerProcessProxy::start): +* UIProcess/ServiceWorkerProcessProxy.h: + +* UIProcess/WebProcessPool.cpp: +(WebKit::WebProcessPool::getStorageProcessConnection): +(WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess): +* UIProcess/WebProcessPool.h: + +* UIProcess/WebProcessProxy.cpp: +(WebKit::WebProcessProxy::getStorageProcessConnection): +* UIProcess/WebProcessProxy.h: +* UIProcess/WebProcessProxy.messages.in: + +* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: +(WebKit::WebIDBConnectionToServer::messageSenderConnection): + +* WebProcess/Databases/WebDatabaseProvider.cpp: +(WebKit::WebDatabaseProvider::idbConnectionToServerForSession): + +* WebProcess/Storage/WebServiceWorkerProvider.cpp: +(WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession): +(WebKit::WebServiceWorkerProvider::handleFetch): + +* WebProcess/WebProcess.cpp: +(WebKit::WebProcess::ensureWebToStorageProcessConnection): +(WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess): +* WebProcess/WebProcess.h: +* WebProcess/WebProcess.messages.in: + 2017-12-15 Alex Christensen Move WebKit::WebsitePolicies to API::WebsitePolicies Modified: trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp (225979 => 225980) --- trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp 2017-12-15 20:35:27 UTC (rev 225979) +++ trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp 2017-12-15 21:11:52 UTC (rev 225980) @@ -60,9 +60,9 @@ launchOptions.extraInitializationData.add(ASCIILiteral("service-worker-process"), ASCIILiteral("1")); } -void ServiceWorkerProcessProxy::start(const WebPreferencesStore& store) +void ServiceWorkerProcessProxy::start(const WebPreferencesStore& store, std::optional initialSessionID) { -send(Messages::WebProcess::EstablishWorkerContextConnectionToStorageProcess { m_serviceWorkerPageID,
[webkit-changes] [225935] trunk
Title: [225935] trunk Revision 225935 Author beid...@apple.com Date 2017-12-14 14:57:14 -0800 (Thu, 14 Dec 2017) Log Message REGRESSION (r225789): API tests WKProcessPool.InitialWarmedProcessUsed and WebKit.WebsiteDataStoreCustomPaths are failing. https://bugs.webkit.org/show_bug.cgi?id=180722 Reviewed by Chris Dumez. Source/WebKit: - Add a test-only accessor to get the number of WebProcesses hosting WebPages - Have WebsiteDataStore keep track of all instances so they can be looked up by SessionID - When the StorageProcess needs to establish a SW context connection on behalf of a specific SessionID, the UI process will now prefer using the WebsiteDataStore associated with that SessionID. This allows us to continue deferring creation of the default data store if it's not needed. * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::connectionToContextProcessWasClosed): (WebKit::StorageProcess::createServerToContextConnection): * StorageProcess/StorageProcess.h: * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::establishSWServerConnection): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _webPageContentProcessCount]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess): (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession): * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess): * UIProcess/WebProcessPool.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::WebsiteDataStore::~WebsiteDataStore): (WebKit::WebsiteDataStore::existingDataStoreForSessionID): * UIProcess/WebsiteData/WebsiteDataStore.h: Tools: * TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm: (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/StorageProcess.cpp trunk/Source/WebKit/StorageProcess/StorageProcess.h trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.cpp trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.h trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.messages.in trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm Diff Modified: trunk/Source/WebKit/ChangeLog (225934 => 225935) --- trunk/Source/WebKit/ChangeLog 2017-12-14 22:39:48 UTC (rev 225934) +++ trunk/Source/WebKit/ChangeLog 2017-12-14 22:57:14 UTC (rev 225935) @@ -1,3 +1,44 @@ +2017-12-14 Brady Eidson + +REGRESSION (r225789): API tests WKProcessPool.InitialWarmedProcessUsed and WebKit.WebsiteDataStoreCustomPaths are failing. +https://bugs.webkit.org/show_bug.cgi?id=180722 + +Reviewed by Chris Dumez. + +- Add a test-only accessor to get the number of WebProcesses hosting WebPages +- Have WebsiteDataStore keep track of all instances so they can be looked up by SessionID +- When the StorageProcess needs to establish a SW context connection on behalf of a specific SessionID, + the UI process will now prefer using the WebsiteDataStore associated with that SessionID. This allows + us to continue deferring creation of the default data store if it's not needed. + +* StorageProcess/StorageProcess.cpp: +(WebKit::StorageProcess::connectionToContextProcessWasClosed): +(WebKit::StorageProcess::createServerToContextConnection): +* StorageProcess/StorageProcess.h: + +* StorageProcess/StorageToWebProcessConnection.cpp: +(WebKit::StorageToWebProcessConnection::establishSWServerConnection): + +* UIProcess/API/Cocoa/WKProcessPool.mm: +(-[WKProcessPool _webPageContentProcessCount]): +* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: + +* UIProcess/Storage/StorageProcessProxy.cpp: +(WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess): +(WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession): +* UIProcess/Storage/StorageProcessProxy.h: +* UIProcess/Storage/StorageProcessProxy.messages.in: + +* UIProcess/WebProcessPool.cpp: +(WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess): +* UIProcess/WebProcessPool.h: + +* UIProcess/WebsiteData/WebsiteDataSt
[webkit-changes] [225864] trunk
Title: [225864] trunk Revision 225864 Author beid...@apple.com Date 2017-12-13 12:20:18 -0800 (Wed, 13 Dec 2017) Log Message REGRESSION (r225789): API tests WKProcessPool.InitialWarmedProcessUsed and WebKit.WebsiteDataStoreCustomPaths are failing. https://bugs.webkit.org/show_bug.cgi?id=180722 Reviewed by Chris Dumez. Source/WebKit: - Add a test-only accessor to get the number of WebProcesses hosting WebPages - Have WebsiteDataStore keep track of all instances so they can be looked up by SessionID - When the StorageProcess needs to establish a SW context connection on behalf of a specific SessionID, the UI process will now prefer using the WebsiteDataStore associated with that SessionID. This allows us to continue deferring creation of the default data store if it's not needed. * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::connectionToContextProcessWasClosed): (WebKit::StorageProcess::createServerToContextConnection): * StorageProcess/StorageProcess.h: * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::establishSWServerConnection): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _webPageContentProcessCount]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess): (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession): * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess): * UIProcess/WebProcessPool.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::WebsiteDataStore::~WebsiteDataStore): (WebKit::WebsiteDataStore::existingDataStoreForSessionID): * UIProcess/WebsiteData/WebsiteDataStore.h: Tools: * TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm: (TEST): Call a new SPI to get the count of WebProcesses hosting WebPages. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/StorageProcess.cpp trunk/Source/WebKit/StorageProcess/StorageProcess.h trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.cpp trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.h trunk/Source/WebKit/UIProcess/Storage/StorageProcessProxy.messages.in trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm Diff Modified: trunk/Source/WebKit/ChangeLog (225863 => 225864) --- trunk/Source/WebKit/ChangeLog 2017-12-13 20:19:08 UTC (rev 225863) +++ trunk/Source/WebKit/ChangeLog 2017-12-13 20:20:18 UTC (rev 225864) @@ -1,3 +1,44 @@ +2017-12-13 Brady Eidson + +REGRESSION (r225789): API tests WKProcessPool.InitialWarmedProcessUsed and WebKit.WebsiteDataStoreCustomPaths are failing. +https://bugs.webkit.org/show_bug.cgi?id=180722 + +Reviewed by Chris Dumez. + +- Add a test-only accessor to get the number of WebProcesses hosting WebPages +- Have WebsiteDataStore keep track of all instances so they can be looked up by SessionID +- When the StorageProcess needs to establish a SW context connection on behalf of a specific SessionID, + the UI process will now prefer using the WebsiteDataStore associated with that SessionID. This allows + us to continue deferring creation of the default data store if it's not needed. + +* StorageProcess/StorageProcess.cpp: +(WebKit::StorageProcess::connectionToContextProcessWasClosed): +(WebKit::StorageProcess::createServerToContextConnection): +* StorageProcess/StorageProcess.h: + +* StorageProcess/StorageToWebProcessConnection.cpp: +(WebKit::StorageToWebProcessConnection::establishSWServerConnection): + +* UIProcess/API/Cocoa/WKProcessPool.mm: +(-[WKProcessPool _webPageContentProcessCount]): +* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: + +* UIProcess/Storage/StorageProcessProxy.cpp: +(WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess): +(WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession): +* UIProcess/Storage/StorageProcessProxy.h: +* UIProcess/Storage/StorageProcessProxy.messages.in: + +* UIProcess/WebProcessPool.cpp: +(WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess): +* UIProcess/
[webkit-changes] [225789] trunk/Source/WebKit
Title: [225789] trunk/Source/WebKit Revision 225789 Author beid...@apple.com Date 2017-12-12 10:48:13 -0800 (Tue, 12 Dec 2017) Log Message Make ServiceWorkers follow the DEFAULT_EXPERIMENTAL_FEATURES_ENABLED flag on Mac. and https://bugs.webkit.org/show_bug.cgi?id=180697 Reviewed by Chris Dumez. * Shared/WebPreferences.yaml: * Shared/WebPreferencesDefaultValues.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/WebPreferences.yaml trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h Diff Modified: trunk/Source/WebKit/ChangeLog (225788 => 225789) --- trunk/Source/WebKit/ChangeLog 2017-12-12 18:40:29 UTC (rev 225788) +++ trunk/Source/WebKit/ChangeLog 2017-12-12 18:48:13 UTC (rev 225789) @@ -1,3 +1,13 @@ +2017-12-12 Brady Eidson + +Make ServiceWorkers follow the DEFAULT_EXPERIMENTAL_FEATURES_ENABLED flag on Mac. + and https://bugs.webkit.org/show_bug.cgi?id=180697 + +Reviewed by Chris Dumez. + +* Shared/WebPreferences.yaml: +* Shared/WebPreferencesDefaultValues.h: + 2017-12-12 Chris Dumez Simplify IPC code between WebProcess and StorageProcess for serviceWorker.postMessage() Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (225788 => 225789) --- trunk/Source/WebKit/Shared/WebPreferences.yaml 2017-12-12 18:40:29 UTC (rev 225788) +++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2017-12-12 18:48:13 UTC (rev 225789) @@ -1112,7 +1112,7 @@ ServiceWorkersEnabled: type: bool - defaultValue: false + defaultValue: DEFAULT_SERVICE_WORKERS_ENABLED humanReadableName: "ServiceWorkers" humanReadableDescription: "Enable ServiceWorkers" category: experimental Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (225788 => 225789) --- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2017-12-12 18:40:29 UTC (rev 225788) +++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2017-12-12 18:48:13 UTC (rev 225789) @@ -178,3 +178,9 @@ #else #define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED false #endif + +#if ENABLE(EXPERIMENTAL_FEATURES) || PLATFORM(MAC) +#define DEFAULT_SERVICE_WORKERS_ENABLED true +#else +#define DEFAULT_SERVICE_WORKERS_ENABLED false +#endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [225717] trunk/Source
Title: [225717] trunk/Source Revision 225717 Author beid...@apple.com Date 2017-12-08 19:03:06 -0800 (Fri, 08 Dec 2017) Log Message Delay some service worker operations until after the database import completes. https://bugs.webkit.org/show_bug.cgi?id=180573 Reviewed by Chris Dumez. Source/WebCore: No new tests (Not testable yet). Right after the storage process launches it starts importing registration records. During this time, a lot of the decisions we make regarding registrations, fetch, etc. are invalid, as they rely on those in-memory records being in place. This patch delays certain things until after the initial origin table import is complete. * workers/service/server/RegistrationStore.cpp: (WebCore::RegistrationStore::databaseOpenedAndRecordsImported): * workers/service/server/SWOriginStore.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::registrationStoreImportComplete): Tell the origin store the initial import was completed. (WebCore::SWServer::addRegistrationFromStore): * workers/service/server/SWServer.h: Source/WebKit: * StorageProcess/ServiceWorker/WebSWOriginStore.cpp: (WebKit::WebSWOriginStore::importComplete): Tell the Origin Table on all connects that the import is complete. (WebKit::WebSWOriginStore::registerSWServerConnection): * StorageProcess/ServiceWorker/WebSWOriginStore.h: * WebProcess/Storage/WebSWClientConnection.cpp: (WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const): (WebKit::WebSWClientConnection::setSWOriginTableIsImported): Run deferred tasks! (WebKit::WebSWClientConnection::matchRegistration): If the import isn't complete yet, delay the match registration task until later. (WebKit::WebSWClientConnection::runOrDelayTask): Either send the message now or save off the task to wait until the import is complete. (WebKit::WebSWClientConnection::getRegistrations): If the import isn't complete yet, delay the get registrations task until later. (WebKit::WebSWClientConnection::initializeSWOriginTableAsEmpty): Deleted. * WebProcess/Storage/WebSWClientConnection.h: * WebProcess/Storage/WebSWClientConnection.messages.in: * WebProcess/Storage/WebSWOriginTable.cpp: (WebKit::WebSWOriginTable::setSharedMemory): * WebProcess/Storage/WebSWOriginTable.h: (WebKit::WebSWOriginTable::isImported const): (WebKit::WebSWOriginTable::setIsImported): (WebKit::WebSWOriginTable::isInitialized const): Deleted. (WebKit::WebSWOriginTable::initializeAsEmpty): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp trunk/Source/WebCore/workers/service/server/SWOriginStore.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWOriginStore.cpp trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWOriginStore.h trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.messages.in trunk/Source/WebKit/WebProcess/Storage/WebSWOriginTable.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWOriginTable.h Diff Modified: trunk/Source/WebCore/ChangeLog (225716 => 225717) --- trunk/Source/WebCore/ChangeLog 2017-12-09 01:05:58 UTC (rev 225716) +++ trunk/Source/WebCore/ChangeLog 2017-12-09 03:03:06 UTC (rev 225717) @@ -1,3 +1,29 @@ +2017-12-08 Brady Eidson + +Delay some service worker operations until after the database import completes. +https://bugs.webkit.org/show_bug.cgi?id=180573 + +Reviewed by Chris Dumez. + +No new tests (Not testable yet). + +Right after the storage process launches it starts importing registration records. +During this time, a lot of the decisions we make regarding registrations, fetch, etc. +are invalid, as they rely on those in-memory records being in place. + +This patch delays certain things until after the initial origin table import is complete. + +* workers/service/server/RegistrationStore.cpp: +(WebCore::RegistrationStore::databaseOpenedAndRecordsImported): + +* workers/service/server/SWOriginStore.h: + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::registrationStoreImportComplete): Tell the origin store the initial + import was completed. +(WebCore::SWServer::addRegistrationFromStore): +* workers/service/server/SWServer.h: + 2017-12-08 Youenn Fablet Service Worker should use a correct user agent Modified: trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp (225716 => 225717) --- trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp 2017-12-09 01:05:58 UTC (rev 225716) +++ trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp 2017-12-09 03:03:06 UTC (rev 225717) @@ -
[webkit-changes] [225661] trunk/Source/WebCore
Title: [225661] trunk/Source/WebCore Revision 225661 Author beid...@apple.com Date 2017-12-07 17:27:00 -0800 (Thu, 07 Dec 2017) Log Message Read registrations in from disk. https://bugs.webkit.org/show_bug.cgi?id=180543 Reviewed by Andy Estes. No new tests (Not testable quite yet) On launch, read through the database. Set up enough objects in the SWServer necessary to cause fetches and postMessages to go to a worker that has never run before. * workers/service/ServiceWorkerContextData.cpp: (WebCore::ServiceWorkerContextData::isolatedCopy const): * workers/service/ServiceWorkerContextData.h: (WebCore::ServiceWorkerContextData::encode const): (WebCore::ServiceWorkerContextData::decode): * workers/service/ServiceWorkerRegistrationKey.cpp: (WebCore::ServiceWorkerRegistrationKey::toDatabaseKey const): (WebCore::ServiceWorkerRegistrationKey::fromDatabaseKey): * workers/service/ServiceWorkerRegistrationKey.h: * workers/service/server/RegistrationDatabase.cpp: (WebCore::stringToUpdateViaCache): (WebCore::stringToWorkerType): (WebCore::RegistrationDatabase::doPushChanges): (WebCore::RegistrationDatabase::importRecords): (WebCore::RegistrationDatabase::addRegistrationToStore): * workers/service/server/RegistrationDatabase.h: * workers/service/server/RegistrationStore.cpp: (WebCore::RegistrationStore::RegistrationStore): (WebCore::RegistrationStore::addRegistrationFromDatabase): * workers/service/server/RegistrationStore.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::addRegistrationFromStore): (WebCore::SWServer::SWServer): (WebCore::SWServer::updateWorker): (WebCore::SWServer::tryInstallContextData): (WebCore::SWServer::installContextData): (WebCore::generateServiceWorkerIdentifier): Deleted. * workers/service/server/SWServer.h: * workers/service/server/SWServerRegistration.h: * workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::contextData const): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/ServiceWorkerContextData.cpp trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp trunk/Source/WebCore/workers/service/server/RegistrationDatabase.h trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp trunk/Source/WebCore/workers/service/server/RegistrationStore.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerRegistration.h trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (225660 => 225661) --- trunk/Source/WebCore/ChangeLog 2017-12-08 01:26:27 UTC (rev 225660) +++ trunk/Source/WebCore/ChangeLog 2017-12-08 01:27:00 UTC (rev 225661) @@ -1,3 +1,55 @@ +2017-12-07 Brady Eidson + +Read registrations in from disk. +https://bugs.webkit.org/show_bug.cgi?id=180543 + +Reviewed by Andy Estes. + +No new tests (Not testable quite yet) + +On launch, read through the database. + +Set up enough objects in the SWServer necessary to cause fetches and postMessages to +go to a worker that has never run before. + +* workers/service/ServiceWorkerContextData.cpp: +(WebCore::ServiceWorkerContextData::isolatedCopy const): +* workers/service/ServiceWorkerContextData.h: +(WebCore::ServiceWorkerContextData::encode const): +(WebCore::ServiceWorkerContextData::decode): + +* workers/service/ServiceWorkerRegistrationKey.cpp: +(WebCore::ServiceWorkerRegistrationKey::toDatabaseKey const): +(WebCore::ServiceWorkerRegistrationKey::fromDatabaseKey): +* workers/service/ServiceWorkerRegistrationKey.h: + +* workers/service/server/RegistrationDatabase.cpp: +(WebCore::stringToUpdateViaCache): +(WebCore::stringToWorkerType): +(WebCore::RegistrationDatabase::doPushChanges): +(WebCore::RegistrationDatabase::importRecords): +(WebCore::RegistrationDatabase::addRegistrationToStore): +* workers/service/server/RegistrationDatabase.h: + +* workers/service/server/RegistrationStore.cpp: +(WebCore::RegistrationStore::RegistrationStore): +(WebCore::RegistrationStore::addRegistrationFromDatabase): +* workers/service/server/RegistrationStore.h: + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::addRegistrationFromStore): +(WebCore::SWServer::SWServer): +(WebCore::SWServer::updateWorker): +(WebCore::SWServer::tryInstallContextData): +(WebCore::SWServer::installContextData): +(WebCore::generateServiceWorkerIdentifier): Deleted. +* workers/service/server/SWServer.h: + +* workers/service/se
[webkit-changes] [225610] trunk/Source/WebCore
Title: [225610] trunk/Source/WebCore Revision 225610 Author beid...@apple.com Date 2017-12-06 16:41:14 -0800 (Wed, 06 Dec 2017) Log Message Start writing ServiceWorker registrations to disk. https://bugs.webkit.org/show_bug.cgi?id=180488 Reviewed by Chris Dumez. No new tests (No observable behavior change). As registrations changes occurs, we now write them to disk. We don't re-read them in yet. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * workers/service/ServiceWorkerRegistrationData.cpp: (WebCore::ServiceWorkerRegistrationData::isolatedCopy const): * workers/service/ServiceWorkerRegistrationData.h: (WebCore::ServiceWorkerRegistrationData::encode const): (WebCore::ServiceWorkerRegistrationData::decode): * workers/service/ServiceWorkerRegistrationKey.cpp: (WebCore::ServiceWorkerRegistrationKey::toDatabaseKey const): * workers/service/ServiceWorkerRegistrationKey.h: * workers/service/server/RegistrationDatabase.cpp: Added. (WebCore::v1RecordsTableSchema): (WebCore::v1RecordsTableSchemaAlternate): (WebCore::databaseFilename): (WebCore::RegistrationDatabase::RegistrationDatabase): (WebCore::RegistrationDatabase::~RegistrationDatabase): (WebCore::RegistrationDatabase::openSQLiteDatabase): (WebCore::RegistrationDatabase::ensureValidRecordsTable): (WebCore::updateViaCacheToString): (WebCore::workerTypeToString): (WebCore::RegistrationDatabase::pushChanges): (WebCore::RegistrationDatabase::doPushChanges): (WebCore::RegistrationDatabase::importRecords): (WebCore::RegistrationDatabase::databaseFailedToOpen): (WebCore::RegistrationDatabase::databaseOpenedAndRecordsImported): * workers/service/server/RegistrationDatabase.h: Copied from Source/WebCore/workers/service/ServiceWorkerRegistrationData.cpp. (WebCore::RegistrationDatabase::isClosed const): * workers/service/server/RegistrationStore.cpp: Added. (WebCore::RegistrationStore::RegistrationStore): (WebCore::RegistrationStore::~RegistrationStore): (WebCore::RegistrationStore::scheduleDatabasePushIfNecessary): (WebCore::RegistrationStore::pushChangesToDatabase): (WebCore::RegistrationStore::updateRegistration): (WebCore::RegistrationStore::removeRegistration): (WebCore::RegistrationStore::databaseFailedToOpen): (WebCore::RegistrationStore::databaseOpenedAndRecordsImported): * workers/service/server/RegistrationStore.h: Copied from Source/WebCore/workers/service/ServiceWorkerRegistrationData.cpp. * workers/service/server/SWServer.cpp: (WebCore::SWServer::removeRegistration): (WebCore::SWServer::SWServer): (WebCore::SWServer::updateWorker): (WebCore::SWServer::installContextData): * workers/service/server/SWServer.h: * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::data const): * workers/service/server/SWServerRegistration.h: (WebCore::SWServerRegistration::setLastUpdateTime): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Sources.txt trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationData.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationData.h trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp trunk/Source/WebCore/workers/service/server/SWServerRegistration.h Added Paths trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp trunk/Source/WebCore/workers/service/server/RegistrationDatabase.h trunk/Source/WebCore/workers/service/server/RegistrationStore.cpp trunk/Source/WebCore/workers/service/server/RegistrationStore.h Diff Modified: trunk/Source/WebCore/ChangeLog (225609 => 225610) --- trunk/Source/WebCore/ChangeLog 2017-12-07 00:40:17 UTC (rev 225609) +++ trunk/Source/WebCore/ChangeLog 2017-12-07 00:41:14 UTC (rev 225610) @@ -1,3 +1,69 @@ +2017-12-06 Brady Eidson + +Start writing ServiceWorker registrations to disk. +https://bugs.webkit.org/show_bug.cgi?id=180488 + +Reviewed by Chris Dumez. + +No new tests (No observable behavior change). + +As registrations changes occurs, we now write them to disk. +We don't re-read them in yet. + +* Sources.txt: +* WebCore.xcodeproj/project.pbxproj: + +* workers/service/ServiceWorkerRegistrationData.cpp: +(WebCore::ServiceWorkerRegistrationData::isolatedCopy const): +* workers/service/ServiceWorkerRegistrationData.h: +(WebCore::ServiceWorkerRegistrationData::encode const): +(WebCore::ServiceWorkerRegistrationData::decode): + +* workers/service/ServiceWorkerRegistrationKey.cpp: +(WebCore::ServiceWorkerRegistrationKey::toDatabaseKey const): +* workers/service/ServiceWorkerRegistrationKey.h: + +* workers/service/server/RegistrationDatabase.cpp: A
[webkit-changes] [225510] trunk/Source/WebKit
Title: [225510] trunk/Source/WebKit Revision 225510 Author beid...@apple.com Date 2017-12-04 17:19:25 -0800 (Mon, 04 Dec 2017) Log Message Followup to: Get a directory path to SWServers for storing ServiceWorker registrations https://bugs.webkit.org/show_bug.cgi?id=180362 Unreviewed. * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::swServerForSession): Change this ASSERT which is invalid in private browsing sessions. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/StorageProcess.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (225509 => 225510) --- trunk/Source/WebKit/ChangeLog 2017-12-05 01:13:27 UTC (rev 225509) +++ trunk/Source/WebKit/ChangeLog 2017-12-05 01:19:25 UTC (rev 225510) @@ -1,3 +1,14 @@ +2017-12-04 Brady Eidson + +Followup to: +Get a directory path to SWServers for storing ServiceWorker registrations +https://bugs.webkit.org/show_bug.cgi?id=180362 + +Unreviewed. + +* StorageProcess/StorageProcess.cpp: +(WebKit::StorageProcess::swServerForSession): Change this ASSERT which is invalid in private browsing sessions. + 2017-12-04 Simon Fraser Minor DisplayRefreshMonitor-related cleanup Modified: trunk/Source/WebKit/StorageProcess/StorageProcess.cpp (225509 => 225510) --- trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2017-12-05 01:13:27 UTC (rev 225509) +++ trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2017-12-05 01:19:25 UTC (rev 225510) @@ -387,7 +387,7 @@ auto path = m_swDatabasePaths.get(sessionID); // There should already be a registered path for this PAL::SessionID. // If there's not, then where did this PAL::SessionID come from? -ASSERT(!path.isEmpty()); +ASSERT(sessionID.isEphemeral() || !path.isEmpty()); result.iterator->value = std::make_unique(makeUniqueRef(), path); return *result.iterator->value; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [225490] trunk/Source
Title: [225490] trunk/Source Revision 225490 Author beid...@apple.com Date 2017-12-04 13:50:31 -0800 (Mon, 04 Dec 2017) Log Message Get a directory path to SWServers for storing ServiceWorker registrations. https://bugs.webkit.org/show_bug.cgi?id=180362 Reviewed by Chris Dumez. Source/WebCore: No new tests (No observable behavior change yet). * workers/service/server/SWServer.cpp: (WebCore::SWServer::SWServer): * workers/service/server/SWServer.h: Source/WebKit: This gets all of the plumbing in place for specifying a ServiceWorker registration storage path in a particular WebsiteDataStore. * Shared/Storage/StorageProcessCreationParameters.cpp: (WebKit::StorageProcessCreationParameters::encode const): (WebKit::StorageProcessCreationParameters::decode): * Shared/Storage/StorageProcessCreationParameters.h: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::initializeWebsiteDataStore): (WebKit::StorageProcess::swServerForSession): * StorageProcess/StorageProcess.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::createWithLegacyOptions): (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration): (API::ProcessPoolConfiguration::ProcessPoolConfiguration): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): * UIProcess/WebProcessPool.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): (WebKit::WebsiteDataStore::storageProcessParameters): * UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const): * UIProcess/gtk/WebProcessPoolGtk.cpp: (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory): * UIProcess/wpe/WebProcessPoolWPE.cpp: (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/Storage/StorageProcessCreationParameters.cpp trunk/Source/WebKit/Shared/Storage/StorageProcessCreationParameters.h trunk/Source/WebKit/StorageProcess/StorageProcess.cpp trunk/Source/WebKit/StorageProcess/StorageProcess.h trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.h trunk/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm trunk/Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h trunk/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp trunk/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (225489 => 225490) --- trunk/Source/WebCore/ChangeLog 2017-12-04 21:43:36 UTC (rev 225489) +++ trunk/Source/WebCore/ChangeLog 2017-12-04 21:50:31 UTC (rev 225490) @@ -1,3 +1,16 @@ +2017-12-04 Brady Eidson + +Get a directory path to SWServers for storing ServiceWorker registrations. +https://bugs.webkit.org/show_bug.cgi?id=180362 + +Reviewed by Chris Dumez. + +No new tests (No observable behavior change yet). + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::SWServer): +* workers/service/server/SWServer.h: + 2017-12-04 Devin Rousso Web Inspector: provide method for recording CanvasRenderingContext2D from _javascript_ Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (225489 => 225490) --- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-12-04 21:43:36 UTC (rev 225489) +++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-12-04 21:50:31 UTC (rev 225490) @@ -204,9 +204,10 @@ m_server.syncTerminateWorker(*worker); } -SWServer::SWServer(UniqueRef&& originStore) +SWServer::SWServer(UniqueRef&& originStore, const String& registrationDatabaseDirectory) : m_originStore(WTFMove(originStore)) { +UNUSED_PARAM(registrationDatabaseDirectory); allServers().add(this); m_taskThread = Thread::create(ASCI
[webkit-changes] [225450] trunk/Source
Title: [225450] trunk/Source Revision 225450 Author beid...@apple.com Date 2017-12-02 10:00:19 -0800 (Sat, 02 Dec 2017) Log Message Factor out the "databaseTaskQueue" parts of IDBServer into something reusable. https://bugs.webkit.org/show_bug.cgi?id=180298 Reviewed by Chris Dumez. Source/WebCore: No new tests (Refactor only). * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::IDBServer): (WebCore::IDBServer::IDBServer::postDatabaseTask): (WebCore::IDBServer::IDBServer::postDatabaseTaskReply): (WebCore::IDBServer::IDBServer::databaseRunLoop): Deleted. (WebCore::IDBServer::IDBServer::handleTaskRepliesOnMainThread): Deleted. * Modules/indexeddb/server/IDBServer.h: (): Deleted. Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/CrossThreadTaskHandler.cpp: Added. (WTF::CrossThreadTaskHandler::CrossThreadTaskHandler): (WTF::CrossThreadTaskHandler::~CrossThreadTaskHandler): (WTF::CrossThreadTaskHandler::postTask): (WTF::CrossThreadTaskHandler::postTaskReply): (WTF::CrossThreadTaskHandler::taskRunLoop): (WTF::CrossThreadTaskHandler::handleTaskRepliesOnMainThread): * wtf/CrossThreadTaskHandler.h: Added. Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/WTF.xcodeproj/project.pbxproj trunk/Source/WTF/wtf/CMakeLists.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h Added Paths trunk/Source/WTF/wtf/CrossThreadTaskHandler.cpp trunk/Source/WTF/wtf/CrossThreadTaskHandler.h Diff Modified: trunk/Source/WTF/ChangeLog (225449 => 225450) --- trunk/Source/WTF/ChangeLog 2017-12-02 17:55:24 UTC (rev 225449) +++ trunk/Source/WTF/ChangeLog 2017-12-02 18:00:19 UTC (rev 225450) @@ -1,3 +1,22 @@ +2017-12-02 Brady Eidson + +Factor out the "databaseTaskQueue" parts of IDBServer into something reusable. +https://bugs.webkit.org/show_bug.cgi?id=180298 + +Reviewed by Chris Dumez. + +* WTF.xcodeproj/project.pbxproj: +* wtf/CMakeLists.txt: + +* wtf/CrossThreadTaskHandler.cpp: Added. +(WTF::CrossThreadTaskHandler::CrossThreadTaskHandler): +(WTF::CrossThreadTaskHandler::~CrossThreadTaskHandler): +(WTF::CrossThreadTaskHandler::postTask): +(WTF::CrossThreadTaskHandler::postTaskReply): +(WTF::CrossThreadTaskHandler::taskRunLoop): +(WTF::CrossThreadTaskHandler::handleTaskRepliesOnMainThread): +* wtf/CrossThreadTaskHandler.h: Added. + 2017-12-01 Mark Lam Let's scramble ClassInfo pointers in cells. Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (225449 => 225450) --- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-12-02 17:55:24 UTC (rev 225449) +++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-12-02 18:00:19 UTC (rev 225450) @@ -65,6 +65,7 @@ 2CDED0F318115C85004DBA70 /* RunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0F118115C85004DBA70 /* RunLoop.cpp */; }; 3337DB9CE743410FAF076E17 /* StackTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 313EDEC9778E49C9BEA91CFC /* StackTrace.cpp */; }; 515F794E1CFC9F4A00CCED93 /* CrossThreadCopier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515F794B1CFC9F4A00CCED93 /* CrossThreadCopier.cpp */; }; + 517F82D71FD22F3000DA3DEA /* CrossThreadTaskHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517F82D51FD22F2F00DA3DEA /* CrossThreadTaskHandler.cpp */; }; 51F1752B1F3D486000C74950 /* PersistentCoders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175261F3D486000C74950 /* PersistentCoders.cpp */; }; 51F1752C1F3D486000C74950 /* PersistentDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175271F3D486000C74950 /* PersistentDecoder.cpp */; }; 51F1752D1F3D486000C74950 /* PersistentEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175291F3D486000C74950 /* PersistentEncoder.cpp */; }; @@ -322,6 +323,8 @@ 515F794D1CFC9F4A00CCED93 /* CrossThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadTask.h; sourceTree = ""; }; 515F79551CFD3A6900CCED93 /* CrossThreadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadQueue.h; sourceTree = ""; }; 517A53571F5734B700DCDC0A /* Identified.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Identified.h; sourceTree = ""; }; + 517F82D51FD22F2F00DA3DEA /* CrossThreadTaskHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CrossThreadTaskHandler.cpp; sourceTree = ""; }; + 517F82D61FD22F2F00DA3DEA /* CrossThreadTaskHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadTaskHandler.h; sourceTree = ""; }; 5182C22C1F2BC7E60059BA7C /* InstanceCounted.h */ = {isa = PBXFileReference; lastKnownFileType = sourcec
[webkit-changes] [225403] trunk
Title: [225403] trunk Revision 225403 Author beid...@apple.com Date 2017-12-01 11:45:41 -0800 (Fri, 01 Dec 2017) Log Message Add Internals.terminateServiceWorker, and the ability to restart service workers for postMessage. https://bugs.webkit.org/show_bug.cgi?id=180170 Reviewed by Chris Dumez. Source/WebCore: Test: http/tests/workers/service/postmessage-after-terminate.https.html * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::~ActiveDOMObject): * testing/Internals.cpp: (WebCore::Internals::terminateServiceWorker): * testing/Internals.h: * testing/Internals.idl: * workers/service/SWClientConnection.h: * workers/service/ServiceWorker.idl: * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::postMessageToServiceWorkerGlobalScope): (WebCore::SWContextManager::terminateWorker): * workers/service/context/SWContextManager.h: * workers/service/context/ServiceWorkerThreadProxy.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::workerByID const): (WebCore::SWServer::Connection::syncTerminateWorker): (WebCore::SWServer::installContextData): (WebCore::SWServer::invokeRunServiceWorker): (WebCore::SWServer::terminateWorker): (WebCore::SWServer::syncTerminateWorker): (WebCore::SWServer::terminateWorkerInternal): (WebCore::SWServer::workerContextTerminated): * workers/service/server/SWServer.h: (WebCore::SWServer::workerByID const): Deleted. * workers/service/server/SWServerToContextConnection.h: * workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::contextData const): * workers/service/server/SWServerWorker.h: (WebCore::SWServerWorker::isRunning const): (WebCore::SWServerWorker::isTerminating const): (WebCore::SWServerWorker::setState): (WebCore::SWServerWorker::server): Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::startFetch): (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope): * StorageProcess/ServiceWorker/WebSWServerConnection.h: * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in: * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp: (WebKit::WebSWServerToContextConnection::syncTerminateWorker): * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h: * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::didReceiveSyncMessage): * WebProcess/Storage/WebSWClientConnection.cpp: (WebKit::WebSWClientConnection::syncTerminateWorker): * WebProcess/Storage/WebSWClientConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::terminateWorker): (WebKit::WebSWContextManagerConnection::syncTerminateWorker): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.messages.in: * WebProcess/Storage/WebToStorageProcessConnection.cpp: (WebKit::WebToStorageProcessConnection::didReceiveSyncMessage): * WebProcess/Storage/WebToStorageProcessConnection.h: Source/WTF: * wtf/CompletionHandler.h: (WTF::CompletionHandler Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/http/tests/workers/service/resources/basic-ServiceWorker-postMessage.js trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/CompletionHandler.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/ActiveDOMObject.cpp trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/Internals.h trunk/Source/WebCore/testing/Internals.idl trunk/Source/WebCore/workers/service/SWClientConnection.h trunk/Source/WebCore/workers/service/ServiceWorker.idl trunk/Source/WebCore/workers/service/context/SWContextManager.cpp trunk/Source/WebCore/workers/service/context/SWContextManager.h trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp trunk/Source/WebCore/workers/service/server/SWServerWorker.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.messages.in trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.h trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in trunk/Source/WebKit/WebProcess/Storage/WebT
[webkit-changes] [225343] trunk/Source/WebCore
Title: [225343] trunk/Source/WebCore Revision 225343 Author beid...@apple.com Date 2017-11-30 13:01:12 -0800 (Thu, 30 Nov 2017) Log Message Make WorkerThread lifetime much more predictable. https://bugs.webkit.org/show_bug.cgi?id=180203 Reviewed by Chris Dumez. No new tests (Fixes flakiness in existing and future tests). The family of classes related to Workers has a complicated ownership model. For Dedicated Workers, the WorkerThread object is owned by the WorkerMessagingProxy, which manages its own lifetime. Additionally, other object(s) have raw C++ references to it, and the expected lifetimes are described in comments scattered through a few files. What it boils down to is that the "Worker" DOM object - which lives on the main thread - is the key to the proper destruction of all of these objects. For ServiceWorkers running in their own context process, there is no "Worker" on the main thread. As a result, ServiceWorkers can get into a situation where their WorkerThread can be destroyed before their ServiceWorkerGlobalScope is destroyed on the running background thread. There's no reason to not have WorkerThread guarantee its own lifetime until its background thread has actually completed. * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): Protect the WorkerThread object during the entire runtime of the background thread itself, and release that protection on the main thread. * workers/WorkerThread.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/WorkerThread.cpp trunk/Source/WebCore/workers/WorkerThread.h Diff Modified: trunk/Source/WebCore/ChangeLog (225342 => 225343) --- trunk/Source/WebCore/ChangeLog 2017-11-30 20:48:53 UTC (rev 225342) +++ trunk/Source/WebCore/ChangeLog 2017-11-30 21:01:12 UTC (rev 225343) @@ -1,3 +1,34 @@ +2017-11-30 Brady Eidson + +Make WorkerThread lifetime much more predictable. +https://bugs.webkit.org/show_bug.cgi?id=180203 + +Reviewed by Chris Dumez. + +No new tests (Fixes flakiness in existing and future tests). + +The family of classes related to Workers has a complicated ownership model. + +For Dedicated Workers, the WorkerThread object is owned by the WorkerMessagingProxy, +which manages its own lifetime. Additionally, other object(s) have raw C++ references +to it, and the expected lifetimes are described in comments scattered through a few files. + +What it boils down to is that the "Worker" DOM object - which lives on the main thread - +is the key to the proper destruction of all of these objects. + +For ServiceWorkers running in their own context process, there is no "Worker" on the main thread. + +As a result, ServiceWorkers can get into a situation where their WorkerThread can be destroyed before +their ServiceWorkerGlobalScope is destroyed on the running background thread. + +There's no reason to not have WorkerThread guarantee its own lifetime until its background thread +has actually completed. + +* workers/WorkerThread.cpp: +(WebCore::WorkerThread::workerThread): Protect the WorkerThread object during the entire runtime + of the background thread itself, and release that protection on the main thread. +* workers/WorkerThread.h: + 2017-11-30 Chris Dumez Populate self.registration.installing/waiting/active inside service workers Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (225342 => 225343) --- trunk/Source/WebCore/workers/WorkerThread.cpp 2017-11-30 20:48:53 UTC (rev 225342) +++ trunk/Source/WebCore/workers/WorkerThread.cpp 2017-11-30 21:01:12 UTC (rev 225343) @@ -149,6 +149,8 @@ void WorkerThread::workerThread() { +auto protectedThis = makeRef(*this); + // Propagate the mainThread's fenv to workers. #if PLATFORM(IOS) FloatingPointEnvironment::singleton().propagateMainThreadEnvironment(); @@ -231,6 +233,9 @@ // Clean up WebCore::ThreadGlobalData before WTF::Thread goes away! threadGlobalData().destroy(); +// Send the last WorkerThread Ref to be Deref'ed on the main thread. +callOnMainThread([protectedThis = WTFMove(protectedThis)] { }); + // The thread object may be already destroyed from notification now, don't try to access "this". protector->detach(); } Modified: trunk/Source/WebCore/workers/WorkerThread.h (225342 => 225343) --- trunk/Source/WebCore/workers/WorkerThread.h 2017-11-30 20:48:53 UTC (rev 225342) +++ trunk/Source/WebCore/workers/WorkerThread.h 2017-11-30 21:01:12 UTC (rev 225343) @@ -59,7 +59,7 @@ struct WorkerThreadStartupData; -class WorkerThread : public RefCounted { +class WorkerThread : public ThreadSafeRefCounted { public: virtual ~WorkerThread(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [225298] trunk/Source
Title: [225298] trunk/Source Revision 225298 Author beid...@apple.com Date 2017-11-29 15:16:03 -0800 (Wed, 29 Nov 2017) Log Message When managing context startups, make ServiceWorkerJobDataIdentifier's optional. https://bugs.webkit.org/show_bug.cgi?id=180166 Reviewed by Chris Dumez. Source/WebCore: No new tests (No behavior change). We'll sometimes be starting SW contexts without an associated job, so ServiceWorkerContextData should not required actually having a job identifier. * workers/service/ServiceWorkerContextData.h: (WebCore::ServiceWorkerContextData::decode): * workers/service/context/SWContextManager.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::scriptContextFailedToStart): (WebCore::SWServer::scriptContextStarted): (WebCore::SWServer::didFinishInstall): * workers/service/server/SWServer.h: * workers/service/server/SWServerToContextConnection.cpp: (WebCore::SWServerToContextConnection::scriptContextFailedToStart): (WebCore::SWServerToContextConnection::scriptContextStarted): (WebCore::SWServerToContextConnection::didFinishInstall): * workers/service/server/SWServerToContextConnection.h: * workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::scriptContextFailedToStart): (WebCore::SWServerWorker::scriptContextStarted): (WebCore::SWServerWorker::didFinishInstall): * workers/service/server/SWServerWorker.h: Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage): (WebKit::WebSWContextManagerConnection::didFinishInstall): * WebProcess/Storage/WebSWContextManagerConnection.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h trunk/Source/WebCore/workers/service/context/SWContextManager.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.cpp trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp trunk/Source/WebCore/workers/service/server/SWServerWorker.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h Diff Modified: trunk/Source/WebCore/ChangeLog (225297 => 225298) --- trunk/Source/WebCore/ChangeLog 2017-11-29 23:03:49 UTC (rev 225297) +++ trunk/Source/WebCore/ChangeLog 2017-11-29 23:16:03 UTC (rev 225298) @@ -1,3 +1,38 @@ +2017-11-29 Brady Eidson + +When managing context startups, make ServiceWorkerJobDataIdentifier's optional. +https://bugs.webkit.org/show_bug.cgi?id=180166 + +Reviewed by Chris Dumez. + +No new tests (No behavior change). + +We'll sometimes be starting SW contexts without an associated job, so ServiceWorkerContextData +should not required actually having a job identifier. + +* workers/service/ServiceWorkerContextData.h: +(WebCore::ServiceWorkerContextData::decode): + +* workers/service/context/SWContextManager.h: + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::scriptContextFailedToStart): +(WebCore::SWServer::scriptContextStarted): +(WebCore::SWServer::didFinishInstall): +* workers/service/server/SWServer.h: + +* workers/service/server/SWServerToContextConnection.cpp: +(WebCore::SWServerToContextConnection::scriptContextFailedToStart): +(WebCore::SWServerToContextConnection::scriptContextStarted): +(WebCore::SWServerToContextConnection::didFinishInstall): +* workers/service/server/SWServerToContextConnection.h: + +* workers/service/server/SWServerWorker.cpp: +(WebCore::SWServerWorker::scriptContextFailedToStart): +(WebCore::SWServerWorker::scriptContextStarted): +(WebCore::SWServerWorker::didFinishInstall): +* workers/service/server/SWServerWorker.h: + 2017-11-29 Youenn Fablet Add support for service worker generated redirections Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h (225297 => 225298) --- trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h 2017-11-29 23:03:49 UTC (rev 225297) +++ trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h 2017-11-29 23:16:03 UTC (rev 225298) @@ -36,7 +36,7 @@ namespace WebCore { struct ServiceWorkerContextData { -ServiceWorkerJobDataIdentifier jobDataIdentifier; +std::optional jobDataIdentifier; ServiceWorkerRegistrationData registration; ServiceWorkerIdentifier serviceWorkerIdentifier; String script; @@ -58,7 +58,7 @@ template std::optional
[webkit-changes] [224941] trunk/Source/WebCore
Title: [224941] trunk/Source/WebCore Revision 224941 Author beid...@apple.com Date 2017-11-16 16:28:30 -0800 (Thu, 16 Nov 2017) Log Message Crash in worker tests handling the m_stoppedCallback. and https://bugs.webkit.org/show_bug.cgi?id=179798 Reviewed by Chris Dumez. No new tests (Covered by existing tests). Protect manipulation of m_stoppedCallback with m_threadCreationAndWorkerGlobalScopeMutex. * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): (WebCore::WorkerThread::stop): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/WorkerThread.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (224940 => 224941) --- trunk/Source/WebCore/ChangeLog 2017-11-17 00:26:30 UTC (rev 224940) +++ trunk/Source/WebCore/ChangeLog 2017-11-17 00:28:30 UTC (rev 224941) @@ -1,3 +1,18 @@ +2017-11-16 Brady Eidson + +Crash in worker tests handling the m_stoppedCallback. + and https://bugs.webkit.org/show_bug.cgi?id=179798 + +Reviewed by Chris Dumez. + +No new tests (Covered by existing tests). + +Protect manipulation of m_stoppedCallback with m_threadCreationAndWorkerGlobalScopeMutex. + +* workers/WorkerThread.cpp: +(WebCore::WorkerThread::workerThread): +(WebCore::WorkerThread::stop): + 2017-11-16 Antoine Quint [Web Animations] Express time in milliseconds through the API Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (224940 => 224941) --- trunk/Source/WebCore/workers/WorkerThread.cpp 2017-11-17 00:26:30 UTC (rev 224940) +++ trunk/Source/WebCore/workers/WorkerThread.cpp 2017-11-17 00:28:30 UTC (rev 224941) @@ -219,6 +219,9 @@ // context will trigger the main thread to race against us to delete the WorkerThread // object, and the WorkerThread object owns the mutex we need to unlock after this. workerGlobalScopeToDelete = WTFMove(m_workerGlobalScope); + +if (m_stoppedCallback) +callOnMainThread(WTFMove(m_stoppedCallback)); } // The below assignment will destroy the context, which will in turn notify messaging proxy. @@ -228,9 +231,6 @@ // Clean up WebCore::ThreadGlobalData before WTF::Thread goes away! threadGlobalData().destroy(); -if (m_stoppedCallback) -callOnMainThread(WTFMove(m_stoppedCallback)); - // The thread object may be already destroyed from notification now, don't try to access "this". protector->detach(); } @@ -259,14 +259,14 @@ void WorkerThread::stop(WTF::Function&& stoppedCallback) { -ASSERT(!m_stoppedCallback); -m_stoppedCallback = WTFMove(stoppedCallback); - // Mutex protection is necessary to ensure that m_workerGlobalScope isn't changed by // WorkerThread::workerThread() while we're accessing it. Note also that stop() can // be called before m_workerGlobalScope is fully created. LockHolder lock(m_threadCreationAndWorkerGlobalScopeMutex); +ASSERT(!m_stoppedCallback); +m_stoppedCallback = WTFMove(stoppedCallback); + // Ensure that tasks are being handled by thread event loop. If script execution weren't forbidden, a while(1) loop in JS could keep the thread alive forever. if (m_workerGlobalScope) { m_workerGlobalScope->script()->scheduleExecutionTermination(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [224909] trunk/Source
Title: [224909] trunk/Source Revision 224909 Author beid...@apple.com Date 2017-11-15 19:05:02 -0800 (Wed, 15 Nov 2017) Log Message Implement basics of "Terminate Service Worker" algorithm. https://bugs.webkit.org/show_bug.cgi?id=179551 Reviewed by Chris Dumez. Source/WebCore: No new tests (No observable behavior change yet). * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::stopIndexedDatabase): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerThreadCreated): (WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope): * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): (WebCore::WorkerThread::stop): * workers/WorkerThread.h: * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::terminateWorker): * workers/service/context/SWContextManager.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::workerContextTerminated): (WebCore::SWServer::terminateWorker): * workers/service/server/SWServer.h: * workers/service/server/SWServerToContextConnection.cpp: (WebCore::SWServerToContextConnection::workerTerminated): * workers/service/server/SWServerToContextConnection.h: * workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::terminate): (WebCore::SWServerWorker::contextTerminated): * workers/service/server/SWServerWorker.h: Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp: (WebKit::WebSWServerToContextConnection::terminateWorker): * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h: * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::terminateWorker): (WebKit::WebSWContextManagerConnection::workerTerminated): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.messages.in: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/WorkerGlobalScope.cpp trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp trunk/Source/WebCore/workers/WorkerThread.cpp trunk/Source/WebCore/workers/WorkerThread.h trunk/Source/WebCore/workers/service/context/SWContextManager.cpp trunk/Source/WebCore/workers/service/context/SWContextManager.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.cpp trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp trunk/Source/WebCore/workers/service/server/SWServerWorker.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.h trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in Diff Modified: trunk/Source/WebCore/ChangeLog (224908 => 224909) --- trunk/Source/WebCore/ChangeLog 2017-11-16 01:17:02 UTC (rev 224908) +++ trunk/Source/WebCore/ChangeLog 2017-11-16 03:05:02 UTC (rev 224909) @@ -1,3 +1,42 @@ +2017-11-15 Brady Eidson + +Implement basics of "Terminate Service Worker" algorithm. +https://bugs.webkit.org/show_bug.cgi?id=179551 + +Reviewed by Chris Dumez. + +No new tests (No observable behavior change yet). + +* workers/WorkerGlobalScope.cpp: +(WebCore::WorkerGlobalScope::stopIndexedDatabase): + +* workers/WorkerMessagingProxy.cpp: +(WebCore::WorkerMessagingProxy::workerThreadCreated): +(WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope): + +* workers/WorkerThread.cpp: +(WebCore::WorkerThread::workerThread): +(WebCore::WorkerThread::stop): +* workers/WorkerThread.h: + +* workers/service/context/SWContextManager.cpp: +(WebCore::SWContextManager::terminateWorker): +* workers/service/context/SWContextManager.h: + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::workerContextTerminated): +(WebCore::SWServer::terminateWorker): +* workers/service/server/SWServer.h: + +* workers/service/server/SWServerToContextConnection.cpp: +(WebCore::SWServerToContextConnection::workerTerminated): +* workers/service/server/SWServerToContextConnection.h: + +* workers/service/server/SWServerWorker.cpp: +(WebCore::SWServerWorker::terminate): +(WebCore::SWServerWorker::contextTerminated): +* workers/service/server/SWServerWorker.h: + 2017-11-15 Eric Carlson Log media readyState and networkState as strings Mod
[webkit-changes] [224824] trunk/Source/WebCore
Title: [224824] trunk/Source/WebCore Revision 224824 Author beid...@apple.com Date 2017-11-14 11:40:02 -0800 (Tue, 14 Nov 2017) Log Message Remove some accidentally checked-in commented-out code. Unreviewed. * workers/service/server/SWServer.cpp: (WebCore::SWServer::fireInstallEvent): (WebCore::SWServer::fireActivateEvent): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/server/SWServer.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (224823 => 224824) --- trunk/Source/WebCore/ChangeLog 2017-11-14 19:15:23 UTC (rev 224823) +++ trunk/Source/WebCore/ChangeLog 2017-11-14 19:40:02 UTC (rev 224824) @@ -1,3 +1,13 @@ +2017-11-14 Brady Eidson + +Remove some accidentally checked-in commented-out code. + +Unreviewed. + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::fireInstallEvent): +(WebCore::SWServer::fireActivateEvent): + 2017-11-14 Alex Christensen Clean up old URL parser remnants Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (224823 => 224824) --- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-11-14 19:15:23 UTC (rev 224823) +++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-11-14 19:40:02 UTC (rev 224824) @@ -329,12 +329,6 @@ void SWServer::fireInstallEvent(SWServerWorker& worker) { -//auto* worker = m_workersByID.get(serviceWorkerIdentifier); -//if (!worker) { -//LOG_ERROR("Request to fire install event on a worker that cannot be found in the server"); -//return; -//} - auto* connection = SWServerToContextConnection::connectionForIdentifier(worker.contextConnectionIdentifier()); if (!connection) { LOG_ERROR("Request to fire install event on a worker whose context connection does not exist"); @@ -346,12 +340,6 @@ void SWServer::fireActivateEvent(SWServerWorker& worker) { -//auto* worker = m_workersByID.get(serviceWorkerIdentifier); -//if (!worker) { -//LOG_ERROR("Request to fire install event on a worker that cannot be found in the server"); -//return; -//} - auto* connection = SWServerToContextConnection::connectionForIdentifier(worker.contextConnectionIdentifier()); if (!connection) { LOG_ERROR("Request to fire install event on a worker whose context connection does not exist"); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [224611] trunk/Source/WebCore
Title: [224611] trunk/Source/WebCore Revision 224611 Author beid...@apple.com Date 2017-11-08 17:13:27 -0800 (Wed, 08 Nov 2017) Log Message ServiceWorkerRegistration::updateStateFromServer fix! (Don't always create a new ServiceWorker every time). https://bugs.webkit.org/show_bug.cgi?id=179456 Reviewed by Chris Dumez. No new tests (No behavior change yet). * workers/service/ServiceWorkerRegistration.cpp: (WebCore::ServiceWorkerRegistration::updateStateFromServer): Re-use a previous worker instead of always creating a new one. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (224610 => 224611) --- trunk/Source/WebCore/ChangeLog 2017-11-09 00:53:58 UTC (rev 224610) +++ trunk/Source/WebCore/ChangeLog 2017-11-09 01:13:27 UTC (rev 224611) @@ -1,3 +1,15 @@ +2017-11-08 Brady Eidson + +ServiceWorkerRegistration::updateStateFromServer fix! (Don't always create a new ServiceWorker every time). +https://bugs.webkit.org/show_bug.cgi?id=179456 + +Reviewed by Chris Dumez. + +No new tests (No behavior change yet). + +* workers/service/ServiceWorkerRegistration.cpp: +(WebCore::ServiceWorkerRegistration::updateStateFromServer): Re-use a previous worker instead of always creating a new one. + 2017-11-08 Brent Fulgham XMLHttpRequest should not treat file URLs as same origin Modified: trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp (224610 => 224611) --- trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp 2017-11-09 00:53:58 UTC (rev 224610) +++ trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp 2017-11-09 01:13:27 UTC (rev 224611) @@ -170,8 +170,13 @@ return; RefPtr worker; -if (serviceWorkerIdentifier) -worker = ServiceWorker::create(*context, *serviceWorkerIdentifier, m_registrationData.scriptURL); +if (serviceWorkerIdentifier) { +auto* newestWorker = getNewestWorker(); +if (newestWorker && newestWorker->identifier() == *serviceWorkerIdentifier) +worker = newestWorker; +else +worker = ServiceWorker::create(*context, *serviceWorkerIdentifier, m_registrationData.scriptURL); +} switch (state) { case ServiceWorkerRegistrationState::Installing: ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [224601] trunk
Title: [224601] trunk Revision 224601 Author beid...@apple.com Date 2017-11-08 15:15:03 -0800 (Wed, 08 Nov 2017) Log Message Some SW Container and Registration tweaks. https://bugs.webkit.org/show_bug.cgi?id=179450 Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt: Source/WebCore: No new tests (Progression in an existing test). * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): * workers/service/ServiceWorkerRegistration.cpp: (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): Modified Paths trunk/LayoutTests/imported/w3c/ChangeLog trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp Diff Modified: trunk/LayoutTests/imported/w3c/ChangeLog (224600 => 224601) --- trunk/LayoutTests/imported/w3c/ChangeLog 2017-11-08 23:13:42 UTC (rev 224600) +++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-11-08 23:15:03 UTC (rev 224601) @@ -1,3 +1,12 @@ +2017-11-08 Brady Eidson + +Some SW Container and Registration tweaks. +https://bugs.webkit.org/show_bug.cgi?id=179450 + +Reviewed by Chris Dumez. + +* web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt: + 2017-11-08 Maciej Stachowiak Switch encoding WPT test suite to updating via import-w3c-tests Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt (224600 => 224601) --- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt 2017-11-08 23:13:42 UTC (rev 224600) +++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt 2017-11-08 23:15:03 UTC (rev 224601) @@ -1,4 +1,4 @@ -CONSOLE MESSAGE: line 27: Unhandled Promise Rejection: InvalidStateError: newestWorker is null +CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Cannot update a null/nonexistent service worker registration FAIL Claim works after redirection to another origin assert_equals: expected (string) "updated" but got (undefined) undefined Modified: trunk/Source/WebCore/ChangeLog (224600 => 224601) --- trunk/Source/WebCore/ChangeLog 2017-11-08 23:13:42 UTC (rev 224600) +++ trunk/Source/WebCore/ChangeLog 2017-11-08 23:15:03 UTC (rev 224601) @@ -1,3 +1,17 @@ +2017-11-08 Brady Eidson + +Some SW Container and Registration tweaks. +https://bugs.webkit.org/show_bug.cgi?id=179450 + +Reviewed by Chris Dumez. + +No new tests (Progression in an existing test). + +* workers/service/ServiceWorkerContainer.cpp: +(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): +* workers/service/ServiceWorkerRegistration.cpp: +(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): + 2017-11-08 Antti Koivisto Move inlineElementContinuation function to RenderBoxModelObject and rename to inlineContinuation Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (224600 => 224601) --- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2017-11-08 23:13:42 UTC (rev 224600) +++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2017-11-08 23:15:03 UTC (rev 224601) @@ -345,19 +345,12 @@ return; } -ASSERT(data.installingServiceWorkerIdentifier); -auto installingServiceWorkerIdentifier = *data.installingServiceWorkerIdentifier; - RefPtr registration = m_registrations.get(data.key); if (!registration) registration = ServiceWorkerRegistration::create(*context, *this, WTFMove(data)); -registration->updateStateFromServer(ServiceWorkerRegistrationState::Installing, installingServiceWorkerIdentifier); -ASSERT(registration->installing()); -registration->installing()->updateWorkerState(ServiceWorkerState::Installing, ServiceWorker::DoNotFireStateChangeEvent); - // FIXME: Implement proper selection of service workers. -context->setActiveServiceWorker(registration->installing()); +context->setActiveServiceWorker(registration->getNewestWorker()); LOG(ServiceWorker, "Container %p resolved job with registration %p", this, registration.get()); Modified: trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp (224600 => 224601) --- trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp 2017-11-08 23:13:42 UTC (rev 224600) +++ trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp 2017-11-08 23:15:03 UTC (rev 224601) @@ -44,6 +44,22 @@ { LOG(ServiceWorker, "Creating registration %p
[webkit-changes] [224553] trunk
Title: [224553] trunk Revision 224553 Author beid...@apple.com Date 2017-11-07 15:06:55 -0800 (Tue, 07 Nov 2017) Log Message Implement "UpdateWorkerState" and use it https://bugs.webkit.org/show_bug.cgi?id=179318 Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/service-workers/service-worker/update.https-expected.txt: Source/WebCore: No new tests (Existing tests and changes there-to). * workers/service/ServiceWorker.cpp: (WebCore::ServiceWorker::allWorkers): (WebCore::ServiceWorker::mutableAllWorkers): (WebCore::ServiceWorker::ServiceWorker): (WebCore::ServiceWorker::~ServiceWorker): (WebCore::ServiceWorker::updateWorkerState): (WebCore::ServiceWorker::setState): Deleted. * workers/service/ServiceWorker.h: * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::updateRegistrationState): (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerRegistration.cpp: (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): (WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration): (WebCore::ServiceWorkerRegistration::updateStateFromServer): * workers/service/ServiceWorkerRegistrationData.cpp: (WebCore::ServiceWorkerRegistrationData::isolatedCopy const): * workers/service/ServiceWorkerRegistrationData.h: (WebCore::ServiceWorkerRegistrationData::encode const): (WebCore::ServiceWorkerRegistrationData::decode): * workers/service/ServiceWorkerRegistrationKey.cpp: (WebCore::ServiceWorkerRegistrationKey::loggingString const): * workers/service/ServiceWorkerRegistrationKey.h: * workers/service/ServiceWorkerTypes.h: * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::registerServiceWorkerThreadForInstall): (WebCore::SWContextManager::registerServiceWorkerThreadForUpdate): Deleted. * workers/service/context/SWContextManager.h: * workers/service/server/SWClientConnection.cpp: (WebCore::SWClientConnection::updateRegistrationState): (WebCore::SWClientConnection::updateWorkerState): * workers/service/server/SWClientConnection.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::updateWorker): * workers/service/server/SWServer.h: (WebCore::SWServer::workerByID const): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::scriptFetchFinished): (WebCore::SWServerJobQueue::scriptContextStarted): (WebCore::SWServerJobQueue::install): (WebCore::SWServerJobQueue::tryClearRegistration): * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::updateRegistrationState): (WebCore::SWServerRegistration::updateWorkerState): (WebCore::SWServerRegistration::data const): * workers/service/server/SWServerRegistration.h: (WebCore::SWServerRegistration::setActiveServiceWorkerIdentifier): Deleted. * workers/service/server/SWServerWorker.h: (WebCore::SWServerWorker::state const): (WebCore::SWServerWorker::setState): Source/WebKit: * Scripts/webkit/messages.py: (headers_for_type): * Shared/WebCoreArgumentCoders.h: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::updateWorkerStateInClient): (WebKit::WebSWServerConnection::installServiceWorkerContext): (WebKit::WebSWServerConnection::setContextConnection): (WebKit::WebSWServerConnection::updateServiceWorkerContext): Deleted. * StorageProcess/ServiceWorker/WebSWServerConnection.h: * WebProcess/Storage/WebSWClientConnection.messages.in: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): (WebKit::WebSWContextManagerConnection::updateServiceWorker): Deleted. * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.messages.in: Source/WTF: * wtf/ObjectIdentifier.h: (WTF::ObjectIdentifier::loggingString const): Modified Paths trunk/LayoutTests/imported/w3c/ChangeLog trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/update.https-expected.txt trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/ObjectIdentifier.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/ServiceWorker.cpp trunk/Source/WebCore/workers/service/ServiceWorker.h trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationData.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationData.h trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h trunk/Source/WebCore/workers/service/ServiceWorkerTypes.h trunk/Source/WebCore/workers/service/context/SWContextManager.cpp trunk/Source/WebCore/workers/service/context/SWContextManager.h trunk/Source/WebCore/workers/service/server/SWClientConnection.cpp trunk
[webkit-changes] [224418] trunk/Source/WebCore
Title: [224418] trunk/Source/WebCore Revision 224418 Author beid...@apple.com Date 2017-11-03 13:12:10 -0700 (Fri, 03 Nov 2017) Log Message Remove an invalid ASSERT that is seen intermittently. https://bugs.webkit.org/show_bug.cgi?id=179186 Unreviewed. * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::removeClientServiceWorkerRegistration): This is an invalid ASSERT, it's definitely racey over IPC. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (224417 => 224418) --- trunk/Source/WebCore/ChangeLog 2017-11-03 20:02:06 UTC (rev 224417) +++ trunk/Source/WebCore/ChangeLog 2017-11-03 20:12:10 UTC (rev 224418) @@ -1,3 +1,14 @@ +2017-11-03 Brady Eidson + +Remove an invalid ASSERT that is seen intermittently. +https://bugs.webkit.org/show_bug.cgi?id=179186 + +Unreviewed. + +* workers/service/server/SWServerRegistration.cpp: +(WebCore::SWServerRegistration::removeClientServiceWorkerRegistration): This is an invalid ASSERT, + it's definitely racey over IPC. + 2017-11-03 Michael Catanzaro [WPE] Remove unneeded USE(LIBEPOXY) guards Modified: trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp (224417 => 224418) --- trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp 2017-11-03 20:02:06 UTC (rev 224417) +++ trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp 2017-11-03 20:12:10 UTC (rev 224418) @@ -104,7 +104,6 @@ if (iterator == m_clientRegistrationsByConnection.end() || !iterator->value) return; -ASSERT(iterator->value->contains(clientRegistrationIdentifier)); iterator->value->remove(clientRegistrationIdentifier); if (iterator->value->isEmpty()) m_clientRegistrationsByConnection.remove(iterator); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [224379] trunk/Source
Title: [224379] trunk/Source Revision 224379 Author beid...@apple.com Date 2017-11-02 21:36:20 -0700 (Thu, 02 Nov 2017) Log Message SW: Implement "Update Registration State" algorithm (unused for now) https://bugs.webkit.org/show_bug.cgi?id=179186 Reviewed by Chris Dumez. Source/WebCore: No new tests (No behavior change yet). This algorithm is very simple, and this patch plumbs it through. But it's not useful to start using this algorithm without "Update Worker State" also. So to keep this patch small, it's unused for now. Will be used in the next patch. * WebCore.xcodeproj/project.pbxproj: * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): * workers/service/ServiceWorkerRegistration.cpp: (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): (WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration): (WebCore::ServiceWorkerRegistration::updateStateFromServer): * workers/service/ServiceWorkerRegistration.h: * workers/service/ServiceWorkerTypes.h: Copied from Source/WebCore/workers/service/server/SWServerRegistration.cpp. * workers/service/server/SWClientConnection.cpp: (WebCore::SWClientConnection::addServiceWorkerRegistration): (WebCore::SWClientConnection::removeServiceWorkerRegistration): (WebCore::SWClientConnection::updateRegistrationState): * workers/service/server/SWClientConnection.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::addServiceWorkerRegistrationInServer): (WebCore::SWServer::Connection::removeServiceWorkerRegistrationInServer): (WebCore::SWServer::addClientServiceWorkerRegistration): (WebCore::SWServer::removeClientServiceWorkerRegistration): * workers/service/server/SWServer.h: (WebCore::SWServer::getConnection): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runRegisterJob): * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::SWServerRegistration): (WebCore::SWServerRegistration::updateRegistrationState): (WebCore::SWServerRegistration::addClientServiceWorkerRegistration): (WebCore::SWServerRegistration::removeClientServiceWorkerRegistration): * workers/service/server/SWServerRegistration.h: Source/WebKit: * Scripts/webkit/messages.py: (headers_for_type): * Shared/WebCoreArgumentCoders.h: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::updateRegistrationStateInClient): * StorageProcess/ServiceWorker/WebSWServerConnection.h: * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in: * WebProcess/Storage/WebSWClientConnection.cpp: (WebKit::WebSWClientConnection::addServiceWorkerRegistrationInServer): (WebKit::WebSWClientConnection::removeServiceWorkerRegistrationInServer): * WebProcess/Storage/WebSWClientConnection.h: * WebProcess/Storage/WebSWClientConnection.messages.in: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.h trunk/Source/WebCore/workers/service/server/SWClientConnection.cpp trunk/Source/WebCore/workers/service/server/SWClientConnection.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp trunk/Source/WebCore/workers/service/server/SWServerRegistration.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Scripts/webkit/messages.py trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.messages.in trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.messages.in Added Paths trunk/Source/WebCore/workers/service/ServiceWorkerTypes.h Diff Modified: trunk/Source/WebCore/ChangeLog (224378 => 224379) --- trunk/Source/WebCore/ChangeLog 2017-11-03 03:48:11 UTC (rev 224378) +++ trunk/Source/WebCore/ChangeLog 2017-11-03 04:36:20 UTC (rev 224379) @@ -1,3 +1,53 @@ +2017-11-02 Brady Eidson + +SW: Implement "Update Registration State" algorithm (unused for now) +https://bugs.webkit.org/show_bug.cgi?id=179186 + +Reviewed by Chris Dumez. + +No new tests (No behavior change yet). + +This algorithm is very simple, and this patch plumbs it through. +But it's not useful to start using this algorithm without "Update Worker State" also. +So to keep this patch small, it's unused for now. Will be used in the next patch. +
[webkit-changes] [224295] trunk/Source
Title: [224295] trunk/Source Revision 224295 Author beid...@apple.com Date 2017-11-01 14:23:52 -0700 (Wed, 01 Nov 2017) Log Message Plumbing for handling SW scripts failing to evaluate https://bugs.webkit.org/show_bug.cgi?id=178926 Reviewed by Chris Dumez. Source/WebCore: No new tests (Currently no observable behavior change). In an upcoming patch we'll actually run the appropriate observable steps for when a ServiceWorker script fails to evaluate. This is a standalone refactoring + plumbing patch that will make the observable changes easier to review. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): * bindings/js/WorkerScriptController.h: (WebCore::WorkerScriptController::workerGlobalScopeWrapper): (WebCore::WorkerScriptController::vm): (WebCore::WorkerScriptController::initScriptIfNeeded): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): * workers/WorkerThread.cpp: (WebCore::WorkerThread::start): (WebCore::WorkerThread::workerThread): * workers/WorkerThread.h: * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::registerServiceWorkerThreadForUpdate): (WebCore::SWContextManager::registerServiceWorkerThread): Deleted. * workers/service/context/SWContextManager.h: * workers/service/context/ServiceWorkerThread.h: (WebCore::ServiceWorkerThread::serverConnectionIdentifier const): (WebCore::ServiceWorkerThread::contextData const): * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::create): (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): * workers/service/server/SWServer.cpp: (WebCore::SWServer::updateWorker): (WebCore::SWServer::createWorker): Deleted. * workers/service/server/SWServer.h: * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::scriptFetchFinished): (WebCore::SWServerRegistration::scriptContextFailedToStart): Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::updateServiceWorkerContext): (WebKit::WebSWServerConnection::setContextConnection): (WebKit::WebSWServerConnection::startServiceWorkerContext): Deleted. * StorageProcess/ServiceWorker/WebSWServerConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::updateServiceWorker): (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage): (WebKit::WebSWContextManagerConnection::startServiceWorker): Deleted. * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.messages.in: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp trunk/Source/WebCore/bindings/js/WorkerScriptController.h trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp trunk/Source/WebCore/workers/WorkerThread.cpp trunk/Source/WebCore/workers/WorkerThread.h trunk/Source/WebCore/workers/service/context/SWContextManager.cpp trunk/Source/WebCore/workers/service/context/SWContextManager.h trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in Diff Modified: trunk/Source/WebCore/ChangeLog (224294 => 224295) --- trunk/Source/WebCore/ChangeLog 2017-11-01 21:06:50 UTC (rev 224294) +++ trunk/Source/WebCore/ChangeLog 2017-11-01 21:23:52 UTC (rev 224295) @@ -1,3 +1,55 @@ +2017-11-01 Brady Eidson + +Plumbing for handling SW scripts failing to evaluate +https://bugs.webkit.org/show_bug.cgi?id=178926 + +Reviewed by Chris Dumez. + +No new tests (Currently no observable behavior change). + +In an upcoming patch we'll actually run the appropriate observable steps for when +a ServiceWorker script fails to evaluate. + +This is a standalone refactoring + plumbing patch that will make the observable changes +easier to review. + +* bindings/js/WorkerScriptController.cpp: +(WebCore::WorkerScriptController::evaluate): +* bindings/js/WorkerScriptController.h: +(WebCore::WorkerScriptController::workerGlobalScopeWrapper): +(WebCore::WorkerScriptController::vm): +(WebCore::WorkerScriptController::initScriptIfNeeded): + +* workers/WorkerMessagingProxy.cpp: +(WebCore::WorkerMessagingProx
[webkit-changes] [223277] trunk
Title: [223277] trunk Revision 223277 Author beid...@apple.com Date 2017-10-12 23:44:47 -0700 (Thu, 12 Oct 2017) Log Message SW "Hello world". https://bugs.webkit.org/show_bug.cgi?id=178187 Reviewed by Andy Estes. Source/WebCore: No new tests (Covered by changes to existing tests). With this patch, SW scripts are actually compiled and run inside a ServiceWorkerGlobalScope environment in the SW context process. * WebCore.xcodeproj/project.pbxproj: * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * dom/EventTargetFactory.in: * workers/WorkerGlobalScope.h: (WebCore::WorkerGlobalScope::isServiceWorkerGlobalScope const): * workers/service/ServiceWorkerContextData.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp. (WebCore::ServiceWorkerContextData::isolatedCopy const): * workers/service/ServiceWorkerContextData.h: (WebCore::ServiceWorkerContextData::encode const): (WebCore::ServiceWorkerContextData::decode): * workers/service/ServiceWorkerGlobalScope.cpp: (WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope): (WebCore::ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope): (WebCore::ServiceWorkerGlobalScope::registration): (WebCore::ServiceWorkerGlobalScope::eventTargetInterface const): * workers/service/ServiceWorkerGlobalScope.h: (WebCore::ServiceWorkerGlobalScope::create): (WebCore::ServiceWorkerGlobalScope::serverConnectionIdentifier const): * workers/service/context/SWContextManager.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp. (WebCore::SWContextManager::singleton): (WebCore::SWContextManager::SWContextManager): (WebCore::SWContextManager::startServiceWorkerContext): * workers/service/context/SWContextManager.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h. * workers/service/context/ServiceWorkerThread.cpp: Added. (WebCore::ServiceWorkerThreadProxy::sharedDummyProxy): (WebCore::ServiceWorkerThread::ServiceWorkerThread): (WebCore::m_workerObjectProxy): (WebCore::ServiceWorkerThread::~ServiceWorkerThread): (WebCore::ServiceWorkerThread::createWorkerGlobalScope): (WebCore::ServiceWorkerThread::runEventLoop): * workers/service/context/ServiceWorkerThread.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h. (WebCore::ServiceWorkerThread::create): (WebCore::ServiceWorkerThread::workerObjectProxy const): * workers/service/server/SWServer.cpp: (WebCore::SWServer::createWorker): Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::startServiceWorkerContext): LayoutTests: * http/tests/workers/service/basic-register-exceptions-expected.txt: * http/tests/workers/service/basic-register-expected.txt: * http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt trunk/LayoutTests/http/tests/workers/service/basic-register-expected.txt trunk/LayoutTests/http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp trunk/Source/WebCore/dom/EventTargetFactory.in trunk/Source/WebCore/workers/WorkerGlobalScope.h trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/WebProcess.cpp Added Paths trunk/Source/WebCore/workers/service/ServiceWorkerContextData.cpp trunk/Source/WebCore/workers/service/context/ trunk/Source/WebCore/workers/service/context/SWContextManager.cpp trunk/Source/WebCore/workers/service/context/SWContextManager.h trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.cpp trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h Diff Modified: trunk/LayoutTests/ChangeLog (223276 => 223277) --- trunk/LayoutTests/ChangeLog 2017-10-13 05:35:47 UTC (rev 223276) +++ trunk/LayoutTests/ChangeLog 2017-10-13 06:44:47 UTC (rev 223277) @@ -1,3 +1,14 @@ +2017-10-12 Brady Eidson + +SW "Hello world". +https://bugs.webkit.org/show_bug.cgi?id=178187 + +Reviewed by Andy Estes. + +* http/tests/workers/service/basic-register-exceptions-expected.txt: +* http/tests/workers/service/basic-register-expected.txt: +* http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt: + 2017-10-12 Alex Christensen Use asynchronous ResourceHandleClient calls for WebKit1 Modified: trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt (223276 => 223277) --- trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt 2017-10-13 05:35:47 UTC
[webkit-changes] [223191] trunk
Title: [223191] trunk Revision 223191 Author beid...@apple.com Date 2017-10-11 10:27:08 -0700 (Wed, 11 Oct 2017) Log Message Add a SW context process (where SW scripts will actually execute). https://bugs.webkit.org/show_bug.cgi?id=178156 Source/WebCore: Reviewed by Andy Estes. No new tests (Covered by changes to existing tests). This patch adds an auxiliary "ServiceWorker context" WebProcess to a WebProcessPool. This process is where ServiceWorker scripts will execute, separate from the client WebProcess hosting the page(s) they are serving. This patch also adds all of the plumbing to pass along a fetched service worker script to this context WebProcess, as well as message back failure to actually start the script so we can test. Touches lots of code sites but is basically just a lot of plumbing. * WebCore.xcodeproj/project.pbxproj: * workers/service/ServiceWorkerContextData.h: Copied from Source/WebCore/workers/service/server/SWServerWorker.h. (WebCore::ServiceWorkerContextData::encode const): (WebCore::ServiceWorkerContextData::decode): * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::finishFetchingScriptInServer): (WebCore::SWServer::Connection::scriptContextFailedToStart): (WebCore::SWServer::scriptFetchFinished): (WebCore::SWServer::scriptContextFailedToStart): (WebCore::SWServer::createWorker): * workers/service/server/SWServer.h: * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::scriptFetchFinished): (WebCore::SWServerRegistration::scriptContextFailedToStart): * workers/service/server/SWServerRegistration.h: * workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::SWServerWorker): (WebCore::SWServerWorker::~SWServerWorker): * workers/service/server/SWServerWorker.h: (WebCore::SWServerWorker::create): (WebCore::SWServerWorker::scriptURL const): (WebCore::SWServerWorker::script const): (WebCore::SWServerWorker::type const): (WebCore::SWServerWorker::workerID const): Source/WebKit: Reviewed by Andy Estes. This patch adds an auxiliary "ServiceWorker context" WebProcess to a WebProcessPool. This process is where ServiceWorker scripts will execute, separate from the client WebProcess hosting the page(s) they are serving. This patch also adds all of the plumbing to pass along a fetched service worker script to this context WebProcess, as well as message back failure to actually start the script so we can test. Touches lots of code sites but is basically just a lot of plumbing. * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::WebSWServerConnection): (WebKit::WebSWServerConnection::startServiceWorkerContext): (WebKit::WebSWServerConnection::sendToContextProcess): (WebKit::WebSWServerConnection::setContextConnection): * StorageProcess/ServiceWorker/WebSWServerConnection.h: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::workerContextProcessConnection): (WebKit::StorageProcess::createWorkerContextProcessConnection): (WebKit::StorageProcess::didGetWorkerContextProcessConnection): (WebKit::StorageProcess::serviceWorkerContextFailedToStart): (WebKit::StorageProcess::registerSWServerConnection): (WebKit::StorageProcess::unregisterSWServerConnection): * StorageProcess/StorageProcess.h: * StorageProcess/StorageProcess.messages.in: * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection): (WebKit::StorageToWebProcessConnection::establishSWServerConnection): (WebKit::StorageToWebProcessConnection::removeSWServerConnection): (WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated): * StorageProcess/StorageToWebProcessConnection.h: * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::create): (WebKit::StorageProcessProxy::StorageProcessProxy): (WebKit::StorageProcessProxy::didClose): (WebKit::StorageProcessProxy::getWorkerContextProcessConnection): (WebKit::StorageProcessProxy::didGetWorkerContextProcessConnection): * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::getWorkerContextProcessConnection): (WebKit::WebProcessPool::didGetWorkerContextProcessConnection): (WebKit::WebProcessPool::disconnectProcess): (WebKit::WebProcessPool::createWebPage): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didGetWorkerContextConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getWorkerContextConnection): (WebKit::WebProcess::startServiceWorkerContext): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: LayoutTests: Reviewed by Andy Estes. * http/tests/workers/service/basic-register-exceptions-expected.txt: * http/tests/workers/service/basic-register-expected.txt:
[webkit-changes] [223141] trunk/Source/WebKit
Title: [223141] trunk/Source/WebKit Revision 223141 Author beid...@apple.com Date 2017-10-10 14:03:04 -0700 (Tue, 10 Oct 2017) Log Message Random StorageProcess and SWServer cleanup. https://bugs.webkit.org/show_bug.cgi?id=178141 Reviewed by Andy Estes. -StorageProcess should own the set of SWServers -Some renaming and cleanup * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::createStorageToWebProcessConnection): (WebKit::StorageProcess::swServerForSession): * StorageProcess/StorageProcess.h: (WebKit::StorageProcess::queue): * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::establishSWServerConnection): * StorageProcess/StorageToWebProcessConnection.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/StorageProcess.cpp trunk/Source/WebKit/StorageProcess/StorageProcess.h trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.h Diff Modified: trunk/Source/WebKit/ChangeLog (223140 => 223141) --- trunk/Source/WebKit/ChangeLog 2017-10-10 20:50:20 UTC (rev 223140) +++ trunk/Source/WebKit/ChangeLog 2017-10-10 21:03:04 UTC (rev 223141) @@ -1,3 +1,23 @@ +2017-10-10 Brady Eidson + +Random StorageProcess and SWServer cleanup. +https://bugs.webkit.org/show_bug.cgi?id=178141 + +Reviewed by Andy Estes. + +-StorageProcess should own the set of SWServers +-Some renaming and cleanup + +* StorageProcess/StorageProcess.cpp: +(WebKit::StorageProcess::createStorageToWebProcessConnection): +(WebKit::StorageProcess::swServerForSession): +* StorageProcess/StorageProcess.h: +(WebKit::StorageProcess::queue): + +* StorageProcess/StorageToWebProcessConnection.cpp: +(WebKit::StorageToWebProcessConnection::establishSWServerConnection): +* StorageProcess/StorageToWebProcessConnection.h: + 2017-10-10 Michael Catanzaro Unreviewed, rolling out r223136. Modified: trunk/Source/WebKit/StorageProcess/StorageProcess.cpp (223140 => 223141) --- trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2017-10-10 20:50:20 UTC (rev 223140) +++ trunk/Source/WebKit/StorageProcess/StorageProcess.cpp 2017-10-10 21:03:04 UTC (rev 223141) @@ -164,7 +164,7 @@ { #if USE(UNIX_DOMAIN_SOCKETS) IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection(); -m_databaseToWebProcessConnections.append(StorageToWebProcessConnection::create(socketPair.server)); +m_storageToWebProcessConnections.append(StorageToWebProcessConnection::create(socketPair.server)); parentProcessConnection()->send(Messages::StorageProcessProxy::DidCreateStorageToWebProcessConnection(IPC::Attachment(socketPair.client)), 0); #elif OS(DARWIN) // Create the listening port. @@ -172,7 +172,7 @@ mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort); // Create a listening connection. -m_databaseToWebProcessConnections.append(StorageToWebProcessConnection::create(IPC::Connection::Identifier(listeningPort))); +m_storageToWebProcessConnections.append(StorageToWebProcessConnection::create(IPC::Connection::Identifier(listeningPort))); IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND); parentProcessConnection()->send(Messages::StorageProcessProxy::DidCreateStorageToWebProcessConnection(clientPort), 0); @@ -306,6 +306,18 @@ } #endif +#if ENABLE(SERVICE_WORKER) +SWServer& StorageProcess::swServerForSession(PAL::SessionID sessionID) +{ +auto result = m_swServers.add(sessionID, nullptr); +if (result.isNewEntry) +result.iterator->value = std::make_unique(); + +ASSERT(result.iterator->value); +return *result.iterator->value; +} +#endif + #if !PLATFORM(COCOA) void StorageProcess::initializeProcess(const ChildProcessInitializationParameters&) { Modified: trunk/Source/WebKit/StorageProcess/StorageProcess.h (223140 => 223141) --- trunk/Source/WebKit/StorageProcess/StorageProcess.h 2017-10-10 20:50:20 UTC (rev 223140) +++ trunk/Source/WebKit/StorageProcess/StorageProcess.h 2017-10-10 21:03:04 UTC (rev 223141) @@ -35,6 +35,7 @@ #include namespace WebCore { +class SWServer; struct SecurityOriginData; } @@ -55,15 +56,12 @@ static StorageProcess& singleton(); ~StorageProcess(); -#if ENABLE(INDEXED_DATABASE) -WebCore::IDBServer::IDBServer& idbServer(PAL::SessionID); -#endif - WorkQueue& queue() { return m_queue.get(); } - void postStorageTask(CrossThreadTask&&); #if ENABLE(INDEXED_DATABASE) +WebCore::IDBServer::IDBServer& idbServer(PAL::SessionID); + // WebCore::IDBServer::IDBBackingStoreFileHandler void prepareForAccessToTemporaryFile(const String& path) final; void accessToTemporaryFileComplete(const String& path) final; @@ -73,6 +71,10 @@ void getSandboxExtensionsForBlobFiles(const Vector& filenames,
[webkit-changes] [222980] trunk
Title: [222980] trunk Revision 222980 Author beid...@apple.com Date 2017-10-06 09:20:04 -0700 (Fri, 06 Oct 2017) Log Message Add (entirely incorrect) fetching of ServiceWorker scripts. https://bugs.webkit.org/show_bug.cgi?id=176179 Reviewed by Andy Estes. Source/WebCore: No new tests (Covered by changes to existing tests). When the Storage process is running the "Update" algorithm and a ServiceWorker script file needs to be fetched, this patch: - Messages back to the WebContent process that started the register/update job - Executes a FetchLoad in that script context for the script - Sends the results back to the Storage process We don't do anything with the results yet. Soon. * WebCore.xcodeproj/project.pbxproj: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::didFail): * workers/WorkerScriptLoader.h: (WebCore::WorkerScriptLoader::error const): * workers/WorkerScriptLoaderClient.h: (WebCore::WorkerScriptLoaderClient::~WorkerScriptLoaderClient): (WebCore::WorkerScriptLoaderClient::didReceiveResponse): Deleted. (WebCore::WorkerScriptLoaderClient::notifyFinished): Deleted. * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::startScriptFetchForJob): (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerFetchResult.h: Copied from Source/WebCore/workers/service/server/SWClientConnection.h. (WebCore::ServiceWorkerFetchResult::encode const): (WebCore::ServiceWorkerFetchResult::decode): * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::startScriptFetch): (WebCore::ServiceWorkerJob::fetchScriptWithContext): (WebCore::ServiceWorkerJob::didReceiveResponse): (WebCore::ServiceWorkerJob::notifyFinished): * workers/service/ServiceWorkerJob.h: * workers/service/ServiceWorkerJobClient.h: * workers/service/server/SWClientConnection.cpp: (WebCore::SWClientConnection::finishedFetchingScript): (WebCore::SWClientConnection::failedFetchingScript): (WebCore::SWClientConnection::startScriptFetchForServer): * workers/service/server/SWClientConnection.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::finishFetchingScriptInServer): (WebCore::SWServer::startScriptFetch): (WebCore::SWServer::scriptFetchFinished): * workers/service/server/SWServer.h: * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::scriptFetchFinished): (WebCore::SWServerRegistration::runUpdateJob): (WebCore::SWServerRegistration::startScriptFetchFromMainThread): (WebCore::SWServerRegistration::startScriptFetchForCurrentJob): * workers/service/server/SWServerRegistration.h: Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::startScriptFetchInClient): * StorageProcess/ServiceWorker/WebSWServerConnection.h: * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in: * WebProcess/Storage/WebSWClientConnection.cpp: (WebKit::WebSWClientConnection::finishFetchingScriptInServer): * WebProcess/Storage/WebSWClientConnection.h: * WebProcess/Storage/WebSWClientConnection.messages.in: LayoutTests: * http/tests/workers/service/basic-register-exceptions-expected.txt: * http/tests/workers/service/basic-register-expected.txt: * http/tests/workers/service/resources/basic-register-exceptions.js: * http/tests/workers/service/resources/basic-register.js: * http/tests/workers/service/resources/registration-task-queue-scheduling-1.js: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt trunk/LayoutTests/http/tests/workers/service/basic-register-expected.txt trunk/LayoutTests/http/tests/workers/service/resources/basic-register-exceptions.js trunk/LayoutTests/http/tests/workers/service/resources/basic-register.js trunk/LayoutTests/http/tests/workers/service/resources/registration-task-queue-scheduling-1.js trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/workers/WorkerScriptLoader.cpp trunk/Source/WebCore/workers/WorkerScriptLoader.h trunk/Source/WebCore/workers/WorkerScriptLoaderClient.h trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h trunk/Source/WebCore/workers/service/ServiceWorkerJob.cpp trunk/Source/WebCore/workers/service/ServiceWorkerJob.h trunk/Source/WebCore/workers/service/ServiceWorkerJobClient.h trunk/Source/WebCore/workers/service/server/SWClientConnection.cpp trunk/Source/WebCore/workers/service/server/SWClientConnection.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp trunk/Source/WebCore/workers/service/server/SWServerRegistration.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Stora
[webkit-changes] [221834] trunk
Title: [221834] trunk Revision 221834 Author beid...@apple.com Date 2017-09-10 09:36:52 -0700 (Sun, 10 Sep 2017) Log Message Try to avoid creating the default WKWebsiteDataStore until its actually needed. and https://bugs.webkit.org/show_bug.cgi?id=176551 Reviewed by Tim Horton. Source/WebKit: * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::cookies): (API::HTTPCookieStore::setCookie): (API::HTTPCookieStore::deleteCookie): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultDataStore): (API::WebsiteDataStore::defaultDataStoreExists): * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/C/WKContext.cpp: (WKContextGetWebsiteDataStore): * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (+[WKWebsiteDataStore _defaultDataStoreExists]): * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::WebProcessPool): (WebKit::m_hiddenPageThrottlingTimer): (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::warmInitialProcess): (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit): (WebKit::WebProcessPool::createWebPage): (WebKit::WebProcessPool::pageAddedToProcess): * UIProcess/WebProcessPool.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::isAssociatedProcessPool const): Tools: * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.h trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm Diff Modified: trunk/Source/WebKit/ChangeLog (221833 => 221834) --- trunk/Source/WebKit/ChangeLog 2017-09-10 09:54:31 UTC (rev 221833) +++ trunk/Source/WebKit/ChangeLog 2017-09-10 16:36:52 UTC (rev 221834) @@ -1,3 +1,41 @@ +2017-09-10 Brady Eidson + +Try to avoid creating the default WKWebsiteDataStore until its actually needed. + and https://bugs.webkit.org/show_bug.cgi?id=176551 + +Reviewed by Tim Horton. + +* UIProcess/API/APIHTTPCookieStore.cpp: +(API::HTTPCookieStore::cookies): +(API::HTTPCookieStore::setCookie): +(API::HTTPCookieStore::deleteCookie): + +* UIProcess/API/APIWebsiteDataStore.cpp: +(API::WebsiteDataStore::defaultDataStore): +(API::WebsiteDataStore::defaultDataStoreExists): +* UIProcess/API/APIWebsiteDataStore.h: + +* UIProcess/API/C/WKContext.cpp: +(WKContextGetWebsiteDataStore): + +* UIProcess/API/Cocoa/WKWebsiteDataStore.mm: +(+[WKWebsiteDataStore _defaultDataStoreExists]): +* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: + +* UIProcess/WebProcessPool.cpp: +(WebKit::WebProcessPool::WebProcessPool): +(WebKit::m_hiddenPageThrottlingTimer): +(WebKit::WebProcessPool::ensureNetworkProcess): +(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): +(WebKit::WebProcessPool::warmInitialProcess): +(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit): +(WebKit::WebProcessPool::createWebPage): +(WebKit::WebProcessPool::pageAddedToProcess): +* UIProcess/WebProcessPool.h: + +* UIProcess/WebsiteData/WebsiteDataStore.cpp: +(WebKit::WebsiteDataStore::isAssociatedProcessPool const): + 2017-09-09 Mark Lam Avoid duplicate computations of ExecState::vm(). Modified: trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp (221833 => 221834) --- trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2017-09-10 09:54:31 UTC (rev 221833) +++ trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2017-09-10 16:36:52 UTC (rev 221834) @@ -56,7 +56,13 @@ { auto* pool = m_owningDataStore->processPoolForCookieStorageOperations(); if (!pool) { -callOnMainThread([completionHandler = WTFMove(completionHandler), allCookies = m_owningDataStore->pendingCookies()]() { +Vector allCookies; +if (m_owningDataStore->sessionID() == PAL::SessionID::defaultSessionID()) +allCookies = WebCore::NetworkStorageSession::defaultStorageSession().getAllCookies(); +else +allCookies = m_owningDataStore->pendingCookies(); + +callOnMainThread([completionHandler = WTFMove(completionHandler), allCookies]() { completionHandler(allCookies); }); return;
[webkit-changes] [221509] trunk/Source/WebCore
Title: [221509] trunk/Source/WebCore Revision 221509 Author beid...@apple.com Date 2017-09-01 16:59:21 -0700 (Fri, 01 Sep 2017) Log Message ASSERTION FAILED: taken.get() == &job in WebCore::ServiceWorkerContainer::jobDidFinish(WebCore::ServiceWorkerJob &). https://bugs.webkit.org/show_bug.cgi?id=176234 Rubberstamped by Tim Horton, reluctantly. * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::jobDidFinish): It's valid for the job to be missing after navigations, which is why this was hitting downstream tests. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (221508 => 221509) --- trunk/Source/WebCore/ChangeLog 2017-09-01 23:54:23 UTC (rev 221508) +++ trunk/Source/WebCore/ChangeLog 2017-09-01 23:59:21 UTC (rev 221509) @@ -1,3 +1,14 @@ +2017-09-01 Brady Eidson + +ASSERTION FAILED: taken.get() == &job in WebCore::ServiceWorkerContainer::jobDidFinish(WebCore::ServiceWorkerJob &). +https://bugs.webkit.org/show_bug.cgi?id=176234 + +Rubberstamped by Tim Horton, reluctantly. + +* workers/service/ServiceWorkerContainer.cpp: +(WebCore::ServiceWorkerContainer::jobDidFinish): It's valid for the job to be missing after navigations, which is + why this was hitting downstream tests. + 2017-09-01 Youenn Fablet Do not Reject CacheStorage promises when updating the persistent filesystem data fails Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (221508 => 221509) --- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2017-09-01 23:54:23 UTC (rev 221508) +++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2017-09-01 23:59:21 UTC (rev 221509) @@ -215,7 +215,7 @@ void ServiceWorkerContainer::jobDidFinish(ServiceWorkerJob& job) { auto taken = m_jobMap.take(job.data().identifier()); -ASSERT_UNUSED(taken, taken.get() == &job); +ASSERT_UNUSED(taken, !taken || taken.get() == &job); } uint64_t ServiceWorkerContainer::connectionIdentifier() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [221495] trunk/Source/WebCore
Title: [221495] trunk/Source/WebCore Revision 221495 Author beid...@apple.com Date 2017-09-01 14:33:02 -0700 (Fri, 01 Sep 2017) Log Message Move ServiceWorkerJob from FetchLoader to ThreadableLoader. https://bugs.webkit.org/show_bug.cgi?id=176231 Reviewed by Youenn Fablet. No new tests (No behavior change). * WebCore.xcodeproj/project.pbxproj: Re-indent these headers. Yuck! * loader/ThreadableLoader.h: (WebCore::ThreadableLoader::ref): (WebCore::ThreadableLoader::deref): (WebCore::ThreadableLoader::ThreadableLoader): (WebCore::ThreadableLoader::~ThreadableLoader): * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didSendData): (WebCore::ThreadableLoaderClient::didReceiveResponse): (WebCore::ThreadableLoaderClient::didReceiveData): (WebCore::ThreadableLoaderClient::didFinishLoading): (WebCore::ThreadableLoaderClient::didFail): (WebCore::ThreadableLoaderClient::didFinishTiming): (WebCore::ThreadableLoaderClient::ThreadableLoaderClient): (WebCore::ThreadableLoaderClient::~ThreadableLoaderClient): Move from FetchLoaderClient to ThreadableLoaderClient: * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::fetchScriptWithContext): (WebCore::ServiceWorkerJob::didReceiveResponse): (WebCore::ServiceWorkerJob::didReceiveData): (WebCore::ServiceWorkerJob::didFinishLoading): (WebCore::ServiceWorkerJob::didFail): (WebCore::ServiceWorkerJob::didSucceed): Deleted. * workers/service/ServiceWorkerJob.h: * workers/service/server/SWClientConnection.cpp: Add a now-required include. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/loader/ThreadableLoader.h trunk/Source/WebCore/loader/ThreadableLoaderClient.h trunk/Source/WebCore/workers/service/ServiceWorkerJob.cpp trunk/Source/WebCore/workers/service/ServiceWorkerJob.h trunk/Source/WebCore/workers/service/server/SWClientConnection.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (221494 => 221495) --- trunk/Source/WebCore/ChangeLog 2017-09-01 20:40:11 UTC (rev 221494) +++ trunk/Source/WebCore/ChangeLog 2017-09-01 21:33:02 UTC (rev 221495) @@ -1,3 +1,42 @@ +2017-09-01 Brady Eidson + +Move ServiceWorkerJob from FetchLoader to ThreadableLoader. +https://bugs.webkit.org/show_bug.cgi?id=176231 + +Reviewed by Youenn Fablet. + +No new tests (No behavior change). + +* WebCore.xcodeproj/project.pbxproj: + +Re-indent these headers. Yuck! +* loader/ThreadableLoader.h: +(WebCore::ThreadableLoader::ref): +(WebCore::ThreadableLoader::deref): +(WebCore::ThreadableLoader::ThreadableLoader): +(WebCore::ThreadableLoader::~ThreadableLoader): +* loader/ThreadableLoaderClient.h: +(WebCore::ThreadableLoaderClient::didSendData): +(WebCore::ThreadableLoaderClient::didReceiveResponse): +(WebCore::ThreadableLoaderClient::didReceiveData): +(WebCore::ThreadableLoaderClient::didFinishLoading): +(WebCore::ThreadableLoaderClient::didFail): +(WebCore::ThreadableLoaderClient::didFinishTiming): +(WebCore::ThreadableLoaderClient::ThreadableLoaderClient): +(WebCore::ThreadableLoaderClient::~ThreadableLoaderClient): + +Move from FetchLoaderClient to ThreadableLoaderClient: +* workers/service/ServiceWorkerJob.cpp: +(WebCore::ServiceWorkerJob::fetchScriptWithContext): +(WebCore::ServiceWorkerJob::didReceiveResponse): +(WebCore::ServiceWorkerJob::didReceiveData): +(WebCore::ServiceWorkerJob::didFinishLoading): +(WebCore::ServiceWorkerJob::didFail): +(WebCore::ServiceWorkerJob::didSucceed): Deleted. +* workers/service/ServiceWorkerJob.h: + +* workers/service/server/SWClientConnection.cpp: Add a now-required include. + 2017-09-01 Eric Carlson Switch HTMLMediaElement to release logging Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (221494 => 221495) --- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-09-01 20:40:11 UTC (rev 221494) +++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-09-01 21:33:02 UTC (rev 221495) @@ -2305,8 +2305,8 @@ 517A53461F50C17F00DCDC0A /* SWServerWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A53421F50C16100DCDC0A /* SWServerWorker.h */; settings = {ATTRIBUTES = (Private, ); }; }; 517A534E1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A534B1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.cpp */; }; 517A534F1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A534C1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 517A53581F5889E800DCDC0A /* FetchLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4147E2B61C89912600A7E715 /* FetchLoaderClient.h */; settings = {ATTRIBUTES = (Private
[webkit-changes] [221461] trunk
Title: [221461] trunk Revision 221461 Author beid...@apple.com Date 2017-08-31 17:12:52 -0700 (Thu, 31 Aug 2017) Log Message Add (entirely incorrect) fetching of ServiceWorker scripts. https://bugs.webkit.org/show_bug.cgi?id=176179 Reviewed by Andy Estes. Source/WebCore: No new tests (Covered by changes to existing tests). When the Storage process is running the "Update" algorithm and a ServiceWorker script file needs to be fetched, this patch: - Messages back to the WebContent process that started the register/update job - Executes a FetchLoad in that script context for the script - Sends the results back to the Storage process We don't do anything with the results yet. Soon. * WebCore.xcodeproj/project.pbxproj: * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::startScriptFetchForJob): (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerFetchResult.h: Copied from Source/WebCore/workers/service/server/SWClientConnection.h. (WebCore::ServiceWorkerFetchResult::encode const): (WebCore::ServiceWorkerFetchResult::decode): * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::startScriptFetch): (WebCore::ServiceWorkerJob::fetchScriptWithContext): (WebCore::ServiceWorkerJob::didReceiveResponse): (WebCore::ServiceWorkerJob::didReceiveData): (WebCore::ServiceWorkerJob::didSucceed): (WebCore::ServiceWorkerJob::didFail): * workers/service/ServiceWorkerJob.h: * workers/service/ServiceWorkerJobClient.h: * workers/service/server/SWClientConnection.cpp: (WebCore::SWClientConnection::finishedFetchingScript): (WebCore::SWClientConnection::failedFetchingScript): (WebCore::SWClientConnection::startScriptFetchForServer): * workers/service/server/SWClientConnection.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::finishFetchingScriptInServer): (WebCore::SWServer::startScriptFetch): (WebCore::SWServer::scriptFetchFinished): * workers/service/server/SWServer.h: * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::scriptFetchFinished): (WebCore::SWServerRegistration::runUpdateJob): (WebCore::SWServerRegistration::startScriptFetchFromMainThread): (WebCore::SWServerRegistration::startScriptFetchForCurrentJob): * workers/service/server/SWServerRegistration.h: Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::startScriptFetchInClient): * StorageProcess/ServiceWorker/WebSWServerConnection.h: * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in: * WebProcess/Storage/WebSWClientConnection.cpp: (WebKit::WebSWClientConnection::finishFetchingScriptInServer): * WebProcess/Storage/WebSWClientConnection.h: * WebProcess/Storage/WebSWClientConnection.messages.in: LayoutTests: * http/tests/workers/service/basic-register-expected.txt: * http/tests/workers/service/resources/basic-register.js: * http/tests/workers/service/resources/registration-task-queue-scheduling-1.js: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/http/tests/workers/service/basic-register-expected.txt trunk/LayoutTests/http/tests/workers/service/resources/basic-register.js trunk/LayoutTests/http/tests/workers/service/resources/registration-task-queue-scheduling-1.js trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h trunk/Source/WebCore/workers/service/ServiceWorkerJob.cpp trunk/Source/WebCore/workers/service/ServiceWorkerJob.h trunk/Source/WebCore/workers/service/ServiceWorkerJobClient.h trunk/Source/WebCore/workers/service/server/SWClientConnection.cpp trunk/Source/WebCore/workers/service/server/SWClientConnection.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp trunk/Source/WebCore/workers/service/server/SWServerRegistration.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.messages.in trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.h trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.messages.in Added Paths trunk/Source/WebCore/workers/service/ServiceWorkerFetchResult.h Diff Modified: trunk/LayoutTests/ChangeLog (221460 => 221461) --- trunk/LayoutTests/ChangeLog 2017-09-01 00:09:14 UTC (rev 221460) +++ trunk/LayoutTests/ChangeLog 2017-09-01 00:12:52 UTC (rev 221461) @@ -1,3 +1,14 @@ +2017-08-31 Brady Eidson + +Add (entirely inco
[webkit-changes] [221399] trunk/Source
Title: [221399] trunk/Source Revision 221399 Author beid...@apple.com Date 2017-08-30 14:50:27 -0700 (Wed, 30 Aug 2017) Log Message Add "Identified" base class to replace a whole bunch of custom identifier generators. https://bugs.webkit.org/show_bug.cgi?id=176120 Reviewed by Alex Christensen. Source/WebCore: No new tests (No behavior change). Instead of repeating the common pattern of a class with an integer identifier keeping its own static counter of the next identifier and generating it for each instance, this uses a common template in WTF that does that automatically. * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection): (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionPendingCloseFromClient): (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient): (WebCore::IDBServer::UniqueIDBDatabaseConnection::confirmDidCloseFromServer): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFireVersionChangeEvent): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFinishHandlingVersionChange): (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction): (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction): (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction): (WebCore::IDBServer::nextDatabaseConnectionIdentifier): Deleted. * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: (WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier const): Deleted. * workers/service/ServiceWorkerJobData.cpp: (WebCore::ServiceWorkerJobData::ServiceWorkerJobData): (WebCore::ServiceWorkerJobData::isolatedCopy const): * workers/service/ServiceWorkerJobData.h: (WebCore::ServiceWorkerJobData::encode const): (WebCore::ServiceWorkerJobData::decode): (WebCore::ServiceWorkerJobData::identifier const): Deleted. * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::Connection): * workers/service/server/SWServer.h: (WebCore::SWServer::Connection::identifier const): Deleted. * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::SWServerRegistration): (WebCore::SWServerRegistration::data const): * workers/service/server/SWServerRegistration.h: (WebCore::SWServerRegistration::identifier const): Deleted. Source/WebKit: * UIProcess/API/APIUserScript.cpp: (API::UserScript::UserScript): (API::generateIdentifier): Deleted. * UIProcess/API/APIUserScript.h: * UIProcess/API/APIUserStyleSheet.cpp: (API::UserStyleSheet::UserStyleSheet): (API::generateIdentifier): Deleted. * UIProcess/API/APIUserStyleSheet.h: * UIProcess/UserContent/WebScriptMessageHandler.cpp: (WebKit::WebScriptMessageHandler::WebScriptMessageHandler): (WebKit::generateIdentifier): Deleted. * UIProcess/UserContent/WebScriptMessageHandler.h: (WebKit::WebScriptMessageHandler::identifier const): Deleted. * UIProcess/UserContent/WebUserContentControllerProxy.cpp: (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy): (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy): (WebKit::WebUserContentControllerProxy::addProcess): (WebKit::WebUserContentControllerProxy::removeProcess): (WebKit::WebUserContentControllerProxy::addUserContentWorldUse): (WebKit::WebUserContentControllerProxy::removeUserContentWorldUses): (WebKit::WebUserContentControllerProxy::addUserScript): (WebKit::WebUserContentControllerProxy::removeUserScript): (WebKit::WebUserContentControllerProxy::removeAllUserScripts): (WebKit::WebUserContentControllerProxy::addUserStyleSheet): (WebKit::WebUserContentControllerProxy::removeUserStyleSheet): (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets): (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler): (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName): (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers): (WebKit::WebUserContentControllerProxy::addContentRuleList): (WebKit::WebUserContentControllerProxy::removeContentRuleList): (WebKit::WebUserContentControllerProxy::removeAllContentRuleLists): (WebKit::generateIdentifier): Deleted. * UIProcess/UserContent/WebUserContentControllerProxy.h: (WebKit::WebUserContentControllerProxy::identifier const): Deleted. * UIProcess/VisitedLinkStore.cpp: (WebKit::VisitedLinkStore::~VisitedLinkStore): (WebKit::VisitedLinkStore::VisitedLinkStore): (WebKit::VisitedLinkStore::addProcess): (WebKit::VisitedLinkStore::removeProcess): (WebKit::VisitedLinkStore::removeAll): (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired): (WebKit::VisitedLinkStore::sendTable): (WebKit::generateIdentifier): Deleted. * UIProcess/VisitedLinkStore.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::generateIdentifier): Deleted. * UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteData
[webkit-changes] [221392] trunk
Title: [221392] trunk Revision 221392 Author beid...@apple.com Date 2017-08-30 12:40:35 -0700 (Wed, 30 Aug 2017) Log Message Implement all of "Register" right up until where the script is fetched. https://bugs.webkit.org/show_bug.cgi?id=176082 Reviewed by Andy Estes. Source/WebCore: Test: http/tests/workers/service/basic-register-exceptions.html This patch implements every detail of the "Register" and "Update" algorithms right up to where we would actually fetch the service worker script file. It also includes miscellaneous refactoring and cleanup along the way. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * page/SecurityOrigin.cpp: (WebCore::shouldTreatAsPotentiallyTrustworthy): Expose in the header for other files to use. * page/SecurityOrigin.h: * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::addRegistration): Add some more exception cases from the spec. (WebCore::ServiceWorkerContainer::scheduleJob): Use the correct job identifier. (WebCore::ServiceWorkerContainer::jobFailedWithException): (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): (WebCore::ServiceWorkerContainer::jobDidFinish): * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::ServiceWorkerJob): (WebCore::ServiceWorkerJob::failedWithException): Call through to the client to handle the failure. (WebCore::ServiceWorkerJob::resolvedWithRegistration): Call through to the client to handle success. * workers/service/ServiceWorkerJob.h: (WebCore::ServiceWorkerJob::promise): (WebCore::ServiceWorkerJob::identifier const): Deleted. Rely on the identifier from the JobData. * workers/service/ServiceWorkerJobClient.h: * workers/service/ServiceWorkerJobData.cpp: (WebCore::ServiceWorkerJobData::ServiceWorkerJobData): (WebCore::ServiceWorkerJobData::isolatedCopy const): * workers/service/ServiceWorkerJobData.h: (WebCore::ServiceWorkerJobData::identifier const): (WebCore::ServiceWorkerJobData::encode const): (WebCore::ServiceWorkerJobData::decode): (WebCore::ServiceWorkerJobData::jobIdentifier const): Deleted. * workers/service/ServiceWorkerRegistration.cpp: (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): Make this class an ActiveDOMObject both because it *is* an active DOM object and because we need to get at the ScriptExecutionContext. * workers/service/ServiceWorkerRegistration.h: Add a class to encapsulate everything about a registration for encode/decode/crossthread: * workers/service/ServiceWorkerRegistrationData.cpp: (WebCore::ServiceWorkerRegistrationData::isolatedCopy const): * workers/service/ServiceWorkerRegistrationData.h: (WebCore::ServiceWorkerRegistrationData::encode const): (WebCore::ServiceWorkerRegistrationData::decode): * workers/service/ServiceWorkerRegistrationKey.cpp: (WebCore::ServiceWorkerRegistrationKey::isolatedCopy const): * workers/service/ServiceWorkerRegistrationKey.h: (WebCore::ServiceWorkerRegistrationKey::encode const): (WebCore::ServiceWorkerRegistrationKey::decode): * workers/service/server/SWClientConnection.cpp: (WebCore::SWClientConnection::scheduleJob): (WebCore::SWClientConnection::jobResolvedInServer): * workers/service/server/SWClientConnection.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::~SWServer): (WebCore::SWServer::Connection::scheduleJobInServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::rejectJob): (WebCore::SWServer::resolveJob): * workers/service/server/SWServer.h: * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::SWServerRegistration): (WebCore::SWServerRegistration::startNextJob): (WebCore::SWServerRegistration::isEmpty): (WebCore::SWServerRegistration::getNewestWorker): Implement "Get Newest Worker" algorithm. (WebCore::SWServerRegistration::runRegisterJob): Implement the rest of the "Register" algorithm. (WebCore::SWServerRegistration::runUpdateJob): Implement every part of "Update" up to where we would fetch. (WebCore::SWServerRegistration::rejectWithExceptionOnMainThread): (WebCore::SWServerRegistration::resolveWithRegistrationOnMainThread): (WebCore::SWServerRegistration::resolveCurrentJob): (WebCore::SWServerRegistration::data const): (WebCore::SWServerRegistration::performCurrentJob): Deleted. * workers/service/server/SWServerRegistration.h: (WebCore::SWServerRegistration::identifier const): Add a stub class to represent "active service workers" in the SWServer: * workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::SWServerWorker): (WebCore::SWServerWorker::~SWServerWorker): * workers/service/server/SWServerWorker.h: (WebCore::SWServerWorker::scriptURL const): Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::resolveJobInClient): * StorageProcess/ServiceWorker/WebSWServerConnection.h: * WebProcess/Storage/WebSWClientConnection.messages.in: LayoutTests: * http/tests/workers/service/basic-register-excepti
[webkit-changes] [221334] trunk
Title: [221334] trunk Revision 221334 Author beid...@apple.com Date 2017-08-29 19:13:19 -0700 (Tue, 29 Aug 2017) Log Message Rename "potentionally trustworthy" to "potentially trustworthy" https://bugs.webkit.org/show_bug.cgi?id=176081 Reviewed by Daniel Bates. Source/WebCore: The Secure Context spec refers to this as "potentially trustworthy" It's possible that this was done potentionally, but we should follow the spec to alleviate confusion. * dom/Document.cpp: (WebCore::Document::isSecureContext const): * page/SecurityOrigin.cpp: (WebCore::shouldTreatAsPotentiallyTrustworthy): (WebCore::shouldTreatAsPotentionallyTrustworthy): Deleted. * page/SecurityOrigin.h: (WebCore::SecurityOrigin::isPotentiallyTrustworthy const): (WebCore::SecurityOrigin::isPotentionallyTrustworthy const): Deleted. * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::isSecureContext const): Tools: * TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp: (TestWebKitAPI::TEST_F): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Document.cpp trunk/Source/WebCore/page/SecurityOrigin.cpp trunk/Source/WebCore/page/SecurityOrigin.h trunk/Source/WebCore/workers/WorkerGlobalScope.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (221333 => 221334) --- trunk/Source/WebCore/ChangeLog 2017-08-30 01:38:32 UTC (rev 221333) +++ trunk/Source/WebCore/ChangeLog 2017-08-30 02:13:19 UTC (rev 221334) @@ -1,3 +1,25 @@ +2017-08-29 Brady Eidson + +Rename "potentionally trustworthy" to "potentially trustworthy" +https://bugs.webkit.org/show_bug.cgi?id=176081 + +Reviewed by Daniel Bates. + +The Secure Context spec refers to this as "potentially trustworthy" + +It's possible that this was done potentionally, but we should follow the spec to alleviate confusion. + +* dom/Document.cpp: +(WebCore::Document::isSecureContext const): +* page/SecurityOrigin.cpp: +(WebCore::shouldTreatAsPotentiallyTrustworthy): +(WebCore::shouldTreatAsPotentionallyTrustworthy): Deleted. +* page/SecurityOrigin.h: +(WebCore::SecurityOrigin::isPotentiallyTrustworthy const): +(WebCore::SecurityOrigin::isPotentionallyTrustworthy const): Deleted. +* workers/WorkerGlobalScope.cpp: +(WebCore::WorkerGlobalScope::isSecureContext const): + 2017-08-29 Youenn Fablet Add support for FetchRequest.body Modified: trunk/Source/WebCore/dom/Document.cpp (221333 => 221334) --- trunk/Source/WebCore/dom/Document.cpp 2017-08-30 01:38:32 UTC (rev 221333) +++ trunk/Source/WebCore/dom/Document.cpp 2017-08-30 02:13:19 UTC (rev 221334) @@ -5444,10 +5444,10 @@ { if (!m_frame) return true; -if (!securityOrigin().isPotentionallyTrustworthy()) +if (!securityOrigin().isPotentiallyTrustworthy()) return false; for (Frame* frame = m_frame->tree().parent(); frame; frame = frame->tree().parent()) { -if (!frame->document()->securityOrigin().isPotentionallyTrustworthy()) +if (!frame->document()->securityOrigin().isPotentiallyTrustworthy()) return false; } return true; Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (221333 => 221334) --- trunk/Source/WebCore/page/SecurityOrigin.cpp 2017-08-30 01:38:32 UTC (rev 221333) +++ trunk/Source/WebCore/page/SecurityOrigin.cpp 2017-08-30 02:13:19 UTC (rev 221334) @@ -123,7 +123,7 @@ } // https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy (Editor's Draft, 17 November 2016) -static bool shouldTreatAsPotentionallyTrustworthy(const URL& url) +static bool shouldTreatAsPotentiallyTrustworthy(const URL& url) { if (!url.isValid()) return false; @@ -157,7 +157,7 @@ if (m_canLoadLocalResources) m_filePath = url.fileSystemPath(); // In case enforceFilePathSeparation() is called. -m_isPotentionallyTrustworthy = shouldTreatAsPotentionallyTrustworthy(url); +m_isPotentiallyTrustworthy = shouldTreatAsPotentiallyTrustworthy(url); } SecurityOrigin::SecurityOrigin() @@ -165,7 +165,7 @@ , m_host { emptyString() } , m_domain { emptyString() } , m_isUnique { true } -, m_isPotentionallyTrustworthy { true } +, m_isPotentiallyTrustworthy { true } { } @@ -182,7 +182,7 @@ , m_storageBlockingPolicy { other->m_storageBlockingPolicy } , m_enforceFilePathSeparation { other->m_enforceFilePathSeparation } , m_needsStorageAccessFromFileURLsQuirk { other->m_needsStorageAccessFromFileURLsQuirk } -, m_isPotentionallyTrustworthy { other->m_isPotentionallyTrustworthy } +, m_isPotentiallyTrustworthy { other->m_isPotentiallyTrustworthy } { } Modified: trunk/Source/WebCore/page/SecurityOrigin.h (221333 => 221334) --- trunk/Source/WebCore/page/SecurityOrigin.h 2017-08-30 01:38:32 UTC (rev 221333) +++ trunk/Source/WebCore/page/SecurityOrigin.h 2017
[webkit-changes] [221198] trunk
Title: [221198] trunk Revision 221198 Author beid...@apple.com Date 2017-08-25 11:57:44 -0700 (Fri, 25 Aug 2017) Log Message Introduce ServerWorkerRegistration task queues. https://bugs.webkit.org/show_bug.cgi?id=175851 Reviewed by Andy Estes. Source/WebCore: Test: http/tests/workers/service/registration-task-queue-scheduling-1.html This change introduces: - A task thread/queue owned by each SWServer object. - The SWServerRegistration object, which is the in-server representation of a service worker registration scope. - A registration job queue per SWServerRegistration object which actually runs the jobs as tasks on the owning SWServer's thread. With that infrastructure in place, it moves the "register" job to something that is scheduled and rejected asynchronously, as opposed to synchronously rejected. The test verifies that two different registration scopes (localhost and 127.0.0.1) can both spam the SWServer with registration requests, but neither of their queues starve the other. The rest of this change is a lot of support and plumbing for making the above happen. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * dom/ExceptionData.cpp: (WebCore::ExceptionData::isolatedCopy const): * dom/ExceptionData.h: * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::connectionIdentifier): * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::ServiceWorkerJob): (WebCore::ServiceWorkerJob::data const): Deleted. * workers/service/ServiceWorkerJob.h: (WebCore::ServiceWorkerJob::create): (WebCore::ServiceWorkerJob::data const): (WebCore::ServiceWorkerJob::createRegisterJob): Deleted. * workers/service/ServiceWorkerJobClient.h: * workers/service/ServiceWorkerJobData.cpp: (WebCore::ServiceWorkerJobData::ServiceWorkerJobData): (WebCore::ServiceWorkerJobData::registrationKey const): (WebCore::ServiceWorkerJobData::isolatedCopy const): * workers/service/ServiceWorkerJobData.h: (WebCore::ServiceWorkerJobData::jobIdentifier const): (WebCore::ServiceWorkerJobData::connectionIdentifier const): (WebCore::ServiceWorkerJobData::encode const): (WebCore::ServiceWorkerJobData::decode): * workers/service/ServiceWorkerRegistrationKey.cpp: (WebCore::ServiceWorkerRegistrationKey::emptyKey): (WebCore::ServiceWorkerRegistrationKey::hash const): (WebCore::ServiceWorkerRegistrationKey::operator== const): * workers/service/ServiceWorkerRegistrationKey.h: (WTF::ServiceWorkerRegistrationKeyHash::hash): (WTF::ServiceWorkerRegistrationKeyHash::equal): (WTF::HashTraits::emptyValue): (WTF::HashTraits::constructDeletedValue): (WTF::HashTraits::isDeletedValue): * workers/service/ServiceWorkerRegistrationOptions.cpp: (WebCore::RegistrationOptions::isolatedCopy const): * workers/service/ServiceWorkerRegistrationOptions.h: (WebCore::RegistrationOptions::encode const): (WebCore::RegistrationOptions::decode): * workers/service/server/SWClientConnection.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::Connection): (WebCore::SWServer::~SWServer): (WebCore::SWServer::Connection::scheduleJobInServer): (WebCore::SWServer::SWServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::rejectJob): (WebCore::SWServer::taskThreadEntryPoint): (WebCore::SWServer::postTask): (WebCore::SWServer::postTaskReply): (WebCore::SWServer::handleTaskRepliesOnMainThread): (WebCore::SWServer::registerConnection): (WebCore::SWServer::unregisterConnection): * workers/service/server/SWServer.h: (WebCore::SWServer::Connection::identifier const): * workers/service/server/SWServerRegistration.cpp: Added. (WebCore::SWServerRegistration::SWServerRegistration): (WebCore::SWServerRegistration::~SWServerRegistration): (WebCore::SWServerRegistration::enqueueJob): (WebCore::SWServerRegistration::startNextJob): (WebCore::SWServerRegistration::performCurrentJob): (WebCore::SWServerRegistration::rejectCurrentJob): (WebCore::SWServerRegistration::finishCurrentJob): * workers/service/server/SWServerRegistration.h: Source/WebKit: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::WebSWServerConnection): * StorageProcess/ServiceWorker/WebSWServerConnection.h: (WebKit::WebSWServerConnection::identifier const): Deleted. * WebProcess/Storage/WebSWClientConnection.h: (WebKit::WebSWClientConnection::identifier const): Deleted. LayoutTests: * http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt: Added. * http/tests/workers/service/registration-task-queue-scheduling-1.html: Added. * http/tests/workers/service/resources/registration-task-queue-scheduling-1-second-window.html: Added. * http/tests/workers/service/resources/registration-task-queue-scheduling-1.js: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/CMakeLists.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/
[webkit-changes] [221189] trunk/Source/WebCore
Title: [221189] trunk/Source/WebCore Revision 221189 Author beid...@apple.com Date 2017-08-25 09:52:28 -0700 (Fri, 25 Aug 2017) Log Message Unreviewed, rolling out r221181. Broke builds that use CryptoAlgorithmRSA_PSSMac.cpp Reverted changeset: "[WebCrypto] Push WorkQueue dispatches for RSA algorithms into shared code" https://bugs.webkit.org/show_bug.cgi?id=175621 http://trac.webkit.org/changeset/221181 Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp trunk/Source/WebCore/crypto/CryptoAlgorithm.h trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.h trunk/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp trunk/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp trunk/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp trunk/Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (221188 => 221189) --- trunk/Source/WebCore/ChangeLog 2017-08-25 16:23:03 UTC (rev 221188) +++ trunk/Source/WebCore/ChangeLog 2017-08-25 16:52:28 UTC (rev 221189) @@ -1,3 +1,16 @@ +2017-08-25 Brady Eidson + +Unreviewed, rolling out r221181. + +Broke builds that use CryptoAlgorithmRSA_PSSMac.cpp + +Reverted changeset: + +"[WebCrypto] Push WorkQueue dispatches for RSA algorithms into +shared code" +https://bugs.webkit.org/show_bug.cgi?id=175621 +http://trac.webkit.org/changeset/221181 + 2017-08-25 Xabier Rodriguez Calvar [EME][ClearKey] Fixed warning in CDM compilation Modified: trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp (221188 => 221189) --- trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp 2017-08-25 16:23:03 UTC (rev 221188) +++ trunk/Source/WebCore/crypto/CryptoAlgorithm.cpp 2017-08-25 16:52:28 UTC (rev 221189) @@ -28,8 +28,6 @@ #if ENABLE(SUBTLE_CRYPTO) -#include "ScriptExecutionContext.h" - namespace WebCore { void CryptoAlgorithm::encrypt(std::unique_ptr&&, Ref&&, Vector&&, VectorCallback&&, ExceptionCallback&& exceptionCallback, ScriptExecutionContext&, WorkQueue&) @@ -92,42 +90,6 @@ return Exception { NotSupportedError }; } -template -static void dispatchAlgorithmOperation(WorkQueue& workQueue, ScriptExecutionContext& context, ResultCallbackType&& callback, CryptoAlgorithm::ExceptionCallback&& exceptionCallback, OperationType&& operation) -{ -context.ref(); -workQueue.dispatch( -[operation = WTFMove(operation), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &context]() mutable { -auto result = operation(); -if (result.hasException()) { -// We should only dereference callbacks after being back to the Document/Worker threads. -context.postTask( -[ec = result.releaseException().code(), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { -exceptionCallback(ec); -context.deref(); -}); -return; -} - -// We should only dereference callbacks after being back to the Document/Worker threads. -context.postTask( -[result = result.releaseReturnValue(), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { -callback(result); -context.deref(); -}); -}); } -void CryptoAlgorithm::dispatchOperation(WorkQueue& workQueue, ScriptExecutionContext& context, VectorCallback&& callback, ExceptionCallback&& exceptionCallback, WTF::Function>()>&& operation) -{ -dispatchAlgorithmOperation(workQueue, context, WTFMove(callback), WTFMove(exceptionCallback), WTFMove(operation)); -} - -void CryptoAlgorithm::dispatchOperation(WorkQueue& workQueue, ScriptExecutionContext& context, BoolCallback&& callback, ExceptionCallback&& exceptionCallback, WTF::Function()>&& operation) -{ -dispatchAlgorithmOperation(workQueue, context, WTFMove(callback), WTFMove(exceptionCallback), WTFMove(operation)); -}
[webkit-changes] [221165] trunk/Source/WebKit
Title: [221165] trunk/Source/WebKit Revision 221165 Author beid...@apple.com Date 2017-08-24 15:37:15 -0700 (Thu, 24 Aug 2017) Log Message Remove duplicate WebCore::URL encoder/decoder https://bugs.webkit.org/show_bug.cgi?id=175952 Reviewed by Chris Dumez. Don't need the WebCoreArgumentCoder in WebKit since the URL class defines its own coders. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): Deleted. (IPC::ArgumentCoder::decode): Deleted. * Shared/WebCoreArgumentCoders.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h Diff Modified: trunk/Source/WebKit/ChangeLog (221164 => 221165) --- trunk/Source/WebKit/ChangeLog 2017-08-24 22:10:57 UTC (rev 221164) +++ trunk/Source/WebKit/ChangeLog 2017-08-24 22:37:15 UTC (rev 221165) @@ -1,3 +1,17 @@ +2017-08-24 Brady Eidson + +Remove duplicate WebCore::URL encoder/decoder +https://bugs.webkit.org/show_bug.cgi?id=175952 + +Reviewed by Chris Dumez. + +Don't need the WebCoreArgumentCoder in WebKit since the URL class defines its own coders. + +* Shared/WebCoreArgumentCoders.cpp: +(IPC::ArgumentCoder::encode): Deleted. +(IPC::ArgumentCoder::decode): Deleted. +* Shared/WebCoreArgumentCoders.h: + 2017-08-24 Alex Christensen Add WKUIDelegatePrivate callback corresponding to PageUIClient's didNotHandleWheelEvent Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp (221164 => 221165) --- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp 2017-08-24 22:10:57 UTC (rev 221164) +++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp 2017-08-24 22:37:15 UTC (rev 221165) @@ -1816,20 +1816,6 @@ return true; } -void ArgumentCoder::encode(Encoder& encoder, const URL& result) -{ -encoder << result.string(); -} - -bool ArgumentCoder::decode(Decoder& decoder, URL& result) -{ -String urlAsString; -if (!decoder.decode(urlAsString)) -return false; -result = URL(ParsedURLString, urlAsString); -return true; -} - void ArgumentCoder::encode(Encoder& encoder, const UserStyleSheet& userStyleSheet) { encoder << userStyleSheet.source(); Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h (221164 => 221165) --- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h 2017-08-24 22:10:57 UTC (rev 221164) +++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h 2017-08-24 22:37:15 UTC (rev 221165) @@ -485,11 +485,6 @@ static void encode(Encoder&, const WebCore::TextCheckingResult&); static bool decode(Decoder&, WebCore::TextCheckingResult&); }; - -template<> struct ArgumentCoder { -static void encode(Encoder&, const WebCore::URL&); -static bool decode(Decoder&, WebCore::URL&); -}; template<> struct ArgumentCoder { static void encode(Encoder&, const WebCore::UserStyleSheet&); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [220992] trunk/Source/WebCore
Title: [220992] trunk/Source/WebCore Revision 220992 Author beid...@apple.com Date 2017-08-21 17:23:39 -0700 (Mon, 21 Aug 2017) Log Message ASSERTION FAILED: !m_connections.contains(&connection) in WebCore::SWServer::unregisterConnection(WebCore::SWServer::Connection&). https://bugs.webkit.org/show_bug.cgi?id=175795 Rubber-stamped by Andy Estes. * workers/service/server/SWServer.cpp: (WebCore::SWServer::unregisterConnection): Flip the ASSERT to be... correct. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/service/server/SWServer.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (220991 => 220992) --- trunk/Source/WebCore/ChangeLog 2017-08-21 23:39:53 UTC (rev 220991) +++ trunk/Source/WebCore/ChangeLog 2017-08-22 00:23:39 UTC (rev 220992) @@ -1,3 +1,13 @@ +2017-08-21 Brady Eidson + +ASSERTION FAILED: !m_connections.contains(&connection) in WebCore::SWServer::unregisterConnection(WebCore::SWServer::Connection&). +https://bugs.webkit.org/show_bug.cgi?id=175795 + +Rubber-stamped by Andy Estes. + +* workers/service/server/SWServer.cpp: +(WebCore::SWServer::unregisterConnection): Flip the ASSERT to be... correct. + 2017-08-21 Daniel Bates Cleanup TextPainter Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (220991 => 220992) --- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-08-21 23:39:53 UTC (rev 220991) +++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2017-08-22 00:23:39 UTC (rev 220992) @@ -73,7 +73,7 @@ void SWServer::unregisterConnection(Connection& connection) { -ASSERT(!m_connections.contains(&connection)); +ASSERT(m_connections.contains(&connection)); m_connections.remove(&connection); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [220977] trunk/Source
Title: [220977] trunk/Source Revision 220977 Author beid...@apple.com Date 2017-08-21 13:02:42 -0700 (Mon, 21 Aug 2017) Log Message Split the one SWServer::Connection into SWClientConnection and SWServer::Connection. https://bugs.webkit.org/show_bug.cgi?id=175745 Reviewed by Andy Estes. Source/WebCore: No new tests (No behavior change). Each of these has a much different environment that it lives in, so being the same object hinders clean development. This split will also make it easier for the WebCore objects to directly handle WK2 messages. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * platform/Logging.h: * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::scheduleJob): * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerProvider.h: * workers/service/server/SWClientConnection.cpp: Copied from Source/WebCore/workers/service/server/SWServer.cpp. (WebCore::SWClientConnection::SWClientConnection): (WebCore::SWClientConnection::~SWClientConnection): (WebCore::SWClientConnection::scheduleJob): (WebCore::SWClientConnection::jobRejectedInServer): * workers/service/server/SWClientConnection.h: Copied from Source/WebCore/workers/service/server/SWServer.h. * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::Connection): (WebCore::SWServer::Connection::~Connection): (WebCore::SWServer::~SWServer): (WebCore::SWServer::Connection::scheduleJobInServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::registerConnection): (WebCore::SWServer::unregisterConnection): (WebCore::SWServer::Connection::scheduleJob): Deleted. (WebCore::SWServer::Connection::jobRejected): Deleted. * workers/service/server/SWServer.h: (WebCore::SWServer::Connection::server): (WebCore::SWServer::Connection::~Connection): Deleted. Source/WebKit: * CMakeLists.txt: * DerivedSources.make: * WebKit.xcodeproj/project.pbxproj: * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: Renamed from Source/WebKit/WebProcess/Storage/WebSWServerConnection.cpp. (WebKit::WebSWServerConnection::WebSWServerConnection): (WebKit::WebSWServerConnection::~WebSWServerConnection): (WebKit::WebSWServerConnection::disconnectedFromWebProcess): (WebKit::WebSWServerConnection::rejectJobInClient): * StorageProcess/ServiceWorker/WebSWServerConnection.h: Copied from Source/WebKit/WebProcess/Storage/WebSWServerConnection.h. (WebKit::WebSWServerConnection::identifier const): * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in: Copied from Source/WebKit/WebProcess/Storage/WebSWServerConnection.messages.in. * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::didReceiveMessage): (WebKit::StorageToWebProcessConnection::didClose): (WebKit::StorageToWebProcessConnection::establishSWServerConnection): (WebKit::StorageToWebProcessConnection::removeSWServerConnection): * StorageProcess/StorageToWebProcessConnection.h: * WebProcess/Storage/WebSWClientConnection.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp. (WebKit::WebSWClientConnection::WebSWClientConnection): (WebKit::WebSWClientConnection::~WebSWClientConnection): (WebKit::WebSWClientConnection::scheduleJobInServer): * WebProcess/Storage/WebSWClientConnection.h: Renamed from Source/WebKit/WebProcess/Storage/WebSWServerConnection.h. (WebKit::WebSWClientConnection::identifier const): * WebProcess/Storage/WebSWClientConnection.messages.in: Renamed from Source/WebKit/WebProcess/Storage/WebSWServerConnection.messages.in. * WebProcess/Storage/WebServiceWorkerProvider.cpp: (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession): * WebProcess/Storage/WebServiceWorkerProvider.h: * WebProcess/Storage/WebToStorageProcessConnection.cpp: (WebKit::WebToStorageProcessConnection::didReceiveMessage): (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession): * WebProcess/Storage/WebToStorageProcessConnection.h: Modified Paths trunk/Source/WebCore/CMakeLists.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/platform/Logging.h trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h trunk/Source/WebCore/workers/service/ServiceWorkerProvider.h trunk/Source/WebCore/workers/service/server/SWServer.cpp trunk/Source/WebCore/workers/service/server/SWServer.h trunk/Source/WebKit/CMakeLists.txt trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/DerivedSources.make trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.h trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h trunk/Source/WebKit/WebProcess/Storage/WebToStorageProcessConnection.cpp t
[webkit-changes] [220608] trunk/Source/WebCore
Title: [220608] trunk/Source/WebCore Revision 220608 Author beid...@apple.com Date 2017-08-11 13:37:51 -0700 (Fri, 11 Aug 2017) Log Message Crash under ServiceWorkerJob::failedWithException. https://bugs.webkit.org/show_bug.cgi?id=175488 Reviewed by Tim Horton. Covered by existing tests. * workers/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/workers/ServiceWorkerJob.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (220607 => 220608) --- trunk/Source/WebCore/ChangeLog 2017-08-11 20:36:46 UTC (rev 220607) +++ trunk/Source/WebCore/ChangeLog 2017-08-11 20:37:51 UTC (rev 220608) @@ -1,3 +1,15 @@ +2017-08-11 Brady Eidson + +Crash under ServiceWorkerJob::failedWithException. +https://bugs.webkit.org/show_bug.cgi?id=175488 + +Reviewed by Tim Horton. + +Covered by existing tests. + +* workers/ServiceWorkerJob.cpp: +(WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last. + 2017-08-10 Sam Weinig WTF::Function does not allow for reference / non-default constructible return types Modified: trunk/Source/WebCore/workers/ServiceWorkerJob.cpp (220607 => 220608) --- trunk/Source/WebCore/workers/ServiceWorkerJob.cpp 2017-08-11 20:36:46 UTC (rev 220607) +++ trunk/Source/WebCore/workers/ServiceWorkerJob.cpp 2017-08-11 20:37:51 UTC (rev 220608) @@ -54,8 +54,10 @@ ASSERT(!m_completed); m_promise->reject(WTFMove(exception)); +m_completed = true; + +// Can cause this to be deleted. m_client->jobDidFinish(*this); -m_completed = true; } } // namespace WebCore ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [220574] trunk/Source
Title: [220574] trunk/Source Revision 220574 Author beid...@apple.com Date 2017-08-10 19:59:06 -0700 (Thu, 10 Aug 2017) Log Message Rename the source files for the WTF persistent coders. https://bugs.webkit.org/show_bug.cgi?id=175441 Reviewed by Tim Horton. Source/WebCore: * platform/network/NetworkLoadMetrics.h: Source/WebKit: * NetworkProcess/cache/NetworkCacheCoders.h: * NetworkProcess/cache/NetworkCacheKey.cpp: * NetworkProcess/cache/NetworkCacheKey.h: * UIProcess/API/APIContentRuleListStore.cpp: Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/persistence/PersistentCoder.h: Renamed from Source/WTF/wtf/persistence/Coder.h. * wtf/persistence/PersistentCoders.cpp: Renamed from Source/WTF/wtf/persistence/Coders.cpp. * wtf/persistence/PersistentCoders.h: Renamed from Source/WTF/wtf/persistence/Coders.h. * wtf/persistence/PersistentDecoder.cpp: Renamed from Source/WTF/wtf/persistence/Decoder.cpp. * wtf/persistence/PersistentDecoder.h: Renamed from Source/WTF/wtf/persistence/Decoder.h. * wtf/persistence/PersistentEncoder.cpp: Renamed from Source/WTF/wtf/persistence/Encoder.cpp. * wtf/persistence/PersistentEncoder.h: Renamed from Source/WTF/wtf/persistence/Encoder.h. Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/WTF.xcodeproj/project.pbxproj trunk/Source/WTF/wtf/CMakeLists.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheCoders.h trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheKey.cpp trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheKey.h trunk/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp Added Paths trunk/Source/WTF/wtf/persistence/PersistentCoder.h trunk/Source/WTF/wtf/persistence/PersistentCoders.cpp trunk/Source/WTF/wtf/persistence/PersistentCoders.h trunk/Source/WTF/wtf/persistence/PersistentDecoder.cpp trunk/Source/WTF/wtf/persistence/PersistentDecoder.h trunk/Source/WTF/wtf/persistence/PersistentEncoder.cpp trunk/Source/WTF/wtf/persistence/PersistentEncoder.h Removed Paths trunk/Source/WTF/wtf/persistence/Coder.h trunk/Source/WTF/wtf/persistence/Coders.cpp trunk/Source/WTF/wtf/persistence/Coders.h trunk/Source/WTF/wtf/persistence/Decoder.cpp trunk/Source/WTF/wtf/persistence/Decoder.h trunk/Source/WTF/wtf/persistence/Encoder.cpp trunk/Source/WTF/wtf/persistence/Encoder.h Diff Modified: trunk/Source/WTF/ChangeLog (220573 => 220574) --- trunk/Source/WTF/ChangeLog 2017-08-11 02:58:04 UTC (rev 220573) +++ trunk/Source/WTF/ChangeLog 2017-08-11 02:59:06 UTC (rev 220574) @@ -1,3 +1,21 @@ +2017-08-10 Brady Eidson + +Rename the source files for the WTF persistent coders. +https://bugs.webkit.org/show_bug.cgi?id=175441 + +Reviewed by Tim Horton. + +* WTF.xcodeproj/project.pbxproj: +* wtf/CMakeLists.txt: + +* wtf/persistence/PersistentCoder.h: Renamed from Source/WTF/wtf/persistence/Coder.h. +* wtf/persistence/PersistentCoders.cpp: Renamed from Source/WTF/wtf/persistence/Coders.cpp. +* wtf/persistence/PersistentCoders.h: Renamed from Source/WTF/wtf/persistence/Coders.h. +* wtf/persistence/PersistentDecoder.cpp: Renamed from Source/WTF/wtf/persistence/Decoder.cpp. +* wtf/persistence/PersistentDecoder.h: Renamed from Source/WTF/wtf/persistence/Decoder.h. +* wtf/persistence/PersistentEncoder.cpp: Renamed from Source/WTF/wtf/persistence/Encoder.cpp. +* wtf/persistence/PersistentEncoder.h: Renamed from Source/WTF/wtf/persistence/Encoder.h. + 2017-08-10 Yusuke Suzuki Unreviewed, attempt to fix build failure with VC2017 Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (220573 => 220574) --- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-08-11 02:58:04 UTC (rev 220573) +++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-08-11 02:59:06 UTC (rev 220574) @@ -63,6 +63,9 @@ 2CDED0F318115C85004DBA70 /* RunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0F118115C85004DBA70 /* RunLoop.cpp */; }; 3337DB9CE743410FAF076E17 /* StackTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 313EDEC9778E49C9BEA91CFC /* StackTrace.cpp */; }; 515F794E1CFC9F4A00CCED93 /* CrossThreadCopier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515F794B1CFC9F4A00CCED93 /* CrossThreadCopier.cpp */; }; + 51F1752B1F3D486000C74950 /* PersistentCoders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175261F3D486000C74950 /* PersistentCoders.cpp */; }; + 51F1752C1F3D486000C74950 /* PersistentDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175271F3D486000C74950 /* PersistentDecoder.cpp */; }; + 51F1752D1F3D486000C74950 /* PersistentEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175291F3D486000C74950 /* PersistentEncoder.cpp */; }; 52183012C99E476A84EEBEA8 /* SymbolImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F72BBDB107FA424886178B9E /* S
[webkit-changes] [220539] trunk
Title: [220539] trunk Revision 220539 Author beid...@apple.com Date 2017-08-10 12:28:26 -0700 (Thu, 10 Aug 2017) Log Message Add ServiceWorkerJob. https://bugs.webkit.org/show_bug.cgi?id=175241 Reviewed by Tim Horton. Source/WebCore: Test: http/tests/workers/service/basic-register.html This patch does a few things: - Adds the spec concept of a ServiceWorkerJob (in the WebProcess, at least) - Adds a ServiceWorkerProvider interface for WebKit to implement - Actually creates a job for service worker registration and "schedules" it, though it always immediately errors out the promise. Actually queuing jobs and executing asynchronously is coming up soon. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::sessionID const): * dom/Document.h: * workers/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer): (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::scheduleJob): (WebCore::ServiceWorkerContainer::jobDidFinish): * workers/ServiceWorkerContainer.h: * workers/ServiceWorkerJob.cpp: Added. (WebCore::ServiceWorkerJob::ServiceWorkerJob): (WebCore::ServiceWorkerJob::~ServiceWorkerJob): (WebCore::ServiceWorkerJob::failedWithException): * workers/ServiceWorkerJob.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h. (WebCore::ServiceWorkerJob::createRegisterJob): (WebCore::ServiceWorkerJob::identifier const): * workers/ServiceWorkerJobClient.h: Added. (WebCore::ServiceWorkerJobClient::~ServiceWorkerJobClient): * workers/ServiceWorkerProvider.cpp: Added. (WebCore::ServiceWorkerProvider::singleton): (WebCore::ServiceWorkerProvider::setSharedProvider): * workers/ServiceWorkerProvider.h: Added. * workers/ServiceWorkerRegistrationOptions.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h. * workers/ServiceWorkerRegistrationParameters.cpp: Added. * workers/ServiceWorkerRegistrationParameters.h: Added. Source/WebKit: * CMakeLists.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Storage/WebServiceWorkerProvider.cpp: Added. (WebKit::WebServiceWorkerProvider::singleton): (WebKit::WebServiceWorkerProvider::WebServiceWorkerProvider): (WebKit::WebServiceWorkerProvider::scheduleJob): * WebProcess/Storage/WebServiceWorkerProvider.h: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): LayoutTests: Verifies that the "serviceWorker.register()" job we currently schedule fails as expected. * http/tests/workers/service/basic-register-expected.txt: Added. * http/tests/workers/service/basic-register.html: Added. * http/tests/workers/service/resources/basic-register.js: Added. * http/tests/workers/service/resources/empty-worker.js: Added. * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac-wk1/TestExpectations trunk/LayoutTests/platform/win/TestExpectations trunk/Source/WebCore/CMakeLists.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/dom/Document.cpp trunk/Source/WebCore/dom/Document.h trunk/Source/WebCore/workers/ServiceWorkerContainer.cpp trunk/Source/WebCore/workers/ServiceWorkerContainer.h trunk/Source/WebKit/CMakeLists.txt trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/WebProcess.cpp Added Paths trunk/LayoutTests/http/tests/workers/service/ trunk/LayoutTests/http/tests/workers/service/basic-register-expected.txt trunk/LayoutTests/http/tests/workers/service/basic-register.html trunk/LayoutTests/http/tests/workers/service/resources/ trunk/LayoutTests/http/tests/workers/service/resources/basic-register.js trunk/LayoutTests/http/tests/workers/service/resources/empty-worker.js trunk/Source/WebCore/workers/ServiceWorkerJob.cpp trunk/Source/WebCore/workers/ServiceWorkerJob.h trunk/Source/WebCore/workers/ServiceWorkerJobClient.h trunk/Source/WebCore/workers/ServiceWorkerProvider.cpp trunk/Source/WebCore/workers/ServiceWorkerProvider.h trunk/Source/WebCore/workers/ServiceWorkerRegistrationOptions.h trunk/Source/WebCore/workers/ServiceWorkerRegistrationParameters.cpp trunk/Source/WebCore/workers/ServiceWorkerRegistrationParameters.h trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h Diff Modified: trunk/LayoutTests/ChangeLog (220538 => 220539) --- trunk/LayoutTests/ChangeLog 2017-08-10 19:05:51 UTC (rev 220538) +++ trunk/LayoutTests/ChangeLog 2017-08-10 19:28:26 UTC (rev 220539) @@ -1,3 +1,19 @@ +2017-08-10 Brady Eidson + +Add ServiceWorkerJob. +https://bugs.webkit.org/show_bug.cgi?id=175241 + +Reviewed by Tim Horton. + +Verifies that the "serviceWorker.register()" job we currently schedule fails as expected. + +* http/tests/workers/service/basic-register-expected.txt: Added. +* http/tests/
[webkit-changes] [220475] trunk/Source/WebCore
Title: [220475] trunk/Source/WebCore Revision 220475 Author beid...@apple.com Date 2017-08-09 13:25:57 -0700 (Wed, 09 Aug 2017) Log Message Teach ScriptExecutionContexts about their SessionID. https://bugs.webkit.org/show_bug.cgi?id=175391 Reviewed by Andy Estes. No new tests (No current change in behavior). Turns out that Workers need to know their SessionID for future feature development. So let's teach it to them. * dom/ScriptExecutionContext.h: Expose a pure virtual SessionID accessor. * dom/Document.cpp: (WebCore::Document::sessionID const): * dom/Document.h: * page/SessionID.cpp: (WebCore::SessionID::isolatedCopy const): * page/SessionID.h: * workers/DedicatedWorkerGlobalScope.cpp: (WebCore::DedicatedWorkerGlobalScope::create): (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope): * workers/DedicatedWorkerGlobalScope.h: * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::DedicatedWorkerThread): (WebCore::DedicatedWorkerThread::createWorkerGlobalScope): * workers/DedicatedWorkerThread.h: * workers/Worker.cpp: (WebCore::Worker::notifyFinished): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): * workers/WorkerGlobalScope.h: * workers/WorkerGlobalScopeProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): * workers/WorkerMessagingProxy.h: * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::WorkerThreadStartupData): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::workerThread): * workers/WorkerThread.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Document.cpp trunk/Source/WebCore/dom/Document.h trunk/Source/WebCore/dom/ScriptExecutionContext.h trunk/Source/WebCore/page/SessionID.cpp trunk/Source/WebCore/page/SessionID.h trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.h trunk/Source/WebCore/workers/DedicatedWorkerThread.cpp trunk/Source/WebCore/workers/DedicatedWorkerThread.h trunk/Source/WebCore/workers/Worker.cpp trunk/Source/WebCore/workers/WorkerGlobalScope.cpp trunk/Source/WebCore/workers/WorkerGlobalScope.h trunk/Source/WebCore/workers/WorkerGlobalScopeProxy.h trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp trunk/Source/WebCore/workers/WorkerMessagingProxy.h trunk/Source/WebCore/workers/WorkerThread.cpp trunk/Source/WebCore/workers/WorkerThread.h Diff Modified: trunk/Source/WebCore/ChangeLog (220474 => 220475) --- trunk/Source/WebCore/ChangeLog 2017-08-09 20:08:01 UTC (rev 220474) +++ trunk/Source/WebCore/ChangeLog 2017-08-09 20:25:57 UTC (rev 220475) @@ -1,3 +1,54 @@ +2017-08-09 Brady Eidson + +Teach ScriptExecutionContexts about their SessionID. +https://bugs.webkit.org/show_bug.cgi?id=175391 + +Reviewed by Andy Estes. + +No new tests (No current change in behavior). + +Turns out that Workers need to know their SessionID for future feature development. +So let's teach it to them. + +* dom/ScriptExecutionContext.h: Expose a pure virtual SessionID accessor. + +* dom/Document.cpp: +(WebCore::Document::sessionID const): +* dom/Document.h: + +* page/SessionID.cpp: +(WebCore::SessionID::isolatedCopy const): +* page/SessionID.h: + +* workers/DedicatedWorkerGlobalScope.cpp: +(WebCore::DedicatedWorkerGlobalScope::create): +(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope): +* workers/DedicatedWorkerGlobalScope.h: + +* workers/DedicatedWorkerThread.cpp: +(WebCore::DedicatedWorkerThread::DedicatedWorkerThread): +(WebCore::DedicatedWorkerThread::createWorkerGlobalScope): +* workers/DedicatedWorkerThread.h: + +* workers/Worker.cpp: +(WebCore::Worker::notifyFinished): + +* workers/WorkerGlobalScope.cpp: +(WebCore::WorkerGlobalScope::WorkerGlobalScope): +* workers/WorkerGlobalScope.h: + +* workers/WorkerGlobalScopeProxy.h: + +* workers/WorkerMessagingProxy.cpp: +(WebCore::WorkerMessagingProxy::startWorkerGlobalScope): +* workers/WorkerMessagingProxy.h: + +* workers/WorkerThread.cpp: +(WebCore::WorkerThreadStartupData::WorkerThreadStartupData): +(WebCore::WorkerThread::WorkerThread): +(WebCore::WorkerThread::workerThread): +* workers/WorkerThread.h: + 2017-08-09 Wenson Hsieh [iOS DnD] ENABLE_DRAG_SUPPORT should be turned off for iOS 10 and enabled by default Modified: trunk/Source/WebCore/dom/Document.cpp (220474 => 220475) --- trunk/Source/WebCore/dom/Document.cpp 2017-08-09 20:08:01 UTC (rev 220474) +++ trunk/Source/WebCore/dom/Document.cpp 2017-08-09 20:25:57 UTC (rev 220475) @@ -4686,6 +4686,12 @@ return completeURL(url, m_baseURL); } +SessionID Document::sessionID() const +{ +auto* page = this->page(); +return page ? p
[webkit-changes] [220467] trunk/Source/WebKit
Title: [220467] trunk/Source/WebKit Revision 220467 Author beid...@apple.com Date 2017-08-09 11:05:24 -0700 (Wed, 09 Aug 2017) Log Message ServiceWorker experimental feature should not be on by default (definitely not ready). https://bugs.webkit.org/show_bug.cgi?id=175389 Rubberstamped by Andy Estes. * Shared/WebPreferencesDefinitions.h: false, not DEFAULT_EXPERIMENTAL_FEATURES_ENABLED Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/WebPreferencesDefinitions.h Diff Modified: trunk/Source/WebKit/ChangeLog (220466 => 220467) --- trunk/Source/WebKit/ChangeLog 2017-08-09 18:03:11 UTC (rev 220466) +++ trunk/Source/WebKit/ChangeLog 2017-08-09 18:05:24 UTC (rev 220467) @@ -1,3 +1,12 @@ +2017-08-09 Brady Eidson + +ServiceWorker experimental feature should not be on by default (definitely not ready). +https://bugs.webkit.org/show_bug.cgi?id=175389 + +Rubberstamped by Andy Estes. + +* Shared/WebPreferencesDefinitions.h: false, not DEFAULT_EXPERIMENTAL_FEATURES_ENABLED + 2017-08-09 Ryan Haddad Unreviewed, rolling out r220457. Modified: trunk/Source/WebKit/Shared/WebPreferencesDefinitions.h (220466 => 220467) --- trunk/Source/WebKit/Shared/WebPreferencesDefinitions.h 2017-08-09 18:03:11 UTC (rev 220466) +++ trunk/Source/WebKit/Shared/WebPreferencesDefinitions.h 2017-08-09 18:05:24 UTC (rev 220467) @@ -366,7 +366,7 @@ macro(LinkPreloadEnabled, linkPreloadEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Link Preload", "Link preload support") \ macro(WebRTCLegacyAPIDisabled, webRTCLegacyAPIDisabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Remove Legacy WebRTC API", "Remove Legacy WebRTC API") \ macro(IsSecureContextAttributeEnabled, isSecureContextAttributeEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Secure Contexts API", "Enable Secure Contexts API") \ -macro(ServiceWorkersEnabled, serviceWorkersEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "ServiceWorkers", "Enable ServiceWorkers") \ +macro(ServiceWorkersEnabled, serviceWorkersEnabled, Bool, bool, false, "ServiceWorkers", "Enable ServiceWorkers") \ macro(CacheAPIEnabled, cacheAPIEnabled, Bool, bool, false, "Cache API", "Enable Cache API") \ macro(SubresourceIntegrityEnabled, subresourceIntegrityEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubresourceIntegrity", "Enable SubresourceIntegrity") \ macro(ViewportFitEnabled, viewportFitEnabled, Bool, bool, true, "Viewport Fit", "Enable viewport-fit viewport parameter") \ ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [220429] trunk/Source/WebKitLegacy/mac
Title: [220429] trunk/Source/WebKitLegacy/mac Revision 220429 Author beid...@apple.com Date 2017-08-08 16:53:04 -0700 (Tue, 08 Aug 2017) Log Message Don't enable default icon loading in WK1 for apps linked against old SDKs. and https://bugs.webkit.org/show_bug.cgi?id=175342 Reviewed by Andy Estes. * Misc/WebKitVersionChecks.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::getLoadDecisionForIcons): Don't do any icon loading unless the app is linked against new WebKit with the new behavior. Modified Paths trunk/Source/WebKitLegacy/mac/ChangeLog trunk/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.h trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm Diff Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (220428 => 220429) --- trunk/Source/WebKitLegacy/mac/ChangeLog 2017-08-08 23:36:49 UTC (rev 220428) +++ trunk/Source/WebKitLegacy/mac/ChangeLog 2017-08-08 23:53:04 UTC (rev 220429) @@ -1,3 +1,15 @@ +2017-08-08 Brady Eidson + +Don't enable default icon loading in WK1 for apps linked against old SDKs. + and https://bugs.webkit.org/show_bug.cgi?id=175342 + +Reviewed by Andy Estes. + +* Misc/WebKitVersionChecks.h: +* WebCoreSupport/WebFrameLoaderClient.mm: +(WebFrameLoaderClient::getLoadDecisionForIcons): Don't do any icon loading unless + the app is linked against new WebKit with the new behavior. + 2017-08-07 Devin Rousso Web Inspector: Preview Canvas path when viewing a recording Modified: trunk/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.h (220428 => 220429) --- trunk/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.h 2017-08-08 23:36:49 UTC (rev 220428) +++ trunk/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.h 2017-08-08 23:53:04 UTC (rev 220429) @@ -61,6 +61,8 @@ #define WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY 0x02170D00 // 535.13.0 #define WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR 0x02190100 // 537.1.0 #define WEBKIT_FIRST_VERSION_WITH_INSECURE_CONTENT_BLOCKING 0x02590116 // 601.1.22 +#define WEBKIT_FIRST_VERSION_WITH_DEFAULT_ICON_LOADING 0x025C0126 // 604.1.38 + #else // Need to implement WebKitLinkedOnOrAfter // Actually UIKit version numbers, since applications don't link against WebKit Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (220428 => 220429) --- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2017-08-08 23:36:49 UTC (rev 220428) +++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2017-08-08 23:53:04 UTC (rev 220429) @@ -54,6 +54,7 @@ #import "WebKitErrorsPrivate.h" #import "WebKitLogging.h" #import "WebKitNSStringExtras.h" +#import "WebKitVersionChecks.h" #import "WebNSURLExtras.h" #import "WebNavigationData.h" #import "WebNetscapePluginPackage.h" @@ -142,7 +143,6 @@ #import #import #import -#import "WebKitVersionChecks.h" #import "WebMailDelegate.h" #import "WebUIKitDelegate.h" #endif @@ -2280,6 +2280,15 @@ DocumentLoader* documentLoader = frame->loader().documentLoader(); ASSERT(documentLoader); +#if PLATFORM(MAC) +if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_DEFAULT_ICON_LOADING)) { +for (auto& icon : icons) +documentLoader->didGetLoadDecisionForIcon(false, icon.second, 0); + +return; +} +#endif + bool disallowedDueToImageLoadSettings = false; if (!frame->settings().loadsImagesAutomatically() && !frame->settings().loadsSiteIconsIgnoringImageLoadingSetting()) disallowedDueToImageLoadSettings = true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [220344] trunk
Title: [220344] trunk Revision 220344 Author beid...@apple.com Date 2017-08-07 11:22:05 -0700 (Mon, 07 Aug 2017) Log Message Implement most of ServiceWorkerContainer::addRegistration. https://bugs.webkit.org/show_bug.cgi?id=175237 Reviewed by Andy Estes. LayoutTests/imported/w3c: * web-platform-tests/FileAPI/historical.https-expected.txt: * web-platform-tests/background-fetch/interfaces-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt: * web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt: * web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-_javascript_-agent-formalism/canblock-serviceworker.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt: * web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt: * web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt: * web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/general.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt: Source/WebCore: No new tests (Covered by changes to existing tests). There's still so much supporting infrastructure to add with these early patches that I'm still moving them in baby steps for now, hence not implementing register() all in one shot. Things will start moving very quickly once we no longer need to add lots of new primitives in each change. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * page/DOMWindow.cpp: (WebCore::DOMWindow::navigator const): * page/Navigator.cpp: (WebCore::Navigator::Navigator): Make the constructor take a ScriptExecutionContext for creation of objects where its import (e.g. ServiceWorkerContainer). * page/Navi
[webkit-changes] [220310] trunk
Title: [220310] trunk Revision 220310 Author beid...@apple.com Date 2017-08-04 21:59:48 -0700 (Fri, 04 Aug 2017) Log Message Have navigator.serviceWorker() actually return a ServiceWorkerContainer object. https://bugs.webkit.org/show_bug.cgi?id=175215 Reviewed by Youenn Fablet. LayoutTests/imported/w3c: * web-platform-tests/FileAPI/historical.https-expected.txt: * web-platform-tests/background-fetch/interfaces-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt: * web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt: * web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-_javascript_-agent-formalism/canblock-serviceworker.https-expected.txt: * web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt: * web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/general.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt: * web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt: * web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt: Source/WebCore: * page/NavigatorBase.cpp: (WebCore::NavigatorBase::serviceWorker): Actually create and remember an object. * page/NavigatorBase.h: * workers/ServiceWorkerContainer.cpp: (WebCore::rejectLater): Asynchronously reject the given promise with an error message. (WebCore::ServiceWorkerContainer::ServiceWorkerContainer): (WebCore::ServiceWorkerContainer::refEventTarget): Ref the underlying Navigator. (WebCore::ServiceWorkerContainer::derefEventTarget): Deref the underlying Navigator. (WebCore::ServiceWorkerContainer::ready): rejectLater the promise. (WebCore::ServiceWorkerContainer::addRegistration): Ditto. (WebCore::ServiceWorkerContainer::getRegistration): Ditto. (WebCore::ServiceWorkerContainer::getRegistrations): Ditto. * workers/ServiceWorkerContainer.h: LayoutTests: * platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/imported/w3c/ChangeLog trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/a
[webkit-changes] [220107] trunk
Title: [220107] trunk Revision 220107 Author beid...@apple.com Date 2017-08-01 12:03:59 -0700 (Tue, 01 Aug 2017) Log Message API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug.. https://bugs.webkit.org/show_bug.cgi?id=175030 Reviewed by Andy Estes. Source/WebKit: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Release the API wrapped on the next spin of the runloop. Tools: * TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm: (-[TaskSchemeHandler webView:startURLSchemeTask:]): Stop calling an invalid NSError constructor. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm Diff Modified: trunk/Source/WebKit/ChangeLog (220106 => 220107) --- trunk/Source/WebKit/ChangeLog 2017-08-01 18:50:45 UTC (rev 220106) +++ trunk/Source/WebKit/ChangeLog 2017-08-01 19:03:59 UTC (rev 220107) @@ -1,5 +1,16 @@ 2017-08-01 Brady Eidson +API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug.. +https://bugs.webkit.org/show_bug.cgi?id=175030 + +Reviewed by Andy Estes. + +* UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: +(WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Release the API wrapped on the next + spin of the runloop. + +2017-08-01 Brady Eidson + Part 2 of: Rename DatabaseProcess to StorageProcess. https://bugs.webkit.org/show_bug.cgi?id=174880 Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm (220106 => 220107) --- trunk/Source/WebKit/UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm 2017-08-01 18:50:45 UTC (rev 220106) +++ trunk/Source/WebKit/UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm 2017-08-01 19:03:59 UTC (rev 220107) @@ -32,6 +32,7 @@ #import "WKURLSchemeTaskInternal.h" #import "WKWebViewInternal.h" #import "WebURLSchemeTask.h" +#import using namespace WebCore; @@ -79,7 +80,9 @@ void WebURLSchemeHandlerCocoa::platformTaskCompleted(WebURLSchemeTask& task) { #if WK_API_ENABLED -m_apiTasks.remove(task.identifier()); +// Release the last reference to this API task on the next spin of the runloop. +RunLoop::main().dispatch([takenTask = m_apiTasks.take(task.identifier())] { +}); #else UNUSED_PARAM(task); #endif Modified: trunk/Tools/ChangeLog (220106 => 220107) --- trunk/Tools/ChangeLog 2017-08-01 18:50:45 UTC (rev 220106) +++ trunk/Tools/ChangeLog 2017-08-01 19:03:59 UTC (rev 220107) @@ -1,5 +1,15 @@ 2017-08-01 Brady Eidson +API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug.. +https://bugs.webkit.org/show_bug.cgi?id=175030 + +Reviewed by Andy Estes. + +* TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm: +(-[TaskSchemeHandler webView:startURLSchemeTask:]): Stop calling an invalid NSError constructor. + +2017-08-01 Brady Eidson + Part 2 of: Rename DatabaseProcess to StorageProcess. https://bugs.webkit.org/show_bug.cgi?id=174880 Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm (220106 => 220107) --- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm 2017-08-01 18:50:45 UTC (rev 220106) +++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm 2017-08-01 19:03:59 UTC (rev 220107) @@ -312,7 +312,7 @@ [task didFinish]; break; case Command::Error: -[task didFailWithError:[[[NSError alloc] init] autorelease]]; +[task didFailWithError:[NSError errorWithDomain:@"WebKit" code:1 userInfo:nil]]; break; } } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [220105] trunk
Title: [220105] trunk Revision 220105 Author beid...@apple.com Date 2017-08-01 11:18:03 -0700 (Tue, 01 Aug 2017) Log Message Part 2 of: Rename DatabaseProcess to StorageProcess. https://bugs.webkit.org/show_bug.cgi?id=174880 Reviewed by Andy Estes. Source/WebKit: Rename some more variables, classes, etc. to reflect the change. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted. (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * Shared/ProcessExecutablePath.h: * Shared/gtk/ProcessExecutablePathGtk.cpp: (WebKit::executablePathOfStorageProcess): (WebKit::executablePathOfDatabaseProcess): Deleted. * Shared/wpe/ProcessExecutablePathWPE.cpp: (WebKit::executablePathOfStorageProcess): (WebKit::executablePathOfDatabaseProcess): Deleted. * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: (WebKit::WebIDBConnectionToClient::putOrAdd): * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::initializeWebsiteDataStore): (WebKit::StorageProcess::postStorageTask): (WebKit::StorageProcess::performNextStorageTask): (WebKit::StorageProcess::createStorageToWebProcessConnection): (WebKit::StorageProcess::fetchWebsiteData): (WebKit::StorageProcess::postDatabaseTask): Deleted. (WebKit::StorageProcess::performNextDatabaseTask): Deleted. (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted. * StorageProcess/StorageProcess.h: * StorageProcess/StorageProcess.messages.in: * StorageProcess/mac/StorageProcessMac.mm: (WebKit::StorageProcess::initializeProcessName): * UIProcess/API/C/WKContext.cpp: (WKContextGetDatabaseProcessIdentifier): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _terminateStorageProcess]): (-[WKProcessPool _storageProcessIdentifier]): (-[WKProcessPool _terminateDatabaseProcess]): Deleted. (-[WKProcessPool _databaseProcessIdentifier]): Deleted. * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::getLaunchOptions): * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::getLaunchOptions): (WebKit::StorageProcessProxy::getStorageProcessConnection): (WebKit::StorageProcessProxy::didClose): (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection): (WebKit::StorageProcessProxy::didFinishLaunching): (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted. (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted. * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebContextClient.cpp: (WebKit::WebContextClient::storageProcessDidCrash): (WebKit::WebContextClient::databaseProcessDidCrash): Deleted. * UIProcess/WebContextClient.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::getStorageProcessConnection): (WebKit::WebProcessPool::storageProcessCrashed): (WebKit::WebProcessPool::pageAddedToProcess): (WebKit::WebProcessPool::storageProcessIdentifier): (WebKit::WebProcessPool::terminateStorageProcess): (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted. (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted. (WebKit::WebProcessPool::databaseProcessCrashed): Deleted. (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted. (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted. * UIProcess/WebProcessPool.h: (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary): (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getStorageProcessConnection): (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): (WebKit::Website
[webkit-changes] [220049] trunk
Title: [220049] trunk Revision 220049 Author beid...@apple.com Date 2017-07-30 10:36:26 -0700 (Sun, 30 Jul 2017) Log Message Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks. https://bugs.webkit.org/show_bug.cgi?id=174958 Reviewed by Darin Adler. Source/WebKit: * UIProcess/API/APIURLSchemeTask.h: * UIProcess/API/C/WKTestingSupport.cpp: (WKGetAPIURLSchemeTaskInstanceCount): (WKGetWebURLSchemeTaskInstanceCount): * UIProcess/API/C/WKTestingSupport.h: * UIProcess/WebURLSchemeTask.h: * WebKit.xcodeproj/project.pbxproj: Source/WTF: This patch adds a new template class "InstanceCounted". For each specialization, "InstanceCounted" will keep track of the total number of instances in existence. This makes explicate leak checking in API tests possible. Since this adds some runtime and storage overhead the code that actually does anything is only compiled in debug builds. * WTF.xcodeproj/project.pbxproj: * wtf/InstanceCounted.h: Added. (WTF::InstanceCounted::InstanceCounted): (WTF::InstanceCounted::instanceCount): (WTF::InstanceCounted::~InstanceCounted): Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-leaks.mm: Added. (-[LeakSchemeHandler webView:startURLSchemeTask:]): (-[LeakSchemeHandler webView:stopURLSchemeTask:]): (runUntilTasksInFlight): (TEST): Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/WTF.xcodeproj/project.pbxproj trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIURLSchemeTask.h trunk/Source/WebKit/UIProcess/WebURLSchemeTask.h trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Source/WTF/wtf/InstanceCounted.h trunk/Source/WebKit/UIProcess/API/C/WKTestingSupport.cpp trunk/Source/WebKit/UIProcess/API/C/WKTestingSupport.h trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-leaks.mm Diff Modified: trunk/Source/WTF/ChangeLog (220048 => 220049) --- trunk/Source/WTF/ChangeLog 2017-07-30 07:38:31 UTC (rev 220048) +++ trunk/Source/WTF/ChangeLog 2017-07-30 17:36:26 UTC (rev 220049) @@ -1,3 +1,26 @@ +2017-07-30 Brady Eidson + +Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks. +https://bugs.webkit.org/show_bug.cgi?id=174958 + +Reviewed by Darin Adler. + +This patch adds a new template class "InstanceCounted". + +For each specialization, "InstanceCounted" will keep track of the total number of +instances in existence. + +This makes explicate leak checking in API tests possible. + +Since this adds some runtime and storage overhead the code that actually does anything +is only compiled in debug builds. + +* WTF.xcodeproj/project.pbxproj: +* wtf/InstanceCounted.h: Added. +(WTF::InstanceCounted::InstanceCounted): +(WTF::InstanceCounted::instanceCount): +(WTF::InstanceCounted::~InstanceCounted): + 2017-07-27 Yusuke Suzuki [WTF] Drop Thread initialization wait in some platforms by introducing StackBounds::newThreadStackBounds(PlatformThreadHandle&) Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (220048 => 220049) --- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-07-30 07:38:31 UTC (rev 220048) +++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-07-30 17:36:26 UTC (rev 220049) @@ -297,6 +297,7 @@ 515F794C1CFC9F4A00CCED93 /* CrossThreadCopier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadCopier.h; sourceTree = ""; }; 515F794D1CFC9F4A00CCED93 /* CrossThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadTask.h; sourceTree = ""; }; 515F79551CFD3A6900CCED93 /* CrossThreadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadQueue.h; sourceTree = ""; }; + 5182C22C1F2BC7E60059BA7C /* InstanceCounted.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstanceCounted.h; sourceTree = ""; }; 5311BD511EA71CAD00525281 /* Signals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Signals.cpp; sourceTree = ""; }; 5311BD551EA7E15A00525281 /* LocklessBag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocklessBag.h; sourceTree = ""; }; 5311BD571EA7E1A100525281 /* Signals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Signals.h; sourceTree = ""; }; @@ -823,6 +824,7 @@ 2684D4351C000D400081D663 /* IndexSparseSet.h */, A8A472BC151A825A004123FF /* InlineASM.h */, A70DA0821799F04D00529A9B /* Insertion.h */, +5182C22C1F2BC7E60059BA7C /* InstanceCounted.h */, 7CDD7FF7186D291E007
[webkit-changes] [220033] trunk
Title: [220033] trunk Revision 220033 Author beid...@apple.com Date 2017-07-28 16:19:50 -0700 (Fri, 28 Jul 2017) Log Message API tests that use URLSchemeHandler are failing. https://bugs.webkit.org/show_bug.cgi?id=174950 Reviewed by Alex Christensen. Source/WebKit: Make sure that in all cases where we remove the last task from the page->task map... ...We also remove the map itself. * UIProcess/WebURLSchemeHandler.cpp: (WebKit::WebURLSchemeHandler::stopTask): (WebKit::WebURLSchemeHandler::taskCompleted): (WebKit::WebURLSchemeHandler::removeTaskFromPageMap): * UIProcess/WebURLSchemeHandler.h: Tools: Fix the NoMIMEType test to be correct. * TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm: (-[SchemeHandler initWithData:mimeType:]): (-[SchemeHandler webView:startURLSchemeTask:]): (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm Diff Modified: trunk/Source/WebKit/ChangeLog (220032 => 220033) --- trunk/Source/WebKit/ChangeLog 2017-07-28 22:31:37 UTC (rev 220032) +++ trunk/Source/WebKit/ChangeLog 2017-07-28 23:19:50 UTC (rev 220033) @@ -1,5 +1,21 @@ 2017-07-28 Brady Eidson +API tests that use URLSchemeHandler are failing. +https://bugs.webkit.org/show_bug.cgi?id=174950 + +Reviewed by Alex Christensen. + +Make sure that in all cases where we remove the last task from the page->task map... +...We also remove the map itself. + +* UIProcess/WebURLSchemeHandler.cpp: +(WebKit::WebURLSchemeHandler::stopTask): +(WebKit::WebURLSchemeHandler::taskCompleted): +(WebKit::WebURLSchemeHandler::removeTaskFromPageMap): +* UIProcess/WebURLSchemeHandler.h: + +2017-07-28 Brady Eidson + WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped). and https://bugs.webkit.org/show_bug.cgi?id=174895 Modified: trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp (220032 => 220033) --- trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp 2017-07-28 22:31:37 UTC (rev 220032) +++ trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp 2017-07-28 23:19:50 UTC (rev 220033) @@ -80,17 +80,11 @@ if (iterator == m_tasks.end()) return; -auto pageIterator = m_tasksByPageIdentifier.find(page.pageID()); -ASSERT(pageIterator != m_tasksByPageIdentifier.end()); -ASSERT(pageIterator->value.contains(taskIdentifier)); -pageIterator->value.remove(taskIdentifier); - iterator->value->stop(); platformStopTask(page, iterator->value); +removeTaskFromPageMap(page.pageID(), taskIdentifier); m_tasks.remove(iterator); -if (pageIterator->value.isEmpty()) -m_tasksByPageIdentifier.remove(pageIterator); } void WebURLSchemeHandler::taskCompleted(WebURLSchemeTask& task) @@ -97,11 +91,19 @@ { auto takenTask = m_tasks.take(task.identifier()); ASSERT_UNUSED(takenTask, takenTask->ptr() == &task); +removeTaskFromPageMap(task.pageID(), task.identifier()); -ASSERT(m_tasksByPageIdentifier.get(task.pageID()).contains(task.identifier())); -m_tasksByPageIdentifier.get(task.pageID()).remove(task.identifier()); - platformTaskCompleted(task); } +void WebURLSchemeHandler::removeTaskFromPageMap(uint64_t pageID, uint64_t taskID) +{ +auto iterator = m_tasksByPageIdentifier.find(pageID); +ASSERT(iterator != m_tasksByPageIdentifier.end()); +ASSERT(iterator->value.contains(taskID)); +iterator->value.remove(taskID); +if (iterator->value.isEmpty()) +m_tasksByPageIdentifier.remove(iterator); +} + } // namespace WebKit Modified: trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.h (220032 => 220033) --- trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.h 2017-07-28 22:31:37 UTC (rev 220032) +++ trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.h 2017-07-28 23:19:50 UTC (rev 220033) @@ -59,6 +59,8 @@ virtual void platformStopTask(WebPageProxy&, WebURLSchemeTask&) = 0; virtual void platformTaskCompleted(WebURLSchemeTask&) = 0; +void removeTaskFromPageMap(uint64_t pageID, uint64_t taskID); + uint64_t m_identifier; HashMap> m_tasks; Modified: trunk/Tools/ChangeLog (220032 => 220033) --- trunk/Tools/ChangeLog 2017-07-28 22:31:37 UTC (rev 220032) +++ trunk/Tools/ChangeLog 2017-07-28 23:19:50 UTC (rev 220033) @@ -1,3 +1,17 @@ +2017-07-28 Brady Eidson + +API tests that use URLSchemeHandler are failing. +https://bugs.webkit.org/show_bug.cgi?id=174950 + +Reviewed by Alex Christensen. + +Fix the NoMIMEType test to be correct. + +* TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm: +(-[SchemeHandler initWithData:mimeType:]): +(-[SchemeHandler webView:startURLSchemeTask:]): +(TEST): + 2017-07-28 Daniel Bates
[webkit-changes] [220011] trunk/Source/WebKit
Title: [220011] trunk/Source/WebKit Revision 220011 Author beid...@apple.com Date 2017-07-28 13:03:42 -0700 (Fri, 28 Jul 2017) Log Message WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped). and https://bugs.webkit.org/show_bug.cgi?id=174895 Reviewed by Alex Christensen. There was a lot going on here: - There was an unbroken cycle between URLSchemeHandlers and URLSchemeTasks - WKURLSchemeTasks were not destroying their API::URLSchemeTask implementation object - When a WKWebView was dealloc'ed, it was not cleaning up the related UIProcess tasks - If the NetworkingProcess crashed, WebProcesses were not cleaning up their tasks (and therefore the UIProcess tasks were also not getting cleaned up) - If a WebProcess crashed, the UIProcess was not cleaning up the related tasks * UIProcess/API/Cocoa/WKURLSchemeTask.mm: (-[WKURLSchemeTaskImpl dealloc]): Call API::~URLSchemeTask * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Clear out the API wrapper map so the wrapper and implementation object can both be destroyed. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Call stopAllURLSchemeTasks. (WebKit::WebPageProxy::processDidTerminate): Call stopAllURLSchemeTasks. (WebKit::WebPageProxy::stopAllURLSchemeTasks): * UIProcess/WebPageProxy.h: * UIProcess/WebURLSchemeHandler.cpp: (WebKit::WebURLSchemeHandler::startTask): (WebKit::WebURLSchemeHandler::stopAllTasksForPage): (WebKit::WebURLSchemeHandler::stopTask): (WebKit::WebURLSchemeHandler::taskCompleted): * UIProcess/WebURLSchemeHandler.h: * UIProcess/WebURLSchemeTask.cpp: (WebKit::WebURLSchemeTask::WebURLSchemeTask): * UIProcess/WebURLSchemeTask.h: (WebKit::WebURLSchemeTask::pageID): Store separate from the WebPage so messaging is possible even after the WebPage* has been cleared. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::stopAllURLSchemeTasks): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp: (WebKit::WebURLSchemeHandlerProxy::stopAllTasks): (WebKit::WebURLSchemeHandlerProxy::taskDidComplete): (WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading): (WebKit::WebURLSchemeHandlerProxy::removeTask): * WebProcess/WebPage/WebURLSchemeHandlerProxy.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkProcessConnectionClosed): Call stopAllURLSchemeTasks for each WebPage. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/WKURLSchemeTask.mm trunk/Source/WebKit/UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h trunk/Source/WebKit/UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/WebPageProxy.h trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp trunk/Source/WebKit/UIProcess/WebURLSchemeHandler.h trunk/Source/WebKit/UIProcess/WebURLSchemeTask.cpp trunk/Source/WebKit/UIProcess/WebURLSchemeTask.h trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp trunk/Source/WebKit/WebProcess/WebPage/WebPage.h trunk/Source/WebKit/WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp trunk/Source/WebKit/WebProcess/WebPage/WebURLSchemeHandlerProxy.h trunk/Source/WebKit/WebProcess/WebProcess.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (220010 => 220011) --- trunk/Source/WebKit/ChangeLog 2017-07-28 18:54:33 UTC (rev 220010) +++ trunk/Source/WebKit/ChangeLog 2017-07-28 20:03:42 UTC (rev 220011) @@ -1,3 +1,60 @@ +2017-07-28 Brady Eidson + +WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped). + and https://bugs.webkit.org/show_bug.cgi?id=174895 + +Reviewed by Alex Christensen. + +There was a lot going on here: +- There was an unbroken cycle between URLSchemeHandlers and URLSchemeTasks +- WKURLSchemeTasks were not destroying their API::URLSchemeTask implementation object +- When a WKWebView was dealloc'ed, it was not cleaning up the related UIProcess tasks +- If the NetworkingProcess crashed, WebProcesses were not cleaning up their tasks + (and therefore the UIProcess tasks were also not getting cleaned up) +- If a WebProcess crashed, the UIProcess was not cleaning up the related tasks + +* UIProcess/API/Cocoa/WKURLSchemeTask.mm: +(-[WKURLSchemeTaskImpl dealloc]): Call API::~URLSchemeTask + +* UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h: +* UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: +(WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Clear out the API wrapper map + so the wrapper and implementation object can both be destroyed. + +* UIProcess/WebPageProxy.cpp: +(WebKit::WebPageProxy::close): Call stopAllURLSchemeTasks. +(WebKit::WebPageProxy::processDidTerminate): Call stopAllURLSchemeTasks. +(WebKit::WebPageProxy::stopAllURLSchemeTasks): +* UIP
[webkit-changes] [219990] trunk
Title: [219990] trunk Revision 219990 Author beid...@apple.com Date 2017-07-27 20:32:33 -0700 (Thu, 27 Jul 2017) Log Message Part 2 of: Rename DatabaseProcess to StorageProcess. https://bugs.webkit.org/show_bug.cgi?id=174880 Reviewed by Andy Estes. Source/WebKit: Rename some more variables, classes, etc. to reflect the change. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): (WebKit::NetworkProcess::didgrantSandboxExtensionsToStorageProcessForBlobs): (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted. (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * Shared/ProcessExecutablePath.h: * Shared/gtk/ProcessExecutablePathGtk.cpp: (WebKit::executablePathOfStorageProcess): (WebKit::executablePathOfDatabaseProcess): Deleted. * Shared/wpe/ProcessExecutablePathWPE.cpp: (WebKit::executablePathOfStorageProcess): (WebKit::executablePathOfDatabaseProcess): Deleted. * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: (WebKit::WebIDBConnectionToClient::putOrAdd): * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::initializeWebsiteDataStore): (WebKit::StorageProcess::postStorageTask): (WebKit::StorageProcess::performNextStorageTask): (WebKit::StorageProcess::createStorageToWebProcessConnection): (WebKit::StorageProcess::fetchWebsiteData): (WebKit::StorageProcess::postDatabaseTask): Deleted. (WebKit::StorageProcess::performNextDatabaseTask): Deleted. (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted. * StorageProcess/StorageProcess.h: * StorageProcess/StorageProcess.messages.in: * StorageProcess/mac/StorageProcessMac.mm: (WebKit::StorageProcess::initializeProcessName): * UIProcess/API/C/WKContext.cpp: (WKContextGetDatabaseProcessIdentifier): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _terminateStorageProcess]): (-[WKProcessPool _storageProcessIdentifier]): (-[WKProcessPool _terminateDatabaseProcess]): Deleted. (-[WKProcessPool _databaseProcessIdentifier]): Deleted. * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::getLaunchOptions): (WebKit::StorageProcessProxy::getStorageProcessConnection): (WebKit::StorageProcessProxy::didClose): (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection): (WebKit::StorageProcessProxy::didFinishLaunching): (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted. (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted. * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebContextClient.cpp: (WebKit::WebContextClient::storageProcessDidCrash): (WebKit::WebContextClient::databaseProcessDidCrash): Deleted. * UIProcess/WebContextClient.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::getStorageProcessConnection): (WebKit::WebProcessPool::storageProcessCrashed): (WebKit::WebProcessPool::pageAddedToProcess): (WebKit::WebProcessPool::storageProcessIdentifier): (WebKit::WebProcessPool::terminateStorageProcess): (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted. (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted. (WebKit::WebProcessPool::databaseProcessCrashed): Deleted. (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted. (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted. * UIProcess/WebProcessPool.h: (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary): (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getStorageProcessConnection): (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::storageProcessParameters): (WebKit::WebsiteDataStore::databaseProcessPar
[webkit-changes] [219974] trunk/Source/WebKit
Title: [219974] trunk/Source/WebKit Revision 219974 Author beid...@apple.com Date 2017-07-26 19:47:20 -0700 (Wed, 26 Jul 2017) Log Message ResourceLoadStatistics API tests fail on El Capitan. https://bugs.webkit.org/show_bug.cgi?id=174877 Reviewed by Chris Dumez. Always install the testing callback. * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (219973 => 219974) --- trunk/Source/WebKit/ChangeLog 2017-07-27 01:49:44 UTC (rev 219973) +++ trunk/Source/WebKit/ChangeLog 2017-07-27 02:47:20 UTC (rev 219974) @@ -1,3 +1,15 @@ +2017-07-26 Brady Eidson + +ResourceLoadStatistics API tests fail on El Capitan. +https://bugs.webkit.org/show_bug.cgi?id=174877 + +Reviewed by Chris Dumez. + +Always install the testing callback. + +* UIProcess/WebsiteData/WebsiteDataStore.cpp: +(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback): + 2017-07-26 Tim Horton REGRESSION (r211160): Can't pinch to zoom unlocked encrypted PDFs in WKWebView Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (219973 => 219974) --- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2017-07-27 01:49:44 UTC (rev 219973) +++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2017-07-27 02:47:20 UTC (rev 219974) @@ -1308,7 +1308,7 @@ updateCookiePartitioningForTopPrivatelyOwnedDomains(domainsToRemove, domainsToAdd, shouldClearFirst); }); #else -m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(m_configuration.resourceLoadStatisticsDirectory, nullptr); +m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(m_configuration.resourceLoadStatisticsDirectory, WTFMove(callback)); #endif for (auto& processPool : processPools()) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [219960] trunk
Title: [219960] trunk Revision 219960 Author beid...@apple.com Date 2017-07-26 13:11:38 -0700 (Wed, 26 Jul 2017) Log Message Remove DATABASE_PROCESS build flag. https://bugs.webkit.org/show_bug.cgi?id=174868 Reviewed by Andy Estes. .: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/WebKitFeatures.cmake: Source/WebKit: * CMakeLists.txt: * DatabaseProcess/DatabaseProcess.cpp: * DatabaseProcess/DatabaseProcess.h: * DatabaseProcess/DatabaseProcess.messages.in: * DatabaseProcess/DatabaseToWebProcessConnection.cpp: * DatabaseProcess/DatabaseToWebProcessConnection.h: * DatabaseProcess/DatabaseToWebProcessConnection.messages.in: * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in: * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp: * DatabaseProcess/ios/DatabaseProcessIOS.mm: * DatabaseProcess/mac/DatabaseProcessMac.mm: * DatabaseProcess/unix/DatabaseProcessMainUnix.h: * Shared/Databases/DatabaseProcessCreationParameters.cpp: * Shared/Databases/DatabaseProcessCreationParameters.h: * Shared/ProcessExecutablePath.h: * Shared/gtk/ProcessExecutablePathGtk.cpp: (WebKit::executablePathOfDatabaseProcess): * Shared/wpe/ProcessExecutablePathWPE.cpp: (WebKit::executablePathOfDatabaseProcess): * UIProcess/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::getLaunchOptions): * UIProcess/Databases/DatabaseProcessProxy.cpp: * UIProcess/Databases/DatabaseProcessProxy.h: * UIProcess/Databases/DatabaseProcessProxy.messages.in: * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::databaseProcessCrashed): (WebKit::WebProcessPool::databaseProcessIdentifier): (WebKit::WebProcessPool::terminateDatabaseProcess): * UIProcess/WebProcessPool.h: (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getDatabaseProcessConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): * WebKit2Prefix.h: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: * WebProcess/Databases/WebToDatabaseProcessConnection.cpp: * WebProcess/Databases/WebToDatabaseProcessConnection.h: * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: Modified Paths trunk/ChangeLog trunk/Source/WebKit/CMakeLists.txt trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/DatabaseProcess/DatabaseProcess.cpp trunk/Source/WebKit/DatabaseProcess/DatabaseProcess.h trunk/Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in trunk/Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp trunk/Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h trunk/Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in trunk/Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in trunk/Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp trunk/Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm trunk/Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm trunk/Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h trunk/Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp trunk/Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h trunk/Source/WebKit/Shared/ProcessExecutablePath.h trunk/Source/WebKit/Shared/gtk/ProcessExecutablePathGtk.cpp trunk/Source/WebKit/Shared/wpe/ProcessExecutablePathWPE.cpp trunk/Source/WebKit/UIProcess/ChildProcessProxy.cpp trunk/Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp trunk/Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h trunk/Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in trunk/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h trunk/Source/WebKit/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm trunk/Source/WebKit/UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp trunk/Source/WebKit/UIProcess/WebProcessProxy.h trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Source/WebKit/WebKit2Prefix.h trunk/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in trunk/Source/WebKit/WebProcess/Databases/WebToDatabaseProce
[webkit-changes] [219958] trunk
Title: [219958] trunk Revision 219958 Author beid...@apple.com Date 2017-07-26 13:00:02 -0700 (Wed, 26 Jul 2017) Log Message Add test to verify certain child processes are not launched as a side effect of enabling ResourceLoadStatistics. https://bugs.webkit.org/show_bug.cgi?id=174851 Reviewed by Chris Dumez. Source/WebKit: * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _databaseProcessIdentifier]): (-[WKProcessPool _pluginProcessCount]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/Plugins/PluginProcessManager.h: (WebKit::PluginProcessManager::pluginProcesses): Tools: * TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics.mm: (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h trunk/Source/WebKit/UIProcess/Plugins/PluginProcessManager.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics.mm Diff Modified: trunk/Source/WebKit/ChangeLog (219957 => 219958) --- trunk/Source/WebKit/ChangeLog 2017-07-26 19:24:33 UTC (rev 219957) +++ trunk/Source/WebKit/ChangeLog 2017-07-26 20:00:02 UTC (rev 219958) @@ -1,3 +1,18 @@ +2017-07-26 Brady Eidson + +Add test to verify certain child processes are not launched as a side effect of enabling ResourceLoadStatistics. +https://bugs.webkit.org/show_bug.cgi?id=174851 + +Reviewed by Chris Dumez. + +* UIProcess/API/Cocoa/WKProcessPool.mm: +(-[WKProcessPool _databaseProcessIdentifier]): +(-[WKProcessPool _pluginProcessCount]): +* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: + +* UIProcess/Plugins/PluginProcessManager.h: +(WebKit::PluginProcessManager::pluginProcesses): + 2017-07-26 Brian Burg Remove WEB_TIMING feature flag Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm (219957 => 219958) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm 2017-07-26 19:24:33 UTC (rev 219957) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm 2017-07-26 20:00:02 UTC (rev 219958) @@ -32,6 +32,7 @@ #import "CacheModel.h" #import "DownloadClient.h" #import "Logging.h" +#import "PluginProcessManager.h" #import "SandboxUtilities.h" #import "UIGamepadProvider.h" #import "WKObject.h" @@ -399,6 +400,11 @@ return _processPool->networkProcessIdentifier(); } +- (pid_t)_databaseProcessIdentifier +{ +return _processPool->databaseProcessIdentifier(); +} + - (void)_syncNetworkProcessCookies { _processPool->syncNetworkProcessCookies(); @@ -409,6 +415,15 @@ return _processPool->processes().size(); } +- (size_t)_pluginProcessCount +{ +#if !PLATFORM(IOS) +return WebKit::PluginProcessManager::singleton().pluginProcesses().size(); +#else +return 0; +#endif +} + + (void)_forceGameControllerFramework { #if ENABLE(GAMEPAD) Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h (219957 => 219958) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h 2017-07-26 19:24:33 UTC (rev 219957) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h 2017-07-26 20:00:02 UTC (rev 219958) @@ -77,9 +77,11 @@ // Test only. - (pid_t)_networkProcessIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); +- (pid_t)_databaseProcessIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); // Test only. - (size_t)_webProcessCount WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); +- (size_t)_pluginProcessCount WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); - (void)_syncNetworkProcessCookies WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); // Test only. Should be called before any web content processes are launched. Modified: trunk/Source/WebKit/UIProcess/Plugins/PluginProcessManager.h (219957 => 219958) --- trunk/Source/WebKit/UIProcess/Plugins/PluginProcessManager.h 2017-07-26 19:24:33 UTC (rev 219957) +++ trunk/Source/WebKit/UIProcess/Plugins/PluginProcessManager.h 2017-07-26 20:00:02 UTC (rev 219958) @@ -69,6 +69,8 @@ void updateProcessSuppressionDisabled(RefCounterEvent); #endif +const Vector>& pluginProcesses() const { return m_pluginProcesses; } + private: PluginProcessManager(); Modified: trunk/Tools/ChangeLog (219957 => 219958) --- trunk/Tools/ChangeLog 2017-07-26 19:24:33 UTC (rev 219957) +++ trunk/Tools/ChangeLog 2017-07-26 20:00:02 UTC (rev 219958) @@ -1,3 +1,13 @@ +2017-07-26 Brady Eidson + +Add test to verify certain child processes are not launched as a side effect of enabling ResourceLoadStatistics. +https://bugs.webkit.org/show_bug.cgi?id=174851 + +Reviewed by Chris Dumez. + +* TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics.mm: +(TEST): + 2017-07-26 Brian Burg Remove WEB_TIMING feature flag Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics
[webkit-changes] [219904] trunk
Title: [219904] trunk Revision 219904 Author beid...@apple.com Date 2017-07-25 22:44:05 -0700 (Tue, 25 Jul 2017) Log Message ResourceLoadStatistics grandfathering happens much too often. and https://bugs.webkit.org/show_bug.cgi?id=174825 Reviewed by Chris Dumez. Source/WebKit: The ResourceLoadStatistics grandfathering procedure happens too often. - With an empty memory store, even though an empty memory store is a perfectly valid state. - On each launch, even if grandfathering happened on the last launch - because grandfathering data would not automatically be saved to disk. - After clearing all website data, at which point no grandfathering can possibly be relevant because there is no data to grandfather. This patch fixes those cases and adds API tests to verify they remain fixed. * Shared/WebsiteData/WebsiteDataType.h: * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]): allWebsiteDataTypes, but even with the private ones. (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): If the types being cleared cover all of the types that ResourceLoadStatistics care about, don't grandfather afterwards. (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Ditto. (-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]): * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp: (WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk): Don't grandfather if the store read from disk is empty (as being empty is perfectly fine), and also log the event of "populated without grandfathering". * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData): * UIProcess/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes): (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore): (WebKit::WebResourceLoadStatisticsStore::removeDataRecords): (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData): Schedule a write right away so we don't re-grandfather on next launch, and also log the grandfathering event. (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent): Takes a ShouldGrandfather flag to tell whether or not data should be re-grandfathered after the store is cleared. (WebKit::WebResourceLoadStatisticsStore::logTestingEvent): Log the event to the testing client. (WebKit::dataTypesToRemove): Deleted. * UIProcess/WebResourceLoadStatisticsStore.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled): (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback): Handles enabling ResourceLoadStatistics both with and without a testing callback. * UIProcess/WebsiteData/WebsiteDataStore.h: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit2Cocoa/EmptyGrandfatheredResourceLoadStatistics.plist: Added. * TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics.mm: Added. (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/WebsiteData/WebsiteDataType.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp trunk/Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/EmptyGrandfatheredResourceLoadStatistics.plist trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics.mm Diff Modified: trunk/Source/WebKit/ChangeLog (219903 => 219904) --- trunk/Source/WebKit/ChangeLog 2017-07-26 04:42:19 UTC (rev 219903) +++ trunk/Source/WebKit/ChangeLog 2017-07-26 05:44:05 UTC (rev 219904) @@ -1,3 +1,57 @@ +2017-07-25 Brady Eidson + +ResourceLoadStatistics grandfathering happens much too often. + and https://bugs.webkit.org/show_bug.cgi?id=174825 + +Reviewed by Chris Dumez. + +The ResourceLoadStatistics grandfathering procedure happens too often. +- With an empty memory store, even though an empty memory store is a perfectly valid state. +- On each launch, even if grandfat
[webkit-changes] [219754] trunk/Source/WebKit
Title: [219754] trunk/Source/WebKit Revision 219754 Author beid...@apple.com Date 2017-07-21 17:15:00 -0700 (Fri, 21 Jul 2017) Log Message Crash in many WebKit apps marking a connection invalid under Messages::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace. and https://bugs.webkit.org/show_bug.cgi?id=174729 Reviewed by Tim Horton. Previously, when a NetworkLoad generated a "CanAuthenticateAgainstProtectionSpace" event, the message went from Network process -> Web process -> UI process. In that case, MESSAGE_CHECKing the validity of the frame in WebPageProxy made sense. In r202511 we cut the WebProcess out of this and had Networking go straight to UI process. As a result, the message check became invalid. The Networking process cannot possible know the validity of particular WebPage or WebFrame identifiers. We simply need to validate the input in NetworkProcessProxy. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace): Validate both the page and frame ids before passing the call along to the WebPageProxy. Also, if either of those validations fail, respond to the network process. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (219753 => 219754) --- trunk/Source/WebKit/ChangeLog 2017-07-22 00:13:11 UTC (rev 219753) +++ trunk/Source/WebKit/ChangeLog 2017-07-22 00:15:00 UTC (rev 219754) @@ -1,3 +1,26 @@ +2017-07-21 Brady Eidson + +Crash in many WebKit apps marking a connection invalid under Messages::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace. + and https://bugs.webkit.org/show_bug.cgi?id=174729 + +Reviewed by Tim Horton. + +Previously, when a NetworkLoad generated a "CanAuthenticateAgainstProtectionSpace" event, the message went from +Network process -> Web process -> UI process. + +In that case, MESSAGE_CHECKing the validity of the frame in WebPageProxy made sense. + +In r202511 we cut the WebProcess out of this and had Networking go straight to UI process. + +As a result, the message check became invalid. The Networking process cannot possible know the validity of +particular WebPage or WebFrame identifiers. + +We simply need to validate the input in NetworkProcessProxy. + +* UIProcess/Network/NetworkProcessProxy.cpp: +(WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace): Validate both the page and frame ids before + passing the call along to the WebPageProxy. Also, if either of those validations fail, respond to the network process. + 2017-07-21 Andy Estes [iOS] Adopt UIImagePickerControllerImageURL for photo uploads Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (219753 => 219754) --- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2017-07-22 00:13:11 UTC (rev 219753) +++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2017-07-22 00:15:00 UTC (rev 219754) @@ -367,11 +367,20 @@ #if USE(PROTECTION_SPACE_AUTH_CALLBACK) void NetworkProcessProxy::canAuthenticateAgainstProtectionSpace(uint64_t loaderID, uint64_t pageID, uint64_t frameID, const WebCore::ProtectionSpace& protectionSpace) { -WebPageProxy* page = WebProcessProxy::webPage(pageID); -if (!page) -return; +// NetworkProcess state cannot asynchronously be kept in sync with these objects +// like we expect WebProcess <-> UIProcess state to be kept in sync. +// So there's no guarantee the messaged WebPageProxy or WebFrameProxy exist here in the UIProcess. +// We need to validate both the page and the frame up front. +if (auto* page = WebProcessProxy::webPage(pageID)) { +if (page->process().webFrame(frameID)) { +page->canAuthenticateAgainstProtectionSpace(loaderID, frameID, protectionSpace); +return; +} +} -page->canAuthenticateAgainstProtectionSpace(loaderID, frameID, protectionSpace); +// In the case where we will not be able to reply to this message with a client reply, +// we should message back a default to the Networking process. +send(Messages::NetworkProcess::ContinueCanAuthenticateAgainstProtectionSpace(loaderID, false), 0); } #endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [219713] trunk/Source/WebKit
Title: [219713] trunk/Source/WebKit Revision 219713 Author beid...@apple.com Date 2017-07-20 21:10:54 -0700 (Thu, 20 Jul 2017) Log Message Get rid of IconDatabase related code in WebKit. https://bugs.webkit.org/show_bug.cgi?id=174693 Reviewed by Tim Horton. This leaves the C-API class but guts it. No explanations of the other changes are needed. * CMakeLists.txt: * DerivedSources.make: * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/API/C/WKContext.cpp: (WKContextGetIconDatabase): (WKContextSetIconDatabasePath): * UIProcess/API/C/WKIconDatabase.cpp: (WKIconDatabaseSetIconDatabaseClient): (WKIconDatabaseRetainIconForURL): (WKIconDatabaseReleaseIconForURL): (WKIconDatabaseSetIconDataForIconURL): (WKIconDatabaseSetIconURLForPageURL): (WKIconDatabaseCopyIconURLForPageURL): (WKIconDatabaseCopyIconDataForPageURL): (WKIconDatabaseEnableDatabaseCleanup): (WKIconDatabaseRemoveAllIcons): (WKIconDatabaseCheckIntegrityBeforeOpening): (WKIconDatabaseClose): * UIProcess/API/C/cg/WKIconDatabaseCG.cpp: (WKIconDatabaseTryGetCGImageForURL): (WKIconDatabaseTryCopyCGImageArrayForURL): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted. * UIProcess/WebIconDatabase.cpp: Removed. * UIProcess/WebIconDatabase.h: (WebKit::WebIconDatabase::clearProcessPool): Deleted. * UIProcess/WebIconDatabase.messages.in: Removed. * UIProcess/WebIconDatabaseClient.cpp: Removed. * UIProcess/WebIconDatabaseClient.h: Removed. * UIProcess/WebProcessPool.cpp: (WebKit::m_hiddenPageThrottlingTimer): (WebKit::WebProcessPool::~WebProcessPool): (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled): (WebKit::WebProcessPool::createNewWebProcess): (WebKit::WebProcessPool::setIconDatabasePath): Deleted. (WebKit::WebProcessPool::iconDatabasePath): Deleted. * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::processWillShutDown): (WebKit::WebProcessProxy::retainIconForPageURL): Deleted. (WebKit::WebProcessProxy::releaseIconForPageURL): Deleted. (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs): Deleted. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/gtk/WebProcessPoolGtk.cpp: (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted. * UIProcess/wpe/WebProcessPoolWPE.cpp: (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted. * WebKit.xcodeproj/project.pbxproj: * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Removed. * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Removed. * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Removed. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::getWebCoreStatistics): * WebProcess/WebProcess.h: Modified Paths trunk/Source/WebKit/CMakeLists.txt trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/DerivedSources.make trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp trunk/Source/WebKit/Shared/WebProcessCreationParameters.h trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp trunk/Source/WebKit/UIProcess/API/C/WKIconDatabase.cpp trunk/Source/WebKit/UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp trunk/Source/WebKit/UIProcess/API/C/cg/WKIconDatabaseCG.cpp trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm trunk/Source/WebKit/UIProcess/WebIconDatabase.h trunk/Source/WebKit/UIProcess/WebProcessPool.cpp trunk/Source/WebKit/UIProcess/WebProcessPool.h trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp trunk/Source/WebKit/UIProcess/WebProcessProxy.h trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in trunk/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp trunk/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Source/WebKit/WebProcess/WebProcess.cpp trunk/Source/WebKit/WebProcess/WebProcess.h Removed Paths trunk/Source/WebKit/UIProcess/WebIconDatabase.cpp trunk/Source/WebKit/UIProcess/WebIconDatabase.messages.in trunk/Source/WebKit/UIProcess/WebIconDatabaseClient.cpp trunk/Source/WebKit/UIProcess/WebIconDatabaseClient.h trunk/Source/WebKit/WebProcess/IconDatabase/ Diff Modified: trunk/Source/WebKit/CMakeLists.txt (219712 => 219713) --- trunk/Source/WebKit/CMakeLists.txt 2017-07-21 02:36:52 UTC (rev 219712) +++ trunk/Source/WebKit/CMakeLists.txt 2017-07-21 04:10:54 UTC (rev 219713) @@ -311,8 +311,6 @@ UIProcess/WebGeolocationManagerProxy.cpp UIProcess/WebGeolocationProvider.cpp UIProcess/WebGrammarDetail.cpp -UIProcess/WebIconDatabase.cpp -UIProcess/WebIconDatabaseClient.cpp UIProcess/WebInspectorProxy.cpp UIProces
[webkit-changes] [219698] trunk/Tools
Title: [219698] trunk/Tools Revision 219698 Author beid...@apple.com Date 2017-07-20 13:34:29 -0700 (Thu, 20 Jul 2017) Log Message Test WebKit2CustomProtocolsTest.ProcessPoolDestroyedDuringLoading added in r219664 fails on El Capitan. https://bugs.webkit.org/show_bug.cgi?id=174685 Reviewed by Andy Estes. * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: (TestWebKitAPI::TEST): Use a scoped AutodrainedPool instead of a RetainPtr. Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm Diff Modified: trunk/Tools/ChangeLog (219697 => 219698) --- trunk/Tools/ChangeLog 2017-07-20 19:06:21 UTC (rev 219697) +++ trunk/Tools/ChangeLog 2017-07-20 20:34:29 UTC (rev 219698) @@ -1,5 +1,15 @@ 2017-07-20 Brady Eidson +Test WebKit2CustomProtocolsTest.ProcessPoolDestroyedDuringLoading added in r219664 fails on El Capitan. +https://bugs.webkit.org/show_bug.cgi?id=174685 + +Reviewed by Andy Estes. + +* TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: +(TestWebKitAPI::TEST): Use a scoped AutodrainedPool instead of a RetainPtr. + +2017-07-20 Brady Eidson + Deprecate WebIconDatabase in WebKitLegacy/mac. https://bugs.webkit.org/show_bug.cgi?id=174607 Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm (219697 => 219698) --- trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm 2017-07-20 19:06:21 UTC (rev 219697) +++ trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm 2017-07-20 20:34:29 UTC (rev 219698) @@ -34,6 +34,7 @@ #import "TestProtocol.h" #import #import +#import #import #if WK_API_ENABLED && PLATFORM(MAC) @@ -170,20 +171,22 @@ { [ProcessPoolDestroyedDuringLoadingProtocol registerWithScheme:@"custom"]; -auto autoreleasePool = adoptNS([[NSAutoreleasePool alloc] init]); -auto browsingContextGroup = adoptNS([[WKBrowsingContextGroup alloc] initWithIdentifier:@"TestIdentifier"]); -auto processGroup = adoptNS([[WKProcessGroup alloc] init]); -auto wkView = adoptNS([[WKView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) processGroup:processGroup.get() browsingContextGroup:browsingContextGroup.get()]); +{ +AutodrainedPool pool; +auto browsingContextGroup = adoptNS([[WKBrowsingContextGroup alloc] initWithIdentifier:@"TestIdentifier"]); +auto processGroup = adoptNS([[WKProcessGroup alloc] init]); +auto wkView = adoptNS([[WKView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) processGroup:processGroup.get() browsingContextGroup:browsingContextGroup.get()]); -[[wkView browsingContextController] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"custom:///test"]]]; +[[wkView browsingContextController] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"custom:///test"]]]; -Util::run(&isDone); -isDone = false; +Util::run(&isDone); +isDone = false; -processGroup = nil; -wkView = nil; -browsingContextGroup = nil; -autoreleasePool = nil; +// Instead of relying on the block going out of scope, manually release these objects in this order +processGroup = nil; +wkView = nil; +browsingContextGroup = nil; +} ASSERT(processPoolProtocolInstance); [processPoolProtocolInstance finishTheLoad]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [219695] trunk
Title: [219695] trunk Revision 219695 Author beid...@apple.com Date 2017-07-20 11:07:30 -0700 (Thu, 20 Jul 2017) Log Message Deprecate WebIconDatabase in WebKitLegacy/mac. https://bugs.webkit.org/show_bug.cgi?id=174607 Reviewed by Alex Christensen. Source/WebKitLegacy/mac: This patch: 1 - Formally deprecates WebIconDatabase (which was never API anyways) 2 - Guts the class to where it can only return the default icon at the small size 3 - Reworks other parts of WebKitLegacy that used it for anything to either use something else or to not do anything. This patch *could* go much farther. A future patch is what will remove WebCore/IconDatabase and that patch will remove all of the last remnants of WebIconDatabase. * History/WebHistoryItem.mm: (-[WebHistoryItem icon]): * Misc/WebIconDatabase.h: * Misc/WebIconDatabase.mm: (-[WebIconDatabase init]): (-[WebIconDatabase iconForURL:withSize:cache:]): (-[WebIconDatabase iconForURL:withSize:]): (-[WebIconDatabase defaultIconWithSize:]): (-[WebIconDatabase defaultIconForURL:withSize:]): (-[WebIconDatabase iconURLForURL:]): (-[WebIconDatabase retainIconForURL:]): (-[WebIconDatabase releaseIconForURL:]): (+[WebIconDatabase delayDatabaseCleanup]): (+[WebIconDatabase allowDatabaseCleanup]): (-[WebIconDatabase setDelegate:]): (-[WebIconDatabase delegate]): (+[WebIconDatabase initialize]): Deleted. (-[WebIconDatabase isEnabled]): Deleted. (-[WebIconDatabase setEnabled:]): Deleted. (-[WebIconDatabase removeAllIcons]): Deleted. (+[WebIconDatabase _checkIntegrityBeforeOpening]): Deleted. (-[WebIconDatabase _sendNotificationForURL:]): Deleted. (-[WebIconDatabase _sendDidRemoveAllIconsNotification]): Deleted. (-[WebIconDatabase _startUpIconDatabase]): Deleted. (-[WebIconDatabase _shutDownIconDatabase]): Deleted. (-[WebIconDatabase _applicationWillTerminate:]): Deleted. (-[WebIconDatabase _iconForFileURL:withSize:]): Deleted. (-[WebIconDatabase _resetCachedWebPreferences:]): Deleted. (-[WebIconDatabase _largestIconFromDictionary:]): Deleted. (-[WebIconDatabase _iconsBySplittingRepresentationsOfIcon:]): Deleted. (-[WebIconDatabase _iconFromDictionary:forSize:cache:]): Deleted. (-[WebIconDatabase _scaleIcon:toSize:]): Deleted. (-[WebIconDatabase _databaseDirectory]): Deleted. (webGetNSImage): Deleted. * Misc/WebIconDatabaseDelegate.h: Removed. * Misc/WebIconDatabaseInternal.h: Removed. * Misc/WebIconDatabasePrivate.h: Removed. * WebCoreSupport/WebFrameLoaderClient.mm: (webGetNSImage): * WebCoreSupport/WebIconDatabaseClient.mm: (WebIconDatabaseClient::didRemoveAllIcons): (WebIconDatabaseClient::didImportIconURLForPageURL): * WebView/WebView.mm: (-[WebView setFrameLoadDelegate:]): (-[WebView mainFrameIcon]): Tools: * DumpRenderTree/mac/TestRunnerMac.mm: Modified Paths trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj trunk/Source/WebKitLegacy/mac/ChangeLog trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebIconDatabaseClient.mm trunk/Source/WebKitLegacy/mac/WebView/WebView.mm trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm Removed Paths trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabaseDelegate.h trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabaseInternal.h trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabasePrivate.h Diff Modified: trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj (219694 => 219695) --- trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj 2017-07-20 17:45:46 UTC (rev 219694) +++ trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj 2017-07-20 18:07:30 UTC (rev 219695) @@ -137,7 +137,6 @@ 5185F62610712B80007AA393 /* WebNavigationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5185F62510712B80007AA393 /* WebNavigationData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5185F62710712B97007AA393 /* WebNavigationData.mm */; }; 51AEDEF10CECF45700854328 /* WebDatabaseManagerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51AEDEF00CECF45700854328 /* WebDatabaseManagerInternal.h */; }; - 51B2A1000ADB15D0002A9BEE /* WebIconDatabaseDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B2A0FF0ADB15D0002A9BEE /* WebIconDatabaseDelegate.h */; }; 51C714FB0B20F79F00E5E33C /* WebBackForwardListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C714FA0B20F79F00E5E33C /* WebBackForwardListInternal.h */; }; 51CBFCAD0D10E6C5002DBF51 /* WebCachedFramePlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51CBFCAC0D10E6C5002DBF51 /* WebCachedFramePlatformData.h */; }; 51FDC4D30B0AF5C100F84EB3 /* WebHistoryItemPrivate.h in Headers */ = {isa
[webkit-changes] [219684] trunk
Title: [219684] trunk Revision 219684 Author beid...@apple.com Date 2017-07-20 07:30:10 -0700 (Thu, 20 Jul 2017) Log Message Remove WebIconDatabase from WebKitLegacy/win. https://bugs.webkit.org/show_bug.cgi?id=174608 Reviewed by Alex Christensen. Source/WebKitLegacy/win: It is unused. * ForEachCoClass.h: * Interfaces/IWebIconDatabase.idl: Removed. * Interfaces/WebKit.idl: * WebCoreStatistics.cpp: (WebCoreStatistics::iconPageURLMappingCount): (WebCoreStatistics::iconRetainedPageURLCount): (WebCoreStatistics::iconRecordCount): (WebCoreStatistics::iconsWithDataCount): * WebIconDatabase.cpp: Removed. * WebIconDatabase.h: Removed. * WebKitClassFactory.cpp: * WebKitDLL.cpp: (shutDownWebKit): * WebKitLogging.h: * WebView.cpp: (WebView::close): (WebView::notifyDidAddIcon): (WebView::registerForIconNotification): (WebView::dispatchDidReceiveIconFromWebFrame): (WebView::onNotify): Tools: * DumpRenderTree/win/DumpRenderTree.cpp: (main): * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::setIconDatabaseEnabled): Modified Paths trunk/Source/WebKitLegacy/PlatformWin.cmake trunk/Source/WebKitLegacy/win/ChangeLog trunk/Source/WebKitLegacy/win/ForEachCoClass.h trunk/Source/WebKitLegacy/win/Interfaces/WebKit.idl trunk/Source/WebKitLegacy/win/WebCoreStatistics.cpp trunk/Source/WebKitLegacy/win/WebKitClassFactory.cpp trunk/Source/WebKitLegacy/win/WebKitDLL.cpp trunk/Source/WebKitLegacy/win/WebKitLogging.h trunk/Source/WebKitLegacy/win/WebView.cpp trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp Removed Paths trunk/Source/WebKitLegacy/win/Interfaces/IWebIconDatabase.idl trunk/Source/WebKitLegacy/win/WebIconDatabase.cpp trunk/Source/WebKitLegacy/win/WebIconDatabase.h Diff Modified: trunk/Source/WebKitLegacy/PlatformWin.cmake (219683 => 219684) --- trunk/Source/WebKitLegacy/PlatformWin.cmake 2017-07-20 14:28:18 UTC (rev 219683) +++ trunk/Source/WebKitLegacy/PlatformWin.cmake 2017-07-20 14:30:10 UTC (rev 219684) @@ -101,7 +101,6 @@ win/WebHTMLRepresentation.h win/WebHistory.h win/WebHistoryItem.h -win/WebIconDatabase.h win/WebJavaScriptCollector.h win/WebKitCOMAPI.h win/WebKitClassFactory.h @@ -173,7 +172,6 @@ win/WebHTMLRepresentation.cpp win/WebHistory.cpp win/WebHistoryItem.cpp -win/WebIconDatabase.cpp win/WebInspector.cpp win/WebJavaScriptCollector.cpp win/WebKitCOMAPI.cpp @@ -337,7 +335,6 @@ win/Interfaces/IWebHistoryItem.idl win/Interfaces/IWebHistoryItemPrivate.idl win/Interfaces/IWebHistoryPrivate.idl -win/Interfaces/IWebIconDatabase.idl win/Interfaces/IWebInspector.idl win/Interfaces/IWebInspectorPrivate.idl win/Interfaces/IWebJavaScriptCollector.idl Modified: trunk/Source/WebKitLegacy/win/ChangeLog (219683 => 219684) --- trunk/Source/WebKitLegacy/win/ChangeLog 2017-07-20 14:28:18 UTC (rev 219683) +++ trunk/Source/WebKitLegacy/win/ChangeLog 2017-07-20 14:30:10 UTC (rev 219684) @@ -1,3 +1,40 @@ +2017-07-20 Brady Eidson + +Remove WebIconDatabase from WebKitLegacy/win. +https://bugs.webkit.org/show_bug.cgi?id=174608 + +Reviewed by Alex Christensen. + +It is unused. + +* ForEachCoClass.h: + +* Interfaces/IWebIconDatabase.idl: Removed. + +* Interfaces/WebKit.idl: + +* WebCoreStatistics.cpp: +(WebCoreStatistics::iconPageURLMappingCount): +(WebCoreStatistics::iconRetainedPageURLCount): +(WebCoreStatistics::iconRecordCount): +(WebCoreStatistics::iconsWithDataCount): + +* WebIconDatabase.cpp: Removed. +* WebIconDatabase.h: Removed. +* WebKitClassFactory.cpp: + +* WebKitDLL.cpp: +(shutDownWebKit): + +* WebKitLogging.h: + +* WebView.cpp: +(WebView::close): +(WebView::notifyDidAddIcon): +(WebView::registerForIconNotification): +(WebView::dispatchDidReceiveIconFromWebFrame): +(WebView::onNotify): + 2017-07-18 Matt Lewis Unreviewed, rolling out r219610. Modified: trunk/Source/WebKitLegacy/win/ForEachCoClass.h (219683 => 219684) --- trunk/Source/WebKitLegacy/win/ForEachCoClass.h 2017-07-20 14:28:18 UTC (rev 219683) +++ trunk/Source/WebKitLegacy/win/ForEachCoClass.h 2017-07-20 14:30:10 UTC (rev 219684) @@ -42,7 +42,6 @@ macro(WebError) \ macro(WebHistory) \ macro(WebHistoryItem) \ -macro(WebIconDatabase) \ macro(WebJavaScriptCollector) \ macro(WebKitStatistics) \ macro(WebMutableURLRequest) \ Deleted: trunk/Source/WebKitLegacy/win/Interfaces/IWebIconDatabase.idl (219683 => 219684) --- trunk/Source/WebKitLegacy/win/Interfaces/IWebIconDatabase.idl 2017-07-20 14:28:18 UTC (rev 219683) +++ trunk/Source/WebKitLegacy/win/Interfaces/IWebIconDatabase.idl 2017-07-20 14:30:10 UTC (rev 219684) @@ -1,174 +0,0 @@ -/* - * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserve
[webkit-changes] [219683] trunk/Source/WebCore
Title: [219683] trunk/Source/WebCore Revision 219683 Author beid...@apple.com Date 2017-07-20 07:28:18 -0700 (Thu, 20 Jul 2017) Log Message WKHTTPCookieStore API tests fail on High Sierra. and https://bugs.webkit.org/show_bug.cgi?id=174666 Reviewed by Andy Estes. Covered by existing API tests. In r219567 I'd moved cookie storage observation off of NSHTTPCookieStorage and NSNotificationCenter to CFHTTPCookieStorage observation callbacks. This is because notifications were only sent for the default [NSHTTPCookieStorage sharedHTTPCookieStorage] and not any of the other ones we keep in flight. Unfortunately that SPI has been disabled in High Sierra. Fortunately we found a way we can get non-shared NSHTTPCookieStorages to send notifications that works everywhere. * platform/network/cocoa/CookieStorageObserver.h: * platform/network/cocoa/CookieStorageObserver.mm: (-[WebCookieObserverAdapter initWithObserver:]): (-[WebCookieObserverAdapter cookiesChangedNotificationHandler:]): (WebCore::CookieStorageObserver::create): (WebCore::CookieStorageObserver::CookieStorageObserver): (WebCore::CookieStorageObserver::~CookieStorageObserver): (WebCore::CookieStorageObserver::startObserving): Use a trick to call some SPI on non-shared NSHTTPCookieStorages to get them to send notifications. (WebCore::CookieStorageObserver::stopObserving): (WebCore::cookiesChanged): Deleted. * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookieStorageObserver): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.h trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.mm trunk/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm Diff Modified: trunk/Source/WebCore/ChangeLog (219682 => 219683) --- trunk/Source/WebCore/ChangeLog 2017-07-20 14:25:34 UTC (rev 219682) +++ trunk/Source/WebCore/ChangeLog 2017-07-20 14:28:18 UTC (rev 219683) @@ -1,3 +1,36 @@ +2017-07-20 Brady Eidson + +WKHTTPCookieStore API tests fail on High Sierra. + and https://bugs.webkit.org/show_bug.cgi?id=174666 + +Reviewed by Andy Estes. + +Covered by existing API tests. + +In r219567 I'd moved cookie storage observation off of NSHTTPCookieStorage and NSNotificationCenter +to CFHTTPCookieStorage observation callbacks. + +This is because notifications were only sent for the default [NSHTTPCookieStorage sharedHTTPCookieStorage] +and not any of the other ones we keep in flight. + +Unfortunately that SPI has been disabled in High Sierra. +Fortunately we found a way we can get non-shared NSHTTPCookieStorages to send notifications that works everywhere. + +* platform/network/cocoa/CookieStorageObserver.h: +* platform/network/cocoa/CookieStorageObserver.mm: +(-[WebCookieObserverAdapter initWithObserver:]): +(-[WebCookieObserverAdapter cookiesChangedNotificationHandler:]): +(WebCore::CookieStorageObserver::create): +(WebCore::CookieStorageObserver::CookieStorageObserver): +(WebCore::CookieStorageObserver::~CookieStorageObserver): +(WebCore::CookieStorageObserver::startObserving): Use a trick to call some SPI on non-shared NSHTTPCookieStorages + to get them to send notifications. +(WebCore::CookieStorageObserver::stopObserving): +(WebCore::cookiesChanged): Deleted. + +* platform/network/cocoa/NetworkStorageSessionCocoa.mm: +(WebCore::NetworkStorageSession::cookieStorageObserver): + 2017-07-20 Miguel Gomez [GStreamer] Some layout tests issue "g_mutex_clear() called on uninitialised or locked mutex" and flaky crash in ~MediaPlayerPrivateGStreamerBase Modified: trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.h (219682 => 219683) --- trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.h 2017-07-20 14:25:34 UTC (rev 219682) +++ trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.h 2017-07-20 14:28:18 UTC (rev 219683) @@ -30,12 +30,15 @@ #include #include +OBJC_CLASS NSHTTPCookieStorage; +OBJC_CLASS WebCookieObserverAdapter; + namespace WebCore { class CookieStorageObserver : public ThreadSafeRefCounted { public: -static RefPtr create(CFHTTPCookieStorageRef); -CookieStorageObserver(CFHTTPCookieStorageRef); +static RefPtr create(NSHTTPCookieStorage *); +CookieStorageObserver(NSHTTPCookieStorage *); ~CookieStorageObserver(); void startObserving(WTF::Function&& callback); @@ -44,7 +47,9 @@ void cookiesDidChange(); private: -RetainPtr m_cookieStorage; +RetainPtr m_cookieStorage; +bool m_hasRegisteredInternalsForNotifications { false }; +RetainPtr m_observerAdapter; WTF::Function m_cookieChangeCallback; }; Modified: trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.mm (219682 => 219683)
[webkit-changes] [219664] trunk
Title: [219664] trunk Revision 219664 Author beid...@apple.com Date 2017-07-19 13:42:21 -0700 (Wed, 19 Jul 2017) Log Message iBooks sometimes crashes when closing a book. and https://bugs.webkit.org/show_bug.cgi?id=174658 Reviewed by Oliver Hunt. Source/WebKit: - LegacyCustomProtocolManagerProxy should not reference a WebProcessPool directly. - LegacyCustomProtocolManagerProxy should invalidate in its destructor. * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp: (WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy): (WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy): (WebKit::LegacyCustomProtocolManagerProxy::startLoading): (WebKit::LegacyCustomProtocolManagerProxy::stopLoading): (WebKit::LegacyCustomProtocolManagerProxy::invalidate): (WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest): (WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse): (WebKit::LegacyCustomProtocolManagerProxy::didLoadData): (WebKit::LegacyCustomProtocolManagerProxy::didFailWithError): (WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading): (WebKit::LegacyCustomProtocolManagerProxy::processDidClose): Deleted. * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::didClose): * UIProcess/Network/NetworkProcessProxy.h: (WebKit::NetworkProcessProxy::processPool): Tools: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: (-[ProcessPoolDestroyedDuringLoadingProtocol startLoading]): (-[ProcessPoolDestroyedDuringLoadingProtocol finishTheLoad]): (-[ProcessPoolDestroyedDuringLoadingProtocol stopLoading]): (TestWebKitAPI::TEST): Add a "spin the runloop X number of times" utility: * TestWebKitAPI/Utilities.h: * TestWebKitAPI/cocoa/UtilitiesCocoa.mm: (TestWebKitAPI::Util::spinRunLoop): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm trunk/Source/WebKit/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp trunk/Source/WebKit/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm trunk/Tools/TestWebKitAPI/Utilities.h trunk/Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm Diff Modified: trunk/Source/WebKit/ChangeLog (219663 => 219664) --- trunk/Source/WebKit/ChangeLog 2017-07-19 20:24:15 UTC (rev 219663) +++ trunk/Source/WebKit/ChangeLog 2017-07-19 20:42:21 UTC (rev 219664) @@ -1,3 +1,33 @@ +2017-07-19 Brady Eidson + +iBooks sometimes crashes when closing a book. + and https://bugs.webkit.org/show_bug.cgi?id=174658 + +Reviewed by Oliver Hunt. + +- LegacyCustomProtocolManagerProxy should not reference a WebProcessPool directly. +- LegacyCustomProtocolManagerProxy should invalidate in its destructor. + +* UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp: +(WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy): +(WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy): +(WebKit::LegacyCustomProtocolManagerProxy::startLoading): +(WebKit::LegacyCustomProtocolManagerProxy::stopLoading): +(WebKit::LegacyCustomProtocolManagerProxy::invalidate): +(WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest): +(WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse): +(WebKit::LegacyCustomProtocolManagerProxy::didLoadData): +(WebKit::LegacyCustomProtocolManagerProxy::didFailWithError): +(WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading): +(WebKit::LegacyCustomProtocolManagerProxy::processDidClose): Deleted. +* UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: + +* UIProcess/Network/NetworkProcessProxy.cpp: +(WebKit::NetworkProcessProxy::NetworkProcessProxy): +(WebKit::NetworkProcessProxy::didClose): +* UIProcess/Network/NetworkProcessProxy.h: +(WebKit::NetworkProcessProxy::processPool): + 2017-07-19 Yusuke Suzuki [WTF] Implement WTF::ThreadGroup Modified: trunk/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm (219663 => 219664) --- trunk/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm 2017-07-19 20:24:15 UTC (rev 219663) +++ trunk/Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm 2017-07-19 20:42:21 UTC (rev 219664) @@ -148,8 +148,11 @@ void LegacyCustomProtocolManagerClient::invalidate(LegacyCustomProtocolManagerProxy&) { -for (auto& loader : m_loaderMap) -[loader.value customProtocolManagerProxyDestroyed];
[webkit-changes] [219591] trunk/Source/WebCore
Title: [219591] trunk/Source/WebCore Revision 219591 Author beid...@apple.com Date 2017-07-17 17:25:09 -0700 (Mon, 17 Jul 2017) Log Message REGRESSION(r219298): imported/w3c/IndexedDB-private-browsing/idbfactory_open.html is crashing occassionaly (UniqueIDBDatabase being taken from the IDBServer set twice). and https://bugs.webkit.org/show_bug.cgi?id=174354 Reviewed by Alex Christensen. No new tests (Covered by existing tests). * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::postDatabaseTaskReply): Remove a now invalid ASSERT * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose): Add a RELEASE_ASSERT. (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Instead of an ad-hoc main thread dispatch, use the "schedule task reply" system to keep dispatch ordering in tact. (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply): Remove a now invalid ASSERT (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): Only take the owning pointer if the object doesn't already own itself. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h Diff Modified: trunk/Source/WebCore/ChangeLog (219590 => 219591) --- trunk/Source/WebCore/ChangeLog 2017-07-18 00:15:42 UTC (rev 219590) +++ trunk/Source/WebCore/ChangeLog 2017-07-18 00:25:09 UTC (rev 219591) @@ -1,3 +1,22 @@ +2017-07-17 Brady Eidson + +REGRESSION(r219298): imported/w3c/IndexedDB-private-browsing/idbfactory_open.html is crashing occassionaly (UniqueIDBDatabase being taken from the IDBServer set twice). + and https://bugs.webkit.org/show_bug.cgi?id=174354 + +Reviewed by Alex Christensen. + +No new tests (Covered by existing tests). + +* Modules/indexeddb/server/IDBServer.cpp: +(WebCore::IDBServer::IDBServer::postDatabaseTaskReply): Remove a now invalid ASSERT + +* Modules/indexeddb/server/UniqueIDBDatabase.cpp: +(WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose): Add a RELEASE_ASSERT. +(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Instead of an ad-hoc main thread dispatch, use the "schedule task reply" system + to keep dispatch ordering in tact. +(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply): Remove a now invalid ASSERT +(WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): Only take the owning pointer if the object doesn't already own itself. + 2017-07-17 Wenson Hsieh [iOS DnD] Web process uses too much memory when beginning a drag on a very large image Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (219590 => 219591) --- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp 2017-07-18 00:15:42 UTC (rev 219590) +++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp 2017-07-18 00:25:09 UTC (rev 219591) @@ -493,10 +493,8 @@ void IDBServer::postDatabaseTaskReply(CrossThreadTask&& task) { -ASSERT(!isMainThread()); m_databaseReplyQueue.append(WTFMove(task)); - Locker locker(m_mainThreadReplyLock); if (m_mainThreadReplyScheduled) return; Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (219590 => 219591) --- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2017-07-18 00:15:42 UTC (rev 219590) +++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2017-07-18 00:25:09 UTC (rev 219591) @@ -274,7 +274,9 @@ { ASSERT(isMainThread()); +RELEASE_ASSERT(!m_owningPointerForClose); m_owningPointerForClose = m_server.closeAndTakeUniqueIDBDatabase(*this); + postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::shutdownForClose)); } @@ -337,8 +339,12 @@ ASSERT(m_databaseQueue.isEmpty()); ASSERT(m_databaseReplyQueue.isEmpty()); m_databaseQueue.kill(); -m_databaseReplyQueue.kill(); -callOnMainThread([owningRef = m_server.closeAndTakeUniqueIDBDatabase(*this)]{ }); + +RELEASE_ASSERT(!m_owningPointerForClose); +m_owningPointerForClose = m_server.closeAndTakeUniqueIDBDatabase(*this); +ASSERT(m_owningPointerForClose); + +postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didShutdownForClose)); return; } @@ -1742,8 +1748,6 @@ void UniqueIDBDatabase::postDatabaseTaskReply(CrossThreadTask&& task) { -ASSERT(!isMainThread()); - m_databaseReplyQueue.append(WTFMove(task)); m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::executeNextDatabaseTaskReply)); } @@ -1777,6 +1781,10 @@ void UniqueIDBDatabase::maybeFinishHardClose() { if (m_owningPointerForClo
[webkit-changes] [219567] trunk
Title: [219567] trunk Revision 219567 Author beid...@apple.com Date 2017-07-17 12:10:06 -0700 (Mon, 17 Jul 2017) Log Message WKHTTPCookieStore observing only works on the default cookie store. and https://bugs.webkit.org/show_bug.cgi?id=174580 Reviewed by Sam Weinig. Source/WebCore: Covered by new API tests. startObservingCookieChanges and stopObservingCookieChanges are passed a NetworkStorageSession to observe. On Mac/iOS, the passed-in storage session was ignored and the shared cookie storage was assumed. Let's fix that. Also, since using NSNotification based observing only works reliably for the shared cookie storage, switch to direct CFHTTPCookieStorageRef observing. * WebCore.xcodeproj/project.pbxproj: * platform/network/NetworkStorageSession.h: * platform/network/cocoa/CookieStorageObserver.h: Added. * platform/network/cocoa/CookieStorageObserver.mm: Added. (WebCore::cookiesChanged): (WebCore::CookieStorageObserver::create): (WebCore::CookieStorageObserver::CookieStorageObserver): (WebCore::CookieStorageObserver::~CookieStorageObserver): (WebCore::CookieStorageObserver::startObserving): (WebCore::CookieStorageObserver::stopObserving): (WebCore::CookieStorageObserver::cookiesDidChange): * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookieStorageObserver): * platform/network/mac/CookieStorageMac.mm: (WebCore::startObservingCookieChanges): (WebCore::stopObservingCookieChanges): (-[WebCookieStorageObjCAdapter notifyCookiesChangedOnMainThread]): Deleted. (-[WebCookieStorageObjCAdapter cookiesChangedNotificationHandler:]): Deleted. (-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]): Deleted. (-[WebCookieStorageObjCAdapter stopListeningForCookieChangeNotifications]): Deleted. * platform/spi/cf/CFNetworkSPI.h: Tools: * TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm: (runTestWithWebsiteDataStore): Refactor the cookie observing test out so it can be called for the default store, a non-persistent store, and a custom store. (TEST): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/platform/network/NetworkStorageSession.h trunk/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm trunk/Source/WebCore/platform/network/mac/CookieStorageMac.mm trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm Added Paths trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.h trunk/Source/WebCore/platform/network/cocoa/CookieStorageObserver.mm Diff Modified: trunk/Source/WebCore/ChangeLog (219566 => 219567) --- trunk/Source/WebCore/ChangeLog 2017-07-17 18:30:05 UTC (rev 219566) +++ trunk/Source/WebCore/ChangeLog 2017-07-17 19:10:06 UTC (rev 219567) @@ -1,3 +1,46 @@ +2017-07-17 Brady Eidson + +WKHTTPCookieStore observing only works on the default cookie store. + and https://bugs.webkit.org/show_bug.cgi?id=174580 + +Reviewed by Sam Weinig. + +Covered by new API tests. + +startObservingCookieChanges and stopObservingCookieChanges are passed a NetworkStorageSession to observe. +On Mac/iOS, the passed-in storage session was ignored and the shared cookie storage was assumed. +Let's fix that. + +Also, since using NSNotification based observing only works reliably for the shared cookie storage, +switch to direct CFHTTPCookieStorageRef observing. + +* WebCore.xcodeproj/project.pbxproj: + +* platform/network/NetworkStorageSession.h: + +* platform/network/cocoa/CookieStorageObserver.h: Added. +* platform/network/cocoa/CookieStorageObserver.mm: Added. +(WebCore::cookiesChanged): +(WebCore::CookieStorageObserver::create): +(WebCore::CookieStorageObserver::CookieStorageObserver): +(WebCore::CookieStorageObserver::~CookieStorageObserver): +(WebCore::CookieStorageObserver::startObserving): +(WebCore::CookieStorageObserver::stopObserving): +(WebCore::CookieStorageObserver::cookiesDidChange): + +* platform/network/cocoa/NetworkStorageSessionCocoa.mm: +(WebCore::NetworkStorageSession::cookieStorageObserver): + +* platform/network/mac/CookieStorageMac.mm: +(WebCore::startObservingCookieChanges): +(WebCore::stopObservingCookieChanges): +(-[WebCookieStorageObjCAdapter notifyCookiesChangedOnMainThread]): Deleted. +(-[WebCookieStorageObjCAdapter cookiesChangedNotificationHandler:]): Deleted. +(-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]): Deleted. +(-[WebCookieStorageObjCAdapter stopListeningForCookieChangeNotifications]): Deleted. + +* platform/spi/cf/CFNetworkSPI.h: + 2017-07-17 Sam Weinig [WebID
[webkit-changes] [219550] trunk
Title: [219550] trunk Revision 219550 Author beid...@apple.com Date 2017-07-16 18:43:14 -0700 (Sun, 16 Jul 2017) Log Message Crash when a WKHTTPCookieStore outlives its owning WKWebsiteDataStore. and https://bugs.webkit.org/show_bug.cgi?id=174574 Reviewed by Tim Horton. Source/WebKit: Instead of holding a weak reference to its owning API::WebsiteDataStore, API::HTTPCookieStore can hold a strong reference to the owner's implementation WebKit::WebsiteDataStore. * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::HTTPCookieStore): (API::HTTPCookieStore::cookies): (API::HTTPCookieStore::setCookie): (API::HTTPCookieStore::deleteCookie): (API::HTTPCookieStore::registerObserver): (API::HTTPCookieStore::unregisterObserver): (API::HTTPCookieStore::cookieManagerDestroyed): (API::HTTPCookieStore::registerForNewProcessPoolNotifications): * UIProcess/API/APIHTTPCookieStore.h: Tools: * TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm: (-[CookieNavigationDelegate webView:didFinishNavigation:]): (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm Diff Modified: trunk/Source/WebKit/ChangeLog (219549 => 219550) --- trunk/Source/WebKit/ChangeLog 2017-07-16 22:23:52 UTC (rev 219549) +++ trunk/Source/WebKit/ChangeLog 2017-07-17 01:43:14 UTC (rev 219550) @@ -1,3 +1,25 @@ +2017-07-16 Brady Eidson + +Crash when a WKHTTPCookieStore outlives its owning WKWebsiteDataStore. + and https://bugs.webkit.org/show_bug.cgi?id=174574 + +Reviewed by Tim Horton. + +Instead of holding a weak reference to its owning API::WebsiteDataStore, +API::HTTPCookieStore can hold a strong reference to the owner's implementation +WebKit::WebsiteDataStore. + +* UIProcess/API/APIHTTPCookieStore.cpp: +(API::HTTPCookieStore::HTTPCookieStore): +(API::HTTPCookieStore::cookies): +(API::HTTPCookieStore::setCookie): +(API::HTTPCookieStore::deleteCookie): +(API::HTTPCookieStore::registerObserver): +(API::HTTPCookieStore::unregisterObserver): +(API::HTTPCookieStore::cookieManagerDestroyed): +(API::HTTPCookieStore::registerForNewProcessPoolNotifications): +* UIProcess/API/APIHTTPCookieStore.h: + 2017-07-15 Brady Eidson Make sure all CFHTTPCookieStorageRefs we create are scheduled. Modified: trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp (219549 => 219550) --- trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2017-07-16 22:23:52 UTC (rev 219549) +++ trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2017-07-17 01:43:14 UTC (rev 219550) @@ -38,7 +38,7 @@ namespace API { HTTPCookieStore::HTTPCookieStore(WebsiteDataStore& websiteDataStore) -: m_owningDataStore(websiteDataStore) +: m_owningDataStore(websiteDataStore.websiteDataStore()) { } @@ -54,10 +54,9 @@ void HTTPCookieStore::cookies(Function&)>&& completionHandler) { -auto& dataStore = m_owningDataStore.websiteDataStore(); -auto* pool = dataStore.processPoolForCookieStorageOperations(); +auto* pool = m_owningDataStore->processPoolForCookieStorageOperations(); if (!pool) { -callOnMainThread([completionHandler = WTFMove(completionHandler), allCookies = dataStore.pendingCookies()]() { +callOnMainThread([completionHandler = WTFMove(completionHandler), allCookies = m_owningDataStore->pendingCookies()]() { completionHandler(allCookies); }); return; @@ -64,7 +63,7 @@ } auto* cookieManager = pool->supplement(); -cookieManager->getAllCookies(dataStore.sessionID(), [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](const Vector& cookies, CallbackBase::Error error) { +cookieManager->getAllCookies(m_owningDataStore->sessionID(), [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](const Vector& cookies, CallbackBase::Error error) { completionHandler(cookies); }); } @@ -71,10 +70,9 @@ void HTTPCookieStore::setCookie(const WebCore::Cookie& cookie, Function&& completionHandler) { -auto& dataStore = m_owningDataStore.websiteDataStore(); -auto* pool = dataStore.processPoolForCookieStorageOperations(); +auto* pool = m_owningDataStore->processPoolForCookieStorageOperations(); if (!pool) { -dataStore.addPendingCookie(cookie); +m_owningDataStore->addPendingCookie(cookie); callOnMainThread([completionHandler = WTFMove(completionHandler)]() { completionHandler(); }); @@ -82,7 +80,7 @@ } auto* cookieManager = pool->supplement(); -cookieManager->setCookie(dataStore.sessionID(), cookie, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) { +cook
[webkit-changes] [219545] trunk
Title: [219545] trunk Revision 219545 Author beid...@apple.com Date 2017-07-15 23:57:48 -0700 (Sat, 15 Jul 2017) Log Message Make sure all CFHTTPCookieStorageRefs we create are scheduled. and https://bugs.webkit.org/show_bug.cgi?id=174513 Reviewed by Tim Horton. Source/WebCore: * platform/spi/cf/CFNetworkSPI.h: Source/WebKit: Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled. We need to schedule it on the appropriate RunLoop. This patch also cleans up the creation of the identifying data itself. * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): * Shared/cf/CookieStorageUtilsCF.h: Added. * Shared/cf/CookieStorageUtilsCF.mm: Added. (WebKit::cookieStorageFromIdentifyingData): (WebKit::identifyingDataFromCookieStorage): * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setSharedHTTPCookieStorage): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Tools: * TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm: (TEST): Make this test more reliable by clearing everything beforehand. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm Added Paths trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.h trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.mm Diff Modified: trunk/Source/WebCore/ChangeLog (219544 => 219545) --- trunk/Source/WebCore/ChangeLog 2017-07-16 06:08:41 UTC (rev 219544) +++ trunk/Source/WebCore/ChangeLog 2017-07-16 06:57:48 UTC (rev 219545) @@ -1,3 +1,12 @@ +2017-07-15 Brady Eidson + +Make sure all CFHTTPCookieStorageRefs we create are scheduled. + and https://bugs.webkit.org/show_bug.cgi?id=174513 + +Reviewed by Tim Horton. + +* platform/spi/cf/CFNetworkSPI.h: + 2017-07-15 Myles C. Maxfield Rename RenderStyle::fontSize() to RenderStyle::computedFontPixelSize() Modified: trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h (219544 => 219545) --- trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h 2017-07-16 06:08:41 UTC (rev 219544) +++ trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h 2017-07-16 06:57:48 UTC (rev 219545) @@ -195,10 +195,11 @@ CFHTTPCookieStorageRef _CFHTTPCookieStorageGetDefault(CFAllocatorRef); CFHTTPCookieStorageRef CFHTTPCookieStorageCreateFromFile(CFAllocatorRef, CFURLRef, CFHTTPCookieStorageRef); - +void CFHTTPCookieStorageScheduleWithRunLoop(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef); void CFHTTPCookieStorageSetCookie(CFHTTPCookieStorageRef, CFHTTPCookieRef); void CFHTTPCookieStorageSetCookieAcceptPolicy(CFHTTPCookieStorageRef, CFHTTPCookieStorageAcceptPolicy); CFHTTPCookieStorageAcceptPolicy CFHTTPCookieStorageGetCookieAcceptPolicy(CFHTTPCookieStorageRef); + void _CFNetworkSetOverrideSystemProxySettings(CFDictionaryRef); CFURLCredentialStorageRef CFURLCredentialStorageCreate(CFAllocatorRef); CFURLCredentialRef CFURLCredentialStorageCopyDefaultCredentialForProtectionSpace(CFURLCredentialStorageRef, CFURLProtectionSpaceRef); Modified: trunk/Source/WebKit/ChangeLog (219544 => 219545) --- trunk/Source/WebKit/ChangeLog 2017-07-16 06:08:41 UTC (rev 219544) +++ trunk/Source/WebKit/ChangeLog 2017-07-16 06:57:48 UTC (rev 219545) @@ -1,3 +1,38 @@ +2017-07-15 Brady Eidson + +Make sure all CFHTTPCookieStorageRefs we create are scheduled. + and https://bugs.webkit.org/show_bug.cgi?id=174513 + +Reviewed by Tim Horton. + +Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled. +We need to schedule it on the appropriate RunLoop. + +This patch also cleans up the creation of the identifying data itself. + +* NetworkProcess/mac/RemoteNetworkingContext.mm: +(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): + +* Shared/cf/CookieStorageUtilsCF.h: Added. +* Shared/cf/CookieStorageUtilsCF.mm: Added. +(WebKit::cookieStorageFromIdentifyingData): +(WebKit::identifyingDataFromCookieStorage): + +* Shared/mac/ChildProcessMac.mm: +
[webkit-changes] [219516] trunk/Source
Title: [219516] trunk/Source Revision 219516 Author beid...@apple.com Date 2017-07-14 12:16:40 -0700 (Fri, 14 Jul 2017) Log Message Make sure all CFHTTPCookieStorageRefs we create are scheduled. and https://bugs.webkit.org/show_bug.cgi?id=174513 Reviewed by Tim Horton. Source/WebCore: * platform/spi/cf/CFNetworkSPI.h: Source/WebKit: Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled. We need to schedule it on a RunLoop. This patch also cleans up the creation of the identifying data itself. * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): * Shared/cf/CookieStorageUtilsCF.cpp: Added. (WebKit::cookieStorageFromIdentifyingData): (WebKit::identifyingDataFromCookieStorage): * Shared/cf/CookieStorageUtilsCF.h: Added. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setSharedHTTPCookieStorage): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm Added Paths trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.cpp trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.h Diff Modified: trunk/Source/WebCore/ChangeLog (219515 => 219516) --- trunk/Source/WebCore/ChangeLog 2017-07-14 19:02:55 UTC (rev 219515) +++ trunk/Source/WebCore/ChangeLog 2017-07-14 19:16:40 UTC (rev 219516) @@ -1,3 +1,12 @@ +2017-07-14 Brady Eidson + +Make sure all CFHTTPCookieStorageRefs we create are scheduled. + and https://bugs.webkit.org/show_bug.cgi?id=174513 + +Reviewed by Tim Horton. + +* platform/spi/cf/CFNetworkSPI.h: + 2017-07-14 Youenn Fablet Remove CoreAudioCaptureSource speaker configuration Modified: trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h (219515 => 219516) --- trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h 2017-07-14 19:02:55 UTC (rev 219515) +++ trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h 2017-07-14 19:16:40 UTC (rev 219516) @@ -195,10 +195,11 @@ CFHTTPCookieStorageRef _CFHTTPCookieStorageGetDefault(CFAllocatorRef); CFHTTPCookieStorageRef CFHTTPCookieStorageCreateFromFile(CFAllocatorRef, CFURLRef, CFHTTPCookieStorageRef); - +void CFHTTPCookieStorageScheduleWithRunLoop(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef); void CFHTTPCookieStorageSetCookie(CFHTTPCookieStorageRef, CFHTTPCookieRef); void CFHTTPCookieStorageSetCookieAcceptPolicy(CFHTTPCookieStorageRef, CFHTTPCookieStorageAcceptPolicy); CFHTTPCookieStorageAcceptPolicy CFHTTPCookieStorageGetCookieAcceptPolicy(CFHTTPCookieStorageRef); + void _CFNetworkSetOverrideSystemProxySettings(CFDictionaryRef); CFURLCredentialStorageRef CFURLCredentialStorageCreate(CFAllocatorRef); CFURLCredentialRef CFURLCredentialStorageCopyDefaultCredentialForProtectionSpace(CFURLCredentialStorageRef, CFURLProtectionSpaceRef); Modified: trunk/Source/WebKit/ChangeLog (219515 => 219516) --- trunk/Source/WebKit/ChangeLog 2017-07-14 19:02:55 UTC (rev 219515) +++ trunk/Source/WebKit/ChangeLog 2017-07-14 19:16:40 UTC (rev 219516) @@ -1,3 +1,38 @@ +2017-07-14 Brady Eidson + +Make sure all CFHTTPCookieStorageRefs we create are scheduled. + and https://bugs.webkit.org/show_bug.cgi?id=174513 + +Reviewed by Tim Horton. + +Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled. +We need to schedule it on a RunLoop. + +This patch also cleans up the creation of the identifying data itself. + +* NetworkProcess/mac/RemoteNetworkingContext.mm: +(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): + +* Shared/cf/CookieStorageUtilsCF.cpp: Added. +(WebKit::cookieStorageFromIdentifyingData): +(WebKit::identifyingDataFromCookieStorage): +* Shared/cf/CookieStorageUtilsCF.h: Added. + +* Shared/mac/ChildProcessMac.mm: +(WebKit::ChildProcess::setSharedHTTPCookieStorage): + +* UIProcess/Cocoa/WebProcessPoolCocoa.mm: +(WebKit::WebProcessPool::platformInitializeWebProcess): +(WebKit::WebProcessPool::platformInitializeNetworkProcess): +
[webkit-changes] [219298] trunk/Source
Title: [219298] trunk/Source Revision 219298 Author beid...@apple.com Date 2017-07-10 10:43:38 -0700 (Mon, 10 Jul 2017) Log Message Cleanup lifetime issues of UniqueIDBDatabase and IDBBackingStore. and https://bugs.webkit.org/show_bug.cgi?id=174244 Reviewed by David Kilzer and Alex Christensen. Source/WebCore: No targeted test possible, implicitly covered by all IDB tests. The original idea behind UniqueIDBDatabase lifetime was that they are ThreadSafeRefCounted and we take protector Refs when any operation that needs it alive is in flight. This added variability to their lifetime which made it difficult to enforce a few different design invariants, namely: - UniqueIBDDatabase objects are always created and destroyed only on the main thread. - IDBBackingStore objects are always created and destroyed only on the database thread. This patch removes the ref counting and instead ties UniqueIDBDatabase lifetime to a std::unique_ptr that is owned by the IDBServer. Whenever any operations on the UniqueIDBDatabase are in flight it is kept alive by virtue of that unique_ptr in the IDBServer. Once a UniqueIDBDatabase is completely done with all of its work, the following happens: - On the main thread the IDBServer removes the unique_ptr owning the UniqueIDBDatabase from its map. - It hands the unique_ptr to the UniqueIDBDatabase itself, which schedules one final database thread task. - That database thread task is to destroy the IDBBackingStore, kill its message queues, and then message back to the main thread for one final task. - That main thread task is to release the unique_ptr, resulting in destruction of the UniqueIDBDatabase object. This is safe, predictable, solves the lifetime issues that r218516 originally tried to solve, and solves the lifetime issues that r218516 introduced. (This patch also adds many more assertions to cover various design invariants throughout the lifecycle of a particular UniqueIDBDatabase) ASSERT that IDBBackingStores are only ever created and destroyed on the background thread: * Modules/indexeddb/server/IDBBackingStore.h: (WebCore::IDBServer::IDBBackingStore::~IDBBackingStore): (WebCore::IDBServer::IDBBackingStore::IDBBackingStore): Transition UniqueIDBDatabase ownership from a RefPtr to a std::unique_ptr: * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase): (WebCore::IDBServer::IDBServer::closeAndTakeUniqueIDBDatabase): (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince): (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins): (WebCore::IDBServer::IDBServer::closeUniqueIDBDatabase): Deleted. * Modules/indexeddb/server/IDBServer.h: Make all the other changes mentioned above: * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase): Bulk up on ASSERTs (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): (WebCore::IDBServer::UniqueIDBDatabase::performUnconditionalDeleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose): (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose): (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose): (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation): (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor): (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor): (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired): (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted): (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask): (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply): (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask): (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply): (WebCore::IDBServer::UniqueIDBDatabase::maybeFinishHardClose): (WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose): (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): (WebCore::IDBServer::UniqueIDBDatabase::didPerformUnconditionalDeleteBackingStore): Deleted. * Modules/indexeddb/server/UniqueIDBDatabase.h: (WebCore::IDBServer::UniqueIDBDatabase::create): Deleted. Source/WTF: Add proper "kill" support to CrossThreadQueue, as well as isEmpty() support. * wtf/CrossThreadQueue.h: (WTF::CrossThreadQueue::append): (WTF::CrossThreadQueue::kill): (WTF::CrossThreadQueue::isKilled): (WTF::CrossThreadQueue::isEmpty): (WTF::CrossThreadQueue::isKilled): Deleted. Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/CrossThreadQueue.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h trunk/Source/WebCo
[webkit-changes] [219283] trunk/Source
Title: [219283] trunk/Source Revision 219283 Author beid...@apple.com Date 2017-07-09 14:26:15 -0700 (Sun, 09 Jul 2017) Log Message Remove some obsolete WebKitVersionChecks. https://bugs.webkit.org/show_bug.cgi?id=174294 Reviewed by Dan Bernstein. Source/WebCore: No new tests (No change to testable behavior) * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::dispatchErrorEvent): * page/Settings.in: * platform/RuntimeApplicationChecks.h: * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isOkCupid): Deleted. (WebCore::IOSApplication::isFacebook): Deleted. * rendering/RenderBox.cpp: (WebCore::RenderBox::layoutOverflowRectForPropagation): Source/WebKit/ios: * WebView/WebPDFViewIOS.mm: (-[WebPDFView drawPage:]): Source/WebKit/mac: * Misc/WebKitVersionChecks.h: * WebView/WebHTMLView.mm: (-[WebHTMLView hitTest:]): * WebView/WebView.mm: (shouldRespectPriorityInCSSAttributeSetters): (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView _preferencesChanged:]): (shouldTransformsAffectOverflow): Deleted. (shouldDispatchJavaScriptWindowOnErrorEvents): Deleted. Source/WebKit2: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/ScriptExecutionContext.cpp trunk/Source/WebCore/page/Settings.in trunk/Source/WebCore/platform/RuntimeApplicationChecks.h trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm trunk/Source/WebCore/rendering/RenderBox.cpp trunk/Source/WebKit/ios/ChangeLog trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h trunk/Source/WebKit/mac/WebView/WebHTMLView.mm trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (219282 => 219283) --- trunk/Source/WebCore/ChangeLog 2017-07-09 20:19:47 UTC (rev 219282) +++ trunk/Source/WebCore/ChangeLog 2017-07-09 21:26:15 UTC (rev 219283) @@ -1,3 +1,25 @@ +2017-07-09 Brady Eidson + +Remove some obsolete WebKitVersionChecks. +https://bugs.webkit.org/show_bug.cgi?id=174294 + +Reviewed by Dan Bernstein. + +No new tests (No change to testable behavior) + +* dom/ScriptExecutionContext.cpp: +(WebCore::ScriptExecutionContext::dispatchErrorEvent): + +* page/Settings.in: + +* platform/RuntimeApplicationChecks.h: +* platform/cocoa/RuntimeApplicationChecksCocoa.mm: +(WebCore::IOSApplication::isOkCupid): Deleted. +(WebCore::IOSApplication::isFacebook): Deleted. + +* rendering/RenderBox.cpp: +(WebCore::RenderBox::layoutOverflowRectForPropagation): + 2017-07-08 Brady Eidson Remove some obsolete RuntimeApplicationChecks. Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (219282 => 219283) --- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp 2017-07-09 20:19:47 UTC (rev 219282) +++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp 2017-07-09 21:26:15 UTC (rev 219283) @@ -417,13 +417,6 @@ if (!target) return false; -#if PLATFORM(IOS) -if (target->toDOMWindow() && is(*this)) { -if (!downcast(*this).settings().shouldDispatchJavaScriptWindowOnErrorEvents()) -return false; -} -#endif - String message = errorMessage; int line = lineNumber; int column = columnNumber; Modified: trunk/Source/WebCore/page/Settings.in (219282 => 219283) --- trunk/Source/WebCore/page/Settings.in 2017-07-09 20:19:47 UTC (rev 219282) +++ trunk/Source/WebCore/page/Settings.in 2017-07-09 21:26:15 UTC (rev 219283) @@ -224,8 +224,6 @@ standalone initial=false telephoneNumberParsingEnabled initial=false mediaDataLoadsAutomatically initial=defaultMediaDataLoadsAutomatically -shouldTransformsAffectOverflow initial=true -shouldDispatchJavaScriptWindowOnErrorEvents initial=false alwaysUseAcceleratedOverflowScroll initial=false imageControlsEnabled initial=false, conditional=SERVICE_CONTROLS Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (219282 => 219283) --- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2017-07-09 20:19:47 UTC (rev 219282) +++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2017-07-09 21:26:15 UTC (rev 219283) @@ -71,8 +71,6 @@ bool isDumpRenderTree(); bool isMobileStore(); WEBCORE_EXPORT bool isWebApp(); -WEBCORE_EXPORT bool isOkCupid(); -WEBCORE_EXPORT bool isFacebook(); WEBCORE_EXPORT bool isWebProcess(); bool isIBooks(); WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery(); Modified: trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (219282 => 219283) --- trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2017-07-09 20:19:47 UTC (rev 219282) +++ trunk/Source/WebCore/platform/cocoa/RuntimeAppli
[webkit-changes] [219280] trunk/Source
Title: [219280] trunk/Source Revision 219280 Author beid...@apple.com Date 2017-07-08 22:05:41 -0700 (Sat, 08 Jul 2017) Log Message Remove some obsolete RuntimeApplicationChecks. https://bugs.webkit.org/show_bug.cgi?id=174293 Reviewed by Dan Bernstein. Source/WebCore: No new tests (No change to testable behavior) * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parametersForPlugin): (WebCore::shouldNotPerformURLAdjustment): Deleted. * platform/RuntimeApplicationChecks.h: * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isDaijisenDictionary): Deleted. (WebCore::IOSApplication::isNASAHD): Deleted. (WebCore::IOSApplication::isTheEconomistOnIphone): Deleted. * platform/ios/wak/WebCoreThread.h: * platform/ios/wak/WebCoreThread.mm: (StartWebThread): (WebThreadSetDelegateSourceRunLoopMode): Deleted. Source/WebKit/mac: * Misc/WebKitVersionChecks.h: * WebView/WebView.mm: (+[WebView enableWebThread]): (-[WebView _needsPreHTML5ParserQuirks]): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLObjectElement.cpp trunk/Source/WebCore/platform/RuntimeApplicationChecks.h trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm trunk/Source/WebCore/platform/ios/wak/WebCoreThread.h trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h trunk/Source/WebKit/mac/WebView/WebView.mm Diff Modified: trunk/Source/WebCore/ChangeLog (219279 => 219280) --- trunk/Source/WebCore/ChangeLog 2017-07-09 02:58:36 UTC (rev 219279) +++ trunk/Source/WebCore/ChangeLog 2017-07-09 05:05:41 UTC (rev 219280) @@ -1,3 +1,27 @@ +2017-07-08 Brady Eidson + +Remove some obsolete RuntimeApplicationChecks. +https://bugs.webkit.org/show_bug.cgi?id=174293 + +Reviewed by Dan Bernstein. + +No new tests (No change to testable behavior) + +* html/HTMLObjectElement.cpp: +(WebCore::HTMLObjectElement::parametersForPlugin): +(WebCore::shouldNotPerformURLAdjustment): Deleted. + +* platform/RuntimeApplicationChecks.h: +* platform/cocoa/RuntimeApplicationChecksCocoa.mm: +(WebCore::IOSApplication::isDaijisenDictionary): Deleted. +(WebCore::IOSApplication::isNASAHD): Deleted. +(WebCore::IOSApplication::isTheEconomistOnIphone): Deleted. + +* platform/ios/wak/WebCoreThread.h: +* platform/ios/wak/WebCoreThread.mm: +(StartWebThread): +(WebThreadSetDelegateSourceRunLoopMode): Deleted. + 2017-07-08 Basuke Suzuki [Curl] Safe access and life cycle management of bare Curl handle Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (219279 => 219280) --- trunk/Source/WebCore/html/HTMLObjectElement.cpp 2017-07-09 02:58:36 UTC (rev 219279) +++ trunk/Source/WebCore/html/HTMLObjectElement.cpp 2017-07-09 05:05:41 UTC (rev 219280) @@ -152,14 +152,6 @@ } } -#if PLATFORM(IOS) -static bool shouldNotPerformURLAdjustment() -{ -static bool shouldNotPerformURLAdjustment = IOSApplication::isNASAHD() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_5_0; -return shouldNotPerformURLAdjustment; -} -#endif - // FIXME: This function should not deal with url or serviceType! void HTMLObjectElement::parametersForPlugin(Vector& paramNames, Vector& paramValues, String& url, String& serviceType) { @@ -217,10 +209,6 @@ // attribute, not by a param element. However, for compatibility, allow the // resource's URL to be given by a param named "src", "movie", "code" or "url" // if we know that resource points to a plug-in. -#if PLATFORM(IOS) -if (shouldNotPerformURLAdjustment()) -return; -#endif if (url.isEmpty() && !urlParameter.isEmpty()) { SubframeLoader& loader = document().frame()->loader().subframeLoader(); Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (219279 => 219280) --- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2017-07-09 02:58:36 UTC (rev 219279) +++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2017-07-09 05:05:41 UTC (rev 219280) @@ -73,9 +73,6 @@ WEBCORE_EXPORT bool isWebApp(); WEBCORE_EXPORT bool isOkCupid(); WEBCORE_EXPORT bool isFacebook(); -WEBCORE_EXPORT bool isDaijisenDictionary(); -bool isNASAHD(); -WEBCORE_EXPORT bool isTheEconomistOnIphone(); WEBCORE_EXPORT bool isWebProcess(); bool isIBooks(); WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery(); Modified: trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (219279 => 219280) --- trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2017-07-09 02:58:36 UTC (rev 219279) +++ trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2017-07-09 05:05:41 UTC (rev 219280) @@ -216,24 +216,6 @@ return isFacebook; } -bool IOSApplication::isDaijisenDictionary() -{ -static bool isDaijisenDictionary = applicationBundleIsEqualTo("jp.co.sho
[webkit-changes] [219200] trunk/Source/WebKit/mac
Title: [219200] trunk/Source/WebKit/mac Revision 219200 Author beid...@apple.com Date 2017-07-06 09:31:34 -0700 (Thu, 06 Jul 2017) Log Message Add logging to first attempt to use the WebIconDatabase class. https://bugs.webkit.org/show_bug.cgi?id=174190 Reviewed by Andy Estes. * Misc/WebIconDatabase.mm: (+[WebIconDatabase sharedIconDatabase]): On first call, log a warning of the bleak future of this non-API. * Misc/WebKitVersionChecks.h: Modified Paths trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h Diff Modified: trunk/Source/WebKit/mac/ChangeLog (219199 => 219200) --- trunk/Source/WebKit/mac/ChangeLog 2017-07-06 16:22:41 UTC (rev 219199) +++ trunk/Source/WebKit/mac/ChangeLog 2017-07-06 16:31:34 UTC (rev 219200) @@ -1,3 +1,14 @@ +2017-07-06 Brady Eidson + +Add logging to first attempt to use the WebIconDatabase class. +https://bugs.webkit.org/show_bug.cgi?id=174190 + +Reviewed by Andy Estes. + +* Misc/WebIconDatabase.mm: +(+[WebIconDatabase sharedIconDatabase]): On first call, log a warning of the bleak future of this non-API. +* Misc/WebKitVersionChecks.h: + 2017-07-06 Matt Lewis Unreviewed, rolling out r219178. Modified: trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm (219199 => 219200) --- trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm 2017-07-06 16:22:41 UTC (rev 219199) +++ trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm 2017-07-06 16:31:34 UTC (rev 219200) @@ -34,6 +34,7 @@ #import "WebIconDatabaseDelegate.h" #import "WebKitLogging.h" #import "WebKitNSStringExtras.h" +#import "WebKitVersionChecks.h" #import "WebNSFileManagerExtras.h" #import "WebNSURLExtras.h" #import "WebPreferencesPrivate.h" @@ -97,9 +98,15 @@ + (WebIconDatabase *)sharedIconDatabase { -static WebIconDatabase *database = nil; -if (!database) +static WebIconDatabase *database; +static dispatch_once_t once; +dispatch_once(&once, ^ { +if (linkedOnOrAfter(SDKVersion::FirstWithWebIconDatabaseWarning)) +NSLog(@"+[WebIconDatabase sharedIconDatabase] is not API and should not be used. WebIconDatabase no longer handles icon loading and it will be removed in a future release."); + database = [[WebIconDatabase alloc] init]; +}); + return database; } Modified: trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h (219199 => 219200) --- trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h 2017-07-06 16:22:41 UTC (rev 219199) +++ trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h 2017-07-06 16:31:34 UTC (rev 219200) @@ -84,7 +84,8 @@ #if PLATFORM(IOS) FirstToExcludeLocalStorageFromBackup = DYLD_IOS_VERSION_11_0, #else -FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13 +FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13, +FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13, #endif }; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [219170] trunk
Title: [219170] trunk Revision 219170 Author beid...@apple.com Date 2017-07-05 17:01:53 -0700 (Wed, 05 Jul 2017) Log Message Allow navigations in subframes to get a ShouldOpenExternalURLsPolicy of "ShouldAllow". and https://bugs.webkit.org/show_bug.cgi?id=174178 Reviewed by Alex Christensen. Source/WebCore: Test: loader/navigation-policy/should-open-external-urls/subframe-navigated-programatically-by-main-frame.html This patch introduces a new flag to FrameLoadRequest to track when it is known with certainty that a FrameLoadRequest originates from the main frame. Later, when calculating the final ShouldOpenExternalURLsPolicy, main frames navigating iframes get to propagate their permissions to the iframe. * bindings/js/CommonVM.cpp: (WebCore::lexicalFrameFromCommonVM): Helper to grab the current frame associated with the current JS callstack. * bindings/js/CommonVM.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::openInNewTab): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::navigate): Add the new flag to FrameLoadRequest (and force almost everybody to explicitly include the flag): * loader/FrameLoadRequest.cpp: (WebCore::FrameLoadRequest::FrameLoadRequest): * loader/FrameLoadRequest.h: (WebCore::FrameLoadRequest::FrameLoadRequest): (WebCore::FrameLoadRequest::navigationInitiatedByMainFrame): * loader/FrameLoader.cpp: (WebCore::FrameLoader::urlSelected): (WebCore::FrameLoader::loadURLIntoChildFrame): (WebCore::shouldOpenExternalURLsPolicyToApply): Helper that takes the new flag into account when deciding what the final ShouldOpenExternalURLsPolicy will be. (WebCore::applyShouldOpenExternalURLsPolicyToNewDocumentLoader): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithNavigationAction): (WebCore::FrameLoader::reloadWithOverrideEncoding): (WebCore::FrameLoader::reload): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): (WebCore::FrameLoader::loadDifferentDocumentItem): (WebCore::createWindow): (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader): Deleted. * loader/FrameLoader.h: * loader/FrameLoaderTypes.h: * loader/NavigationAction.h: (WebCore::NavigationAction::navigationInitiatedByMainFrame): * loader/NavigationScheduler.cpp: (WebCore::ScheduledNavigation::ScheduledNavigation): Grab the "initiating frame" at the time the ScheduledNavigation is created, as it dictates the policy we decide later. (WebCore::ScheduledNavigation::navigationInitiatedByMainFrame): (WebCore::NavigationScheduler::scheduleLocationChange): * page/ContextMenuController.cpp: (WebCore::openNewWindow): (WebCore::ContextMenuController::contextMenuItemSelected): * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): Source/WebKit/ios: Adopt to the new constructor for FrameLoadRequest. * WebView/WebPDFViewPlaceholder.mm: (-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]): Source/WebKit/mac: Adopt to the new constructor for FrameLoadRequest. * WebView/WebPDFView.mm: (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Source/WebKit/win: Adopt to the new constructor for FrameLoadRequest. * Plugins/PluginView.cpp: (WebCore::PluginView::start): (WebCore::PluginView::getURLNotify): (WebCore::PluginView::getURL): (WebCore::PluginView::handlePost): Source/WebKit2: Adopt to the new constructor for FrameLoadRequest. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::loadURL): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchCreatePage): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::openInNewTab): LayoutTests: Added a new explicit test and updated expectations for an old one. * loader/navigation-policy/should-open-external-urls/resources/main-frame-with-subframe-main-programatically-navigates-subframe.html: Added. * loader/navigation-policy/should-open-external-urls/subframe-click-target-self-expected.txt: * loader/navigation-policy/should-open-external-urls/subframe-navigated-programatically-by-main-frame-expected.txt: Added. * loader/navigation-policy/should-open-external-urls/subframe-navigated-programatically-by-main-frame.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/loader/navigation-policy/should-open-external-urls/subframe-click-target-self-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/CommonVM.cpp trunk/Source/WebCore/bindings/js/CommonVM.h trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp trunk/Source/WebCore/inspector/InspectorPageAgent.cpp trunk/Source/WebCore/loader/FrameLoadRequest.cpp trunk/Source/WebCore/loader/FrameLoadRequest.h trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebCore/loader/FrameLoader.h trunk/Source/WebCore/loader/FrameLoaderTypes.h trunk/Source/WebCore/loader/NavigationAction.h trunk/Source/WebCore/loader/NavigationScheduler.cpp trunk/Source/WebCor
[webkit-changes] [219099] trunk
Title: [219099] trunk Revision 219099 Author beid...@apple.com Date 2017-07-03 15:17:01 -0700 (Mon, 03 Jul 2017) Log Message Switch all WebKit API related to favicons from WebIconDatabase over to new WebCore::IconLoader mechanism. https://bugs.webkit.org/show_bug.cgi?id=174073 Reviewed by Andy Estes. Source/WebCore: Covered by existing API test. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::startIconLoading): * loader/EmptyClients.cpp: * loader/FrameLoaderClient.h: Source/WebKit/mac: WebView now keeps a direct copy of its main frame icon as a member variable. It populates that variable by finding exactly one Favicon LinkIcon from WebCore and loading it. This change causes a progression in KVO observation of the mainFrameIcon property as we now have both the old icon and new icon at the time it changes. * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::prepareForDataSourceReplacement): (WebFrameLoaderClient::getLoadDecisionForIcons): (WebFrameLoaderClient::finishedLoadingIcon): (WebFrameLoaderClient::dispatchDidReceiveIcon): Deleted. (WebFrameLoaderClient::registerForIconNotification): Deleted. * WebView/WebView.mm: (+[WebView _setIconLoadingEnabled:]): (+[WebView _isIconLoadingEnabled]): (-[WebView mainFrameIcon]): (-[WebView _setMainFrameIcon:]): (-[WebView _receivedIconChangedNotification:]): Deleted. (-[WebView _registerForIconNotification:]): Deleted. (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Deleted. * WebView/WebViewData.h: * WebView/WebViewInternal.h: * WebView/WebViewPrivate.h: Source/WebKit/win: * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::dispatchDidReceiveIcon): Deleted. (WebFrameLoaderClient::registerForIconNotification): Deleted. * WebCoreSupport/WebFrameLoaderClient.h: Source/WebKit2: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::getLoadDecisionForIcons): (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon): Deleted. (WebKit::WebFrameLoaderClient::registerForIconNotification): Deleted. (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon): Deleted. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Tools: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setIconDatabaseEnabled): Call new SPI for this setting instead of WebIconDatabase stuff. * TestWebKitAPI/Tests/mac/WebViewIconLoading.mm: (-[MainFrameIconKVO observeValueForKeyPath:ofObject:change:context:]): LayoutTests: * http/tests/security/contentSecurityPolicy/block-favicon-expected.txt: Updated results to actually catch the load being blocked due to CSP. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/http/tests/security/contentSecurityPolicy/block-favicon-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/DocumentLoader.cpp trunk/Source/WebCore/loader/EmptyClients.cpp trunk/Source/WebCore/loader/FrameLoaderClient.h trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit/mac/WebView/WebViewData.h trunk/Source/WebKit/mac/WebView/WebViewInternal.h trunk/Source/WebKit/mac/WebView/WebViewPrivate.h trunk/Source/WebKit/win/ChangeLog trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm trunk/Tools/TestWebKitAPI/Tests/mac/WebViewIconLoading.mm Diff Modified: trunk/LayoutTests/ChangeLog (219098 => 219099) --- trunk/LayoutTests/ChangeLog 2017-07-03 21:51:01 UTC (rev 219098) +++ trunk/LayoutTests/ChangeLog 2017-07-03 22:17:01 UTC (rev 219099) @@ -1,3 +1,13 @@ +2017-07-03 Brady Eidson + +Switch all WebKit API related to favicons from WebIconDatabase over to new WebCore::IconLoader mechanism. +https://bugs.webkit.org/show_bug.cgi?id=174073 + +Reviewed by Andy Estes. + +* http/tests/security/contentSecurityPolicy/block-favicon-expected.txt: Updated results to actually catch + the load being blocked due to CSP. + 2017-07-03 Matt Lewis Marked media/track/track-cues-sorted-before-dispatch.html as flaky Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/block-favicon-expected.txt (219098 => 219099) --- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/block-favicon-expected.txt 2017-07-03 21:51:01 UTC (rev 219098) +++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/block-favicon-expected.txt 2017-07-03 22:17:01 UTC (rev 219099) @@ -1,4 +1,5 @@ http://127.0.0.1:8000/security/contentSecurityPolicy/block-favicon.html - didFinishLoading http://127.0.0.1:8000/security/content
[webkit-changes] [219059] trunk/Tools
Title: [219059] trunk/Tools Revision 219059 Author beid...@apple.com Date 2017-07-02 12:38:57 -0700 (Sun, 02 Jul 2017) Log Message Add API test for all parts of WebKit1 API related to favicons. https://bugs.webkit.org/show_bug.cgi?id=174069 Reviewed by Andy Estes. These two API tests cover all WebKit1 API related to icons. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/WebViewIconLoading.mm: Added. (mainResourceData): (defaultFaviconData): (customFaviconData): (imageFromData): (+[IconLoadingProtocol canInitWithRequest:]): (+[IconLoadingProtocol canonicalRequestForRequest:]): (-[IconLoadingProtocol startLoading]): (-[IconLoadingProtocol stopLoading]): (-[IconLoadingFrameLoadDelegate webView:didReceiveIcon:forFrame:]): (-[MainFrameIconKVO observeValueForKeyPath:ofObject:change:context:]): (TestWebKitAPI::TEST): Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/mac/WebViewIconLoading.mm Diff Modified: trunk/Tools/ChangeLog (219058 => 219059) --- trunk/Tools/ChangeLog 2017-07-02 18:43:23 UTC (rev 219058) +++ trunk/Tools/ChangeLog 2017-07-02 19:38:57 UTC (rev 219059) @@ -1,3 +1,26 @@ +2017-07-02 Brady Eidson + +Add API test for all parts of WebKit1 API related to favicons. +https://bugs.webkit.org/show_bug.cgi?id=174069 + +Reviewed by Andy Estes. + +These two API tests cover all WebKit1 API related to icons. + +* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: +* TestWebKitAPI/Tests/mac/WebViewIconLoading.mm: Added. +(mainResourceData): +(defaultFaviconData): +(customFaviconData): +(imageFromData): +(+[IconLoadingProtocol canInitWithRequest:]): +(+[IconLoadingProtocol canonicalRequestForRequest:]): +(-[IconLoadingProtocol startLoading]): +(-[IconLoadingProtocol stopLoading]): +(-[IconLoadingFrameLoadDelegate webView:didReceiveIcon:forFrame:]): +(-[MainFrameIconKVO observeValueForKeyPath:ofObject:change:context:]): +(TestWebKitAPI::TEST): + 2017-07-01 Dan Bernstein [iOS] Remove code only needed when building for iOS 9.x Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (219058 => 219059) --- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-07-02 18:43:23 UTC (rev 219058) +++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-07-02 19:38:57 UTC (rev 219059) @@ -175,6 +175,7 @@ 51CD1C721B38D48400142CA5 /* modal-alerts-in-new-about-blank-window.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 51CD1C711B38D48400142CA5 /* modal-alerts-in-new-about-blank-window.html */; }; 51D124981E763B02002B2820 /* WKHTTPCookieStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D124971E763AF8002B2820 /* WKHTTPCookieStore.mm */; }; 51D1249B1E785425002B2820 /* CookieManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6F3F29013342FEB00A6BF19 /* CookieManager.cpp */; }; + 51DB16CE1F085137001FA4C5 /* WebViewIconLoading.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51DB16CD1F085047001FA4C5 /* WebViewIconLoading.mm */; }; 51E5C7021919C3B200D8B3E1 /* simple2.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 51E780361919AFF8001829A2 /* simple2.html */; }; 51E5C7031919C3B200D8B3E1 /* simple3.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 51E780371919AFF8001829A2 /* simple3.html */; }; 51E6A8941D2F1C0A00C004B6 /* LocalStorageClear.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E6A8921D2F1BEC00C004B6 /* LocalStorageClear.mm */; }; @@ -1199,6 +1200,7 @@ 51CD1C6A1B38CE3600142CA5 /* ModalAlerts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ModalAlerts.mm; sourceTree = ""; }; 51CD1C711B38D48400142CA5 /* modal-alerts-in-new-about-blank-window.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "modal-alerts-in-new-about-blank-window.html"; sourceTree = ""; }; 51D124971E763AF8002B2820 /* WKHTTPCookieStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKHTTPCookieStore.mm; sourceTree = ""; }; + 51DB16CD1F085047001FA4C5 /* WebViewIconLoading.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewIconLoading.mm; sourceTree = ""; }; 51E5C7041919EA5F00D8B3E1 /* ShouldKeepCurrentBackForwardListItemInList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShouldKeepCurrentBackForwardListItemInList.cpp; sourceTree = ""; }; 51E6A8921D2F1BEC00C004B6 /* LocalStorageClear.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalStorageClear.mm; sourceTree = ""; }; 51E6A8951D2F1C7700C004B6 /* LocalStorageClear.html */ = {isa