Bug 214071

Summary: Network process crashes in WebKit::WebIDBServer::removeConnection
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Sihui Liu 2020-07-07 22:40:56 PDT
...
Comment 1 Sihui Liu 2020-07-07 22:41:27 PDT
<rdar://problem/64853929>
Comment 2 Sihui Liu 2020-07-07 22:52:00 PDT
Created attachment 403760 [details]
Patch
Comment 3 Chris Dumez 2020-07-08 08:50:55 PDT
Comment on attachment 403760 [details]
Patch

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

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2517
> +    if (!m_webIDBServers.contains(sessionID) || m_networkSessions.contains(sessionID))

This function looks up sessionID in m_webIDBServers up to 3 times. I suggest using an iterator to avoid that.
Comment 4 Sihui Liu 2020-07-08 09:37:47 PDT
Created attachment 403790 [details]
Patch
Comment 5 EWS 2020-07-08 11:15:12 PDT
Committed r264119: <https://trac.webkit.org/changeset/264119>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 403790 [details].