The following API test is timing out / failing an assertion added with https://trac.webkit.org/changeset/249923/webkit TestWebKitAPI.WebKit.PrivateBrowsingPushStateNoHistoryCallback _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. ASSERTION FAILED: sessionID == WebProcess::singleton().sessionID() /Volumes/Data/slave/mojave-debug/build/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp(65) : virtual WebCore::SWClientConnection *WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession(PAL::SessionID) 1 0x319c51089 WTFCrash 2 0x10658296b WTFCrashWithInfo(int, char const*, char const*, int) 3 0x10772003c WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession(PAL::SessionID) 4 0x1079aca22 WebKit::WebPage::updateThrottleState()::$_4::operator()() const 5 0x1079ac9c9 WTF::Detail::CallableWrapper<WebKit::WebPage::updateThrottleState()::$_4, void>::call() 6 0x319c7db9a WTF::Function<void ()>::operator()() const 7 0x319ceecf5 WTF::RunLoop::performWork() 8 0x319cf009e WTF::RunLoop::performWork(void*) 9 0x7fff3787c683 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 10 0x7fff3787c629 __CFRunLoopDoSource0 11 0x7fff3785ffeb __CFRunLoopDoSources0 12 0x7fff3785f5b5 __CFRunLoopRun 13 0x7fff3785eebe CFRunLoopRunSpecific 14 0x7fff39ac37df -[NSRunLoop(NSRunLoop) runMode:beforeDate:] 15 0x7fff39ac36b4 -[NSRunLoop(NSRunLoop) run] 16 0x7fff639ee077 _xpc_objc_main 17 0x7fff639edb79 _xpc_copy_xpcservice_dictionary 18 0x106cd73e5 WebKit::XPCServiceMain(int, char const**) 19 0x107cb0bfb WKXPCServiceMain 20 0x106576ea2 main 21 0x7fff637b53d5 start https://build.webkit.org/builders/Apple%20Mojave%20Debug%20WK2%20%28Tests%29/builds/4712/steps/run-api-tests/logs/stdio
<rdar://problem/55426742>
Looking.
There is a WKPreferencesSetPrivateBrowsingEnabled() C SPI which still allows the view to change session without navigating :/
Created attachment 378937 [details] Patch
Created attachment 378964 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Created attachment 378967 [details] Patch
Comment on attachment 378967 [details] Patch Clearing flags on attachment: 378967 Committed r249962: <https://trac.webkit.org/changeset/249962>
All reviewed patches have been landed. Closing bug.