Bug 214071 - Network process crashes in WebKit::WebIDBServer::removeConnection
Summary: Network process crashes in WebKit::WebIDBServer::removeConnection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-07 22:40 PDT by Sihui Liu
Modified: 2020-07-08 11:15 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.18 KB, patch)
2020-07-07 22:52 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (5.19 KB, patch)
2020-07-08 09:37 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].