Bug 230486 - Use typed identifier for WebSocketChannel identifiers
Summary: Use typed identifier for WebSocketChannel identifiers
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
Keywords: InRadar
Depends on:
Reported: 2021-09-20 10:32 PDT by Alex Christensen
Modified: 2021-09-21 08:25 PDT (History)
10 users (show)

See Also:

Patch (33.35 KB, patch)
2021-09-20 10:33 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-09-20 10:32:19 PDT
Use typed identifier for WebSocketChannel identifiers
Comment 1 Alex Christensen 2021-09-20 10:33:15 PDT
Created attachment 438692 [details]
Comment 2 youenn fablet 2021-09-21 00:10:03 PDT
Comment on attachment 438692 [details]

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

> Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h:87
> +    virtual WebSocketChannelIdentifier progressIdentifier() const = 0;

Can we rename progressIdentifier as well to just identifier?

> Source/WebCore/Modules/websockets/WebSocketChannelInspector.cpp:37
> +    : m_progressIdentifier(WebSocketChannelIdentifier::generateThreadSafe()) { }

I would have thought only WebSocketChannel would generate WebSocketChannelIdentifier, it is a bit odd but is a preexisting issue.
Comment 3 Alex Christensen 2021-09-21 08:06:33 PDT
It can also never be zero now, so I'll remove the if (m_progressIdentifier) checks.
Comment 4 Alex Christensen 2021-09-21 08:15:53 PDT
ThreadableWebSocketChannel already has identifier() which returns a WebSocketIdentifier
Comment 5 EWS 2021-09-21 08:24:25 PDT
Committed r282818 (241949@main): <https://commits.webkit.org/241949@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438692 [details].
Comment 6 Radar WebKit Bug Importer 2021-09-21 08:25:20 PDT