Summary: | Don't call NetworkProcess::singleton from WebProcess when using NetworkSession | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||
Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, beidson | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Alex Christensen
2016-02-29 12:02:55 PST
Created attachment 272509 [details]
Patch
Created attachment 272511 [details]
Patch
Comment on attachment 272511 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272511&action=review > Source/WebKit2/WebProcess/WebProcess.cpp:194 > + NetworkSession::setCustomProtocolManager(nullptr); This doesn't do anything. Will land without it. Comment on attachment 272511 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272511&action=review > Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm:221 > + NeverDestroyed<RefPtr<CustomProtocolManager>> gCustomProtocolManager; You really need “static” here. I’m not sure exactly what this will do without the static, but nothing good. I think in practice it means we will leak all the CustomProtocolManager objects and always have null for the protocol manager. Also, I don’t think you should name this local variable with a "g" prefix. Sure enough. This regressed WebKit2CustomProtocolsTest when using NetworkSession for that very reason. Will fix. |