[webkit-reviews] review granted: [Bug 54118] XMLHttpRequest::abort() should call clearResponse() : [Attachment 81834] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 9 10:49:30 PST 2011


Darin Adler <darin at apple.com> has granted Jarred Nicholls
<jarred.nicholls at gmail.com>'s request for review:
Bug 54118: XMLHttpRequest::abort() should call clearResponse()
https://bugs.webkit.org/show_bug.cgi?id=54118

Attachment 81834: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=81834&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=81834&action=review

> Source/WebCore/ChangeLog:16
> +	   abort() is not properly clearing ArrayBuffer binary buffered data.
This
> +	   change will remove the cleanup code from abort() and instead call
> +	   clearResponse() to do the cleanup, which not only does the original
abort()
> +	   cleanup, but also covers the binary response buffer as well. Future
cleanup
> +	   omissions can be avoided by only having to maintain clearResponse().

> +	   
> +	   Clearing the data on abort() is more memory efficient.  By not
clearing
> +	   this data, it will remain in memory until the XHR object is cleaned
up or
> +	   until a subsequent call to open().

This comment is too long. It would be better to say something like this:

    Calling clearResponse frees more memory at abort time.

    No new tests because there is no observable effect except for less memory
used.

The longer paragraph is something people probably won’t read.


More information about the webkit-reviews mailing list