Last Comment Bug 1303518 - The ChromeFilePropertyBag versions of the File constructors are web-observable
: The ChromeFilePropertyBag versions of the File constructors are web-observable
Status: RESOLVED FIXED
: addon-compat, dev-doc-needed
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: Unspecified Unspecified
P3 normal (vote)
: mozilla52
Assigned To: Andrea Marchesini [:baku]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-17 00:21 PDT by Boris Zbarsky [:bz] (still a bit busy)
Modified: 2016-12-05 06:06 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
affected
fixed


Attachments
boom.patch (32.02 KB, patch)
2016-11-11 03:40 PST, Andrea Marchesini [:baku]
kyle: review+
Details | Diff | Splinter Review

Description User image Boris Zbarsky [:bz] (still a bit busy) 2016-09-17 00:21:27 PDT
In particular, if I take a Blob and make it iterable and try to create a File from it, the chrome-only ctor will get called (and throw) instead of calling the right constructor...

Maybe this is not an issue in practice much, but I would be a lot happier if we used chromeonly factory methods instead of the current chrome-ish constructor setup.
Comment 1 User image Andrew Overholt [:overholt] 2016-09-21 23:13:46 PDT
(In reply to Boris Zbarsky [:bz] (TPAC) from comment #0)
> Maybe this is not an issue in practice much, but I would be a lot happier if
> we used chromeonly factory methods instead of the current chrome-ish
> constructor setup.

This makes me think P3 but if it's more urgent please change the priority accordingly.
Comment 2 User image Andrea Marchesini [:baku] 2016-11-11 03:40:10 PST
Created attachment 8809759 [details] [diff] [review]
boom.patch
Comment 3 User image Pulsebot 2016-11-11 09:57:04 PST
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/938f7fd2ce2b
Remove the chrome only constructor for File, r=qdot
Comment 4 User image Carsten Book [:Tomcat] 2016-11-14 01:26:19 PST
https://hg.mozilla.org/mozilla-central/rev/938f7fd2ce2b
Comment 5 User image Magnus Melin 2016-12-05 06:06:15 PST
Could you update the docs: https://developer.mozilla.org/en-US/docs/Extensions/Using_the_DOM_File_API_in_chrome_code

Note You need to log in before you can comment on or make changes to this bug.