Closed Bug 1303517 Opened 3 years ago Closed 3 years ago

Are the ChromeFilePropertyBag versions of the File constructor supposed to be usable in workers?

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox51 --- fix-optional
firefox52 --- fixed

People

(Reporter: bzbarsky, Assigned: baku)

Details

Attachments

(1 file)

File::Constructor, say the overload taking a Blob and a ChromeFilePropertyBag, will check ThreadsafeIsCallerChrome() and then call InitializeChromeFile().  But InitializeChromeFile() does MOZ_ASSERT(nsContentUtils::IsCallerChrome()); which will assert mainthread...

What is the intent here wrt workers?
Flags: needinfo?(amarchesini)
> What is the intent here wrt workers?

We should fix this. Currently that CTOR is used only for testing.
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
smaug, bz doesn't accept reviews in these days...
Attachment #8792472 - Flags: review?(bugs)
Comment on attachment 8792472 [details] [diff] [review]
blob_assert.patch

r=me
Attachment #8792472 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/951db29640de
File CTOR for chrome must be fully thread-safe, r=bz
https://hg.mozilla.org/mozilla-central/rev/951db29640de
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Mark 51 as fix-optional. If it's worth uplift to 51, feel free to nominate it.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.