RESOLVED FIXED Bug 224464
Remove SharedBuffer's equality operators with Ref<SharedBuffer>
https://bugs.webkit.org/show_bug.cgi?id=224464
Summary Remove SharedBuffer's equality operators with Ref<SharedBuffer>
Alex Christensen
Reported 2021-04-12 17:19:09 PDT
Remove SharedBuffer's equality operators with Ref<SharedBuffer>
Attachments
Patch (5.62 KB, patch)
2021-04-12 17:21 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2021-04-12 17:21:26 PDT
Chris Dumez
Comment 2 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?
Alex Christensen
Comment 3 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.
Chris Dumez
Comment 4 2021-04-13 12:33:17 PDT
Comment on attachment 425814 [details] Patch Oh, I missed that. Yes, I agree then.
EWS
Comment 5 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].
Radar WebKit Bug Importer
Comment 6 2021-04-13 12:52:14 PDT
Note You need to log in before you can comment on or make changes to this bug.