Bug 224464 - Remove SharedBuffer's equality operators with Ref<SharedBuffer>
Summary: Remove SharedBuffer's equality operators with Ref<SharedBuffer>
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: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-12 17:19 PDT by Alex Christensen
Modified: 2021-04-13 12:52 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.62 KB, patch)
2021-04-12 17:21 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-04-12 17:19:09 PDT
Remove SharedBuffer's equality operators with Ref<SharedBuffer>
Comment 1 Alex Christensen 2021-04-12 17:21:26 PDT
Created attachment 425814 [details]
Patch
Comment 2 Chris Dumez 2021-04-12 17:43:58 PDT
Comment on attachment 425814 [details]
Patch

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

> Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:588
> +        if (anyOf(sessionKeys, [&](const Ref<SharedBuffer>& sessionKey) {

The new code looks worse?

What's wrong with comparing a Ref<> with a C++ reference? I can compare a RefPtr<> with a raw pointer already so why is this different?
Comment 3 Alex Christensen 2021-04-13 12:31:19 PDT
That's exactly what I'm trying to do in bug 224412 but can't until I do this.  This compares a Ref<SharedBuffer> and a SharedBuffer& by calling SharedBuffer::operator== which compares the bytes contained in the SharedBuffer's segments.  What I want is a pointer comparison, which is why I have to make these two call sites look worse before introducing a generic Ref equality operator without breaking them.
Comment 4 Chris Dumez 2021-04-13 12:33:17 PDT
Comment on attachment 425814 [details]
Patch

Oh, I missed that. Yes, I agree then.
Comment 5 EWS 2021-04-13 12:51:33 PDT
Committed r275900 (236465@main): <https://commits.webkit.org/236465@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425814 [details].
Comment 6 Radar WebKit Bug Importer 2021-04-13 12:52:14 PDT
<rdar://problem/76605767>