Closed Bug 530269 Opened 12 years ago Closed 12 years ago
Reader doesn't clear old data
When reusing a file object we don't clear existing data, instead we simply append to it. Patch attached which applies on top of bug 530220.
Attachment #413786 - Flags: review?(bzbarsky) → review+
Attachment #413786 - Flags: approval1.9.2?
Attachment #413786 - Flags: approval1.9.2? → approval1.9.2+
So I found more things that needs to be cleared out when a FileReader is reused. Also, it turns out that in most cases we actually leak all the read data :( I'm surprised our normal leak tests haven't caught the leaks. Aren't we doing leak tests on mochitest? Granted, these aren't refcnt leaks, just malloc leaks. This patch contains fixes and tests.
Comment on attachment 413996 [details] [diff] [review] More fixes and tests r+a=jst
Fixed on trunk: http://hg.mozilla.org/mozilla-central/rev/1a473af66719 http://hg.mozilla.org/mozilla-central/rev/fd41686d0b50 http://hg.mozilla.org/mozilla-central/rev/80016f56ce5d And 1.9.2: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/52e6362f14ef http://hg.mozilla.org/releases/mozilla-1.9.2/rev/0116a4e04f05 http://hg.mozilla.org/releases/mozilla-1.9.2/rev/728a9e394d0a
You need to log in before you can comment on or make changes to this bug.