Bug 179631 - Web Inspector: refactor active WebSocket tracking to not use raw pointers
Summary: Web Inspector: refactor active WebSocket tracking to not use raw pointers
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 13:32 PST by Devin Rousso
Modified: 2019-03-21 10:59 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.04 KB, patch)
2017-11-13 13:35 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-elcapitan (1.91 MB, application/zip)
2017-11-13 14:27 PST, Build Bot
no flags Details
Patch (10.94 KB, patch)
2019-03-20 17:58 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (10.68 KB, patch)
2019-03-20 19:18 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (4.23 KB, patch)
2019-03-20 20:20 PDT, Devin Rousso
timothy: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2017-11-13 13:32:42 PST
As discussed at the WebKit Contributors meeting, we should avoid using raw-pointers.  Since I added this, I felt like I should change it :P
Comment 1 Devin Rousso 2017-11-13 13:35:32 PST
Created attachment 326792 [details]
Patch
Comment 2 Build Bot 2017-11-13 14:27:41 PST Comment hidden (obsolete)
Comment 3 Build Bot 2017-11-13 14:27:42 PST Comment hidden (obsolete)
Comment 4 Alex Christensen 2017-11-13 14:39:07 PST
Comment on attachment 326792 [details]
Patch

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

> Source/WebCore/Modules/websockets/WebSocket.cpp:182
> +HashSet<Ref<WebSocket>>& WebSocket::allActiveWebSockets(const LockHolder&)

WebSockets are added in their constructor and removed in their destructor.  This will make it so they are added in their constructor and never deleted because their destructor will never be called because there will always be at least one ref.
Comment 5 Devin Rousso 2019-03-20 17:58:59 PDT
Created attachment 365452 [details]
Patch
Comment 6 Devin Rousso 2019-03-20 19:18:32 PDT
Created attachment 365462 [details]
Patch
Comment 7 Devin Rousso 2019-03-20 20:20:40 PDT
Created attachment 365468 [details]
Patch
Comment 8 Timothy Hatcher 2019-03-21 10:59:59 PDT
Comment on attachment 365468 [details]
Patch

Build fails.