Closed Bug 530269 Opened 12 years ago Closed 12 years ago

Reusing FileReader doesn't clear old data

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta4-fixed

People

(Reporter: sicking, Assigned: sicking)

References

Details

Attachments

(2 files)

Attached patch Patch to fixSplinter Review
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 - Attachment is patch: true
Attachment #413786 - Attachment mime type: application/octet-stream → text/plain
Attachment #413786 - Flags: review?(bzbarsky)
Attachment #413786 - Flags: review?(bzbarsky) → review+
Attachment #413786 - Flags: approval1.9.2? → approval1.9.2+
Assignee: nobody → jonas
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.
Attachment #413996 - Flags: review?(jst)
Comment on attachment 413996 [details] [diff] [review]
More fixes and tests

r+a=jst
Attachment #413996 - Flags: review?(jst)
Attachment #413996 - Flags: review+
Attachment #413996 - Flags: approval1.9.2+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.