[webkit-reviews] review granted: [Bug 221072] Synthesize range responses if needed in WebCoreNSURLSession : [Attachment 419524] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 8 15:27:35 PST 2021
Geoffrey Garen <ggaren at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 221072: Synthesize range responses if needed in WebCoreNSURLSession
https://bugs.webkit.org/show_bug.cgi?id=221072
Attachment 419524: Patch
https://bugs.webkit.org/attachment.cgi?id=419524&action=review
--- Comment #14 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 419524
--> https://bugs.webkit.org/attachment.cgi?id=419524
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=419524&action=review
r=me -- is the + 1 thing a bug?
> Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:127
> + size_t bytesFromThisViewToDeliver = std::min(bufferView.size(),
range.end() - byteIndex + 1);
Why + 1? (Typically, end - index is the right math for computing the size of a
range.)
> Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:203
> + class Client : public PlatformMediaResourceClient {
While it's true that we don't need access to this class declaration outside
this scope, I think it would be more readable to declare it at file level.
Maybe name it RangeResponsePlatformMediaResourceClient.
> Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:210
> + // These methods should have been called before changing the client
to this.
We might as well make these release asserts, since they'll never be called.
More information about the webkit-reviews
mailing list