← Back to release summary

FileReader - Set Result Only on Load

Category
File APIs
Type
New or changed feature
Status
Enabled by default (Chrome 87)
Intent stage
Prepare to ship

Summary

The feature changes the behavior of FileReader API so that the result attribute is only set right before the Load event is fired. Motivation: This brings the chromium FileReader implementation in line with the FileAPI spec. The existing implementation was identified to possibly cause memory leaks but that scenario was very rarely seen, as evidenced by this experiment.

Standards & signals

Docs: https://github.com/w3c/FileAPI/issues/79 https://crbug.com/768972 https://chromium-review.googlesource.com/c/chromium/src/+/2352610

Explainers: https://github.com/w3c/FileAPI/issues/79

View on chromestatus.com