Avoid CPOW when setting file array on <input type=file>

RESOLVED FIXED in Firefox 50

Status

Testing
Marionette
RESOLVED FIXED
a year ago
9 months ago

People

(Reporter: ato, Assigned: ato)

Tracking

unspecified
mozilla51
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 fix-optional, firefox50- fixed, firefox51- fixed)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

a year ago
Marionette passes an element reference from the content frame script to chrome space in order to gain access to element.mozSetFileArray, so users can set a file for <input type=file>.

This functionality is currently implemented in the Marionette:setElementValue message handler in GeckoDriver#sendKeysToElement: https://dxr.mozilla.org/mozilla-central/rev/d4213241bb796fdfa7a5ad4f1989e97b44474364/testing/marionette/driver.js#2208

Bug 1233497 outlaws the use of CPOWs but Marionette currently circumvents this by disabling the throwing via a preference.

We should avoid using a CPOW for this.
(Assignee)

Updated

a year ago
Blocks: 1238095
(Assignee)

Comment 1

10 months ago
It looks like constructing File objects in content space is now (somehow) not broken anymore:

    let file = new File(path);
    let fs = Array.prototype.slice.call(inputEl.files);
    fs.push(file);
    inputEl.mozSetFileArray(fs);
Assignee: nobody → ato
Status: NEW → ASSIGNED
(Assignee)

Comment 2

10 months ago
Making this depend on bug 1280947 as it contains some improvements to how we call mozSetFileArray.
Depends on: 1280947
Comment hidden (mozreview-request)

Comment 4

10 months ago
mozreview-review
Comment on attachment 8786321 [details]
Bug 1244425 - Avoid CPOW when setting file array on <input type=file>;

https://reviewboard.mozilla.org/r/75306/#review73212
Attachment #8786321 - Flags: review?(dburns) → review+
Comment hidden (mozreview-request)

Comment 6

10 months ago
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c382a30453a
Avoid CPOW when setting file array on <input type=file>; r=automatedtester

Comment 7

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6c382a30453a
Status: ASSIGNED → RESOLVED
Last Resolved: 10 months ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
(Assignee)

Comment 8

10 months ago
Test only changes.  Depends on bug 1280947.
Whiteboard: [checkin-needed-aurora][checkin-needed-beta]

Comment 9

10 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/2984e7af1c0e
status-firefox50: --- → fixed

Comment 10

10 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/afd10ab995e0
status-firefox49: --- → fixed

Updated

10 months ago
Whiteboard: [checkin-needed-aurora][checkin-needed-beta]

Comment 11

10 months ago
All backed out for both for Marionette bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=1571072&repo=mozilla-beta
https://hg.mozilla.org/releases/mozilla-aurora/rev/5779143fc12d6a751fedb0b8049d52f4bd10dad9
https://hg.mozilla.org/releases/mozilla-beta/rev/462e604cb5d474ddce189a27eeb0a29242696eee
status-firefox49: fixed → affected
status-firefox50: fixed → affected
Flags: needinfo?(ato)
We are very late in beta now but could still take uplift for 50.
status-firefox49: affected → fix-optional
tracking-firefox50: --- → ?

Comment 13

9 months ago
[Tracking Requested - why for this release]: Now that 50 is on the Beta channel, I would not block on this but we should consider fixing this test in Aurora 51.

Hi Andreas, David, do we plan to uplift this test fix in Aurora51?
status-firefox50: affected → fix-optional
tracking-firefox50: ? → -
tracking-firefox51: --- → ?
Flags: needinfo?(dburns)
I am pretty sure the reason this failed on uplift was because of a dep which should be in all the way to beta. I will let Andreas run a test to check that we have a clean build/test of beta
Flags: needinfo?(dburns)
(Assignee)

Comment 15

9 months ago
I’m unsure about the tracking vs. status flags on this bug:

tracking-firefox51: 	?
status-firefox51: 	fixed 

It says it’s been fixed in Firefox 51 but is not tracking.  Where do I find out what Firefox version is currently in Aurora/Beta and so on?
Flags: needinfo?(ato)
Firefox 50 is in Beta at the moment 

Details can be found in https://wiki.mozilla.org/RapidRelease/Calendar
Un track 51 as it's fixed.
tracking-firefox51: ? → -
(Assignee)

Comment 18

9 months ago
Patch applied cleanly on beta, try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0766b9418af8
(Assignee)

Comment 19

9 months ago
Patch seems fine.  Requesting uplift again.
Whiteboard: [checkin-needed-beta]

Comment 20

9 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/e9c597887c21
status-firefox50: fix-optional → fixed
Whiteboard: [checkin-needed-beta]
You need to log in before you can comment on or make changes to this bug.