Closed Bug 1393360 Opened 7 years ago Closed 7 years ago

FileReader freezes Browser in 55.0.2

Categories

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

55 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: co, Assigned: baku)

References

Details

(Keywords: hang)

Attachments

(2 files)

Attached file poc.htm
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170814072924

Steps to reproduce:

1. Create an empty Blob
2. Fill it with 4 KB junks until the overall size is 4 MB
3. Create a FileReader
4. Attempt to read Blob content with FileReader.readAsArrayBuffer()


Actual results:

Tab content freezes (OSX and Windows 10, x64)


Expected results:

Some FileReader.on* should be called.
Component: Untriaged → DOM
Keywords: hang
Product: Firefox → Core
Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attached patch multiplex.patchSplinter Review
In this POC we end up doing a lot of QI for each reading of the blob.
This is because this POC creates a 1024 nested blobs and each operation checks if the inputStream of the main blob is seekable, asyncInputStream or IPC serializable. Each time, each operation has to QI each sub blob inputStream.

This patch introduces boolean values for mIsSeekable, mIsCloneable and so on and these values are set when a new inputStream is added to the nsMultiplexInputStream interface.
Attachment #8901075 - Flags: review?(bugs)
Attachment #8901075 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4970f731aeba
nsMultiplexInputStream should not QI each stream when checking if seekable, cloneable or IPC serializable, r=smaug
https://hg.mozilla.org/mozilla-central/rev/4970f731aeba
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Depends on: 1397331
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: