[webkit-reviews] review granted: [Bug 222126] Fix null dereferencing in RangeResponseGenerator::giveResponseToTasksWithFinishedRanges : [Attachment 420864] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 18 13:08:18 PST 2021


Darin Adler <darin at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 222126: Fix null dereferencing in
RangeResponseGenerator::giveResponseToTasksWithFinishedRanges
https://bugs.webkit.org/show_bug.cgi?id=222126

Attachment 420864: Patch

https://bugs.webkit.org/attachment.cgi?id=420864&action=review




--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 420864
  --> https://bugs.webkit.org/attachment.cgi?id=420864
Patch

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

> Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:274
>	   m_generator->giveResponseToTasksWithFinishedRanges(*data);

I think it’s clearer to write:

    protectedThis->m_generator->giveResponseToTasksWithFinishedRanges(*data);

But I’m not sure anyone else in this project agrees with me!

Also, I think that Ryosuke said our overall strategy is to protect differently
than this; it would be the caller who should be doing ref/deref, not this
function protecting itself. So the fix would be in
RemoteMediaResourceManager::loadFinished, which should be using a RefPtr for
its local variable.


More information about the webkit-reviews mailing list