Bug 217142

Summary: REGRESSION[267763] RELEASE_ASSERT in allNetworkProcesses hit when registering legacy protocol handlers before instantiating any WebKit objects
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, cdumez, ggaren, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=216041
Attachments:
Description Flags
Patch beidson: review+

Description Alex Christensen 2020-09-30 12:42:24 PDT
REGRESSION[267763] RELEASE_ASSERT in allNetworkProcesses hit when registering legacy protocol handlers before instantiating any WebKit objects
Comment 1 Alex Christensen 2020-09-30 12:46:18 PDT
Created attachment 410147 [details]
Patch
Comment 2 Alex Christensen 2020-09-30 12:59:53 PDT
Comment on attachment 410147 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410147&action=review

> Source/WebKit/ChangeLog:12
> +        This unfortunately can't be tested with our current infrastructure because TestsController's constructor calls initializeMainThread.

I verified that removing the initializeMainThread call from TestsController::TestsController causes me to hit the issue in the radar and this fixes it.
Comment 3 Alex Christensen 2020-09-30 13:27:56 PDT
http://trac.webkit.org/r267802
Comment 4 Radar WebKit Bug Importer 2020-09-30 13:28:36 PDT
<rdar://problem/69805862>
Comment 5 Geoffrey Garen 2020-10-01 09:11:02 PDT
Comment on attachment 410147 [details]
Patch

Shouldn't we have initialized WebKit2 when we created the WebProcessPool? If not, what about all the other functions here, like registerURLSchemeAsCORSEnabled?
Comment 6 Alex Christensen 2020-10-01 09:47:31 PDT
WebKit2 is initialized when making a WebProcessPool.  The problem here is registerGlobalURLSchemeAsHavingCustomProtocolHandlers is static, so no WebProcessPool is instantiated.