Closed Bug 2010930 Opened 8 months ago Closed 5 months ago

Initial commit of WebSerial code

Categories

(Core :: DOM: Web Serial, defect)

defect

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox151 --- fixed

People

(Reporter: gstoll, Assigned: gstoll)

References

(Blocks 6 open bugs)

Details

(Keywords: perf-alert, regression)

Attachments

(9 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

This should have all basic WebSerial functionality. This will be behind a pref dom.webserial.enabled.

Assignee: nobody → gstoll
Status: NEW → ASSIGNED
Blocks: 2010938

Also adds a few declarations for the "connect" and "disconnect" events

IPC Parent/Child classes for SerialManager and SerialPort.

See part 2 for the base SerialPlatformService class.

See part 2 for the base SerialPlatformService class.

When a page tries to use the WebSerial API, we require the user to install
a generated add-on to grant that permission, just like we do for WebMIDI.
After that is installed, we pop a dialog that lets the user choose a port
to grant access to.

Needed so Firefox has access to USB ports for serial devices that are
connected to a USB port.

The browser/ tests are mainly around testing the site permission add-on
and requestPort() dialog, while the mochitests test mostly test the
actual WebSerial API.

Blocks: 2013908
Severity: -- → N/A
Type: defect → enhancement
Blocks: 2014475
Blocks: 2014567
Blocks: 2014571
Blocks: 2014573
Blocks: 2014794
Blocks: 2014897
Blocks: 2016732
Blocks: 2016736
Blocks: 2017324
Blocks: 2020360
Blocks: 2021098
Blocks: 2021099
Blocks: 2021345
Blocks: 2026743
Blocks: 2029352
Duplicate of this bug: 2017324
Duplicate of this bug: 2014794
Blocks: 2029683
Blocks: 2030195
See Also: → 2030195
Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/dc5154c06773 https://hg.mozilla.org/integration/autoland/rev/cd27368770d1 part 1 - add WebSerial interfaces to .webidl files r=cmartin,webidl,smaug,emilio https://github.com/mozilla-firefox/firefox/commit/c46a38458f0f https://hg.mozilla.org/integration/autoland/rev/ee6c6ef7d875 part 2 - WebSerial core code (minus IPC and platform-specific code) r=cmartin,saschanaz,webidl,smaug https://github.com/mozilla-firefox/firefox/commit/e7d44898a19f https://hg.mozilla.org/integration/autoland/rev/91f8d9f45973 part 3 - WebSerial IPC code r=nika https://github.com/mozilla-firefox/firefox/commit/c66ce94b1382 https://hg.mozilla.org/integration/autoland/rev/b59b60c49ce3 part 4 - WebSerial Windows-specific code r=cmartin,win-reviewers https://github.com/mozilla-firefox/firefox/commit/8753f0f5691e https://hg.mozilla.org/integration/autoland/rev/2f2f12948147 part 5 - WebSerial Mac/Linux-specific code r=mac-reviewers,Thinker,bradwerth,cmartin https://github.com/mozilla-firefox/firefox/commit/07f7e4573016 https://hg.mozilla.org/integration/autoland/rev/a288f22ac6a3 part 6 - add-on gating and requestPort() dialog for WebSerial r=fluent-reviewers,extension-reviewers,desktop-theme-reviewers,akulyk,bolsson,rpl,emilio https://github.com/mozilla-firefox/firefox/commit/c2e5a0946150 https://hg.mozilla.org/integration/autoland/rev/455115b483a7 part 7 - WebSerial security feature policy (with reftests) r=dveditz,permissions-reviewers,tschuster,dom-worker-reviewers,edenchuang https://github.com/mozilla-firefox/firefox/commit/bddaaef383bf https://hg.mozilla.org/integration/autoland/rev/e094d991414c part 8 - WebSerial USB entitlements for Mac r=mac-reviewers,haik https://github.com/mozilla-firefox/firefox/commit/e27efd1dcee3 https://hg.mozilla.org/integration/autoland/rev/8eb2d1277437 part 9 - WebSerial tests r=rpl,emilio
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1b5502666381 https://hg.mozilla.org/integration/autoland/rev/25374f31767e Revert "Bug 2010930 part 9 - WebSerial tests r=rpl,emilio" for causing multiple wpt failures at WebSerial

Backed out for causing multiple wpt failures at WebSerial
Backout Link
Push with failures
Push with failures
Failure Log
Failure log
Failure log
Failure lines:
TEST-UNEXPECTED-PASS | /serial/idlharness.https.any.html | Serial interface: existence and properties of interface object - expected FAIL
TEST-UNEXPECTED-PASS | /serial/requestPort/reject_opaque_origin.https.html | Calls to Serial APIs from an origin with opaque top origin get blocked. - expected FAIL
TEST-UNEXPECTED-PASS | /serial/getPorts/reject_opaque_origin.https.html | Calls to Serial APIs from an origin with opaque top origin get blocked. - expected FAIL

Flags: needinfo?(gstoll)
Attachment #9541451 - Attachment description: Bug 2010930 part 1 - add WebSerial interfaces to .webidl files r=cmartin! → Bug 2010930 part 1 - add WebSerial interfaces to .webidl files r=cmartin,webidl,smaug,emilio
Attachment #9541452 - Attachment description: Bug 2010930 part 2 - WebSerial core code (minus IPC and platform-specific code) r=cmartin! → Bug 2010930 part 2 - WebSerial core code (minus IPC and platform-specific code) r=cmartin,saschanaz,webidl,smaug
Attachment #9541453 - Attachment description: Bug 2010930 part 3 - WebSerial IPC code r=cmartin! → Bug 2010930 part 3 - WebSerial IPC code r=nika
Attachment #9541455 - Attachment description: Bug 2010930 part 4 - WebSerial Windows-specific code r=cmartin,#win-reviewers → Bug 2010930 part 4 - WebSerial Windows-specific code r=cmartin,win-reviewers
Attachment #9541456 - Attachment description: Bug 2010930 part 5 - WebSerial Mac/Linux-specific code r=#mac-reviewers,stransky! → Bug 2010930 part 5 - WebSerial Mac/Linux-specific code r=mac-reviewers,Thinker,bradwerth,cmartin
Attachment #9541457 - Attachment description: Bug 2010930 part 6 - add-on gating and requestPort() dialog for WebSerial r=cmartin! → Bug 2010930 part 6 - add-on gating and requestPort() dialog for WebSerial r=fluent-reviewers,extension-reviewers,desktop-theme-reviewers,akulyk,bolsson,rpl,emilio
Attachment #9541458 - Attachment description: Bug 2010930 part 7 - WebSerial security feature policy (with reftests) r=#dom-core!,dveditz! → Bug 2010930 part 7 - WebSerial security feature policy (with reftests) r=dveditz,permissions-reviewers,tschuster,dom-worker-reviewers,edenchuang
Attachment #9541459 - Attachment description: Bug 2010930 part 8 - WebSerial USB entitlements for Mac r=#mac-reviewers → Bug 2010930 part 8 - WebSerial USB entitlements for Mac r=mac-reviewers,haik
Attachment #9541460 - Attachment description: Bug 2010930 part 9 - WebSerial tests r=cmartin! → Bug 2010930 part 9 - WebSerial tests r=rpl,emilio
Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8dfe48a33c5a https://hg.mozilla.org/integration/autoland/rev/5a86fd004b08 part 1 - add WebSerial interfaces to .webidl files r=cmartin,webidl,smaug,emilio https://github.com/mozilla-firefox/firefox/commit/cbcfcae79a4c https://hg.mozilla.org/integration/autoland/rev/cea5f8ea0c56 part 2 - WebSerial core code (minus IPC and platform-specific code) r=cmartin,saschanaz,webidl,smaug https://github.com/mozilla-firefox/firefox/commit/20b7e1ca1c90 https://hg.mozilla.org/integration/autoland/rev/c6dc2483afa7 part 3 - WebSerial IPC code r=nika https://github.com/mozilla-firefox/firefox/commit/6ffc38891c50 https://hg.mozilla.org/integration/autoland/rev/9e136382a433 part 4 - WebSerial Windows-specific code r=cmartin,win-reviewers https://github.com/mozilla-firefox/firefox/commit/40304769aa0a https://hg.mozilla.org/integration/autoland/rev/32bbd7e184a9 part 5 - WebSerial Mac/Linux-specific code r=mac-reviewers,Thinker,bradwerth,cmartin https://github.com/mozilla-firefox/firefox/commit/c93f8f139dfd https://hg.mozilla.org/integration/autoland/rev/8f9b504d48a6 part 6 - add-on gating and requestPort() dialog for WebSerial r=fluent-reviewers,extension-reviewers,desktop-theme-reviewers,akulyk,bolsson,rpl,emilio https://github.com/mozilla-firefox/firefox/commit/b6d45de2950f https://hg.mozilla.org/integration/autoland/rev/25f6784571f2 part 7 - WebSerial security feature policy (with reftests) r=dveditz,permissions-reviewers,tschuster,dom-worker-reviewers,edenchuang https://github.com/mozilla-firefox/firefox/commit/94c189140fb6 https://hg.mozilla.org/integration/autoland/rev/5514dfa9509e part 8 - WebSerial USB entitlements for Mac r=mac-reviewers,haik https://github.com/mozilla-firefox/firefox/commit/62f8d4670bc1 https://hg.mozilla.org/integration/autoland/rev/13fd66a96bc5 part 9 - WebSerial tests r=rpl,emilio
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8d0c87bff369 https://hg.mozilla.org/integration/autoland/rev/dd4b85a979fa Revert "Bug 2010930 part 9 - WebSerial tests r=rpl,emilio" for causing build bustages at PosixSerialPlatformService

Backed out for causing build bustages at PosixSerialPlatformService
Backout Link
Push with failures
Failure Log
Failure line /builds/worker/checkouts/gecko/dom/webserial/PosixSerialPlatformService.cpp:X:33: error: format specifies type 'unsigned int' but the argument has type 'ParityType' (aka 'mozilla::dom::ParityType') [-Werror,-Wformat]

Flags: needinfo?(gstoll)
Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c01eabc928d3 https://hg.mozilla.org/integration/autoland/rev/fccfbc51cebf part 1 - add WebSerial interfaces to .webidl files r=cmartin,webidl,smaug,emilio https://github.com/mozilla-firefox/firefox/commit/c4aa39fafbbe https://hg.mozilla.org/integration/autoland/rev/f62e181dbaee part 2 - WebSerial core code (minus IPC and platform-specific code) r=cmartin,saschanaz,webidl,smaug https://github.com/mozilla-firefox/firefox/commit/f67413d6ac36 https://hg.mozilla.org/integration/autoland/rev/9183603f87ae part 3 - WebSerial IPC code r=nika https://github.com/mozilla-firefox/firefox/commit/9c18d777429f https://hg.mozilla.org/integration/autoland/rev/e980bdce7091 part 4 - WebSerial Windows-specific code r=cmartin,win-reviewers https://github.com/mozilla-firefox/firefox/commit/2715a9965133 https://hg.mozilla.org/integration/autoland/rev/ea3ae5901f36 part 5 - WebSerial Mac/Linux-specific code r=mac-reviewers,Thinker,bradwerth,cmartin https://github.com/mozilla-firefox/firefox/commit/6683a51e8fb6 https://hg.mozilla.org/integration/autoland/rev/64f5234a111b part 6 - add-on gating and requestPort() dialog for WebSerial r=fluent-reviewers,extension-reviewers,desktop-theme-reviewers,akulyk,bolsson,rpl,emilio https://github.com/mozilla-firefox/firefox/commit/1d9bcf8e6225 https://hg.mozilla.org/integration/autoland/rev/b33fe3ae4a00 part 7 - WebSerial security feature policy (with reftests) r=dveditz,permissions-reviewers,tschuster,dom-worker-reviewers,edenchuang https://github.com/mozilla-firefox/firefox/commit/3961024db37a https://hg.mozilla.org/integration/autoland/rev/9ee60c32d14e part 8 - WebSerial USB entitlements for Mac r=mac-reviewers,haik https://github.com/mozilla-firefox/firefox/commit/696853f899a3 https://hg.mozilla.org/integration/autoland/rev/2a973b79e979 part 9 - WebSerial tests r=rpl,emilio
Duplicate of this bug: 2016732
Duplicate of this bug: 2016736
Duplicate of this bug: 2021099
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ac245506c59f https://hg.mozilla.org/integration/autoland/rev/b03beae34dc6 Revert "Bug 2010930 part 9 - WebSerial tests r=rpl,emilio" for causing mochitest failures @ test_serial_insecurecontext.html
Flags: needinfo?(gstoll)
Flags: needinfo?(gstoll)
Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0958df31ce99 https://hg.mozilla.org/integration/autoland/rev/f0cd89507c18 part 1 - add WebSerial interfaces to .webidl files r=cmartin,webidl,smaug,emilio https://github.com/mozilla-firefox/firefox/commit/910861a445ac https://hg.mozilla.org/integration/autoland/rev/a02dc1d17e61 part 2 - WebSerial core code (minus IPC and platform-specific code) r=cmartin,saschanaz,webidl,smaug https://github.com/mozilla-firefox/firefox/commit/d8db0925f647 https://hg.mozilla.org/integration/autoland/rev/7b0ea949d6a0 part 3 - WebSerial IPC code r=nika https://github.com/mozilla-firefox/firefox/commit/ee1f4bd27f02 https://hg.mozilla.org/integration/autoland/rev/8a6b72a9cc7e part 4 - WebSerial Windows-specific code r=cmartin,win-reviewers https://github.com/mozilla-firefox/firefox/commit/3ffe160b7e33 https://hg.mozilla.org/integration/autoland/rev/5d66c15c7954 part 5 - WebSerial Mac/Linux-specific code r=mac-reviewers,Thinker,bradwerth,cmartin https://github.com/mozilla-firefox/firefox/commit/98f46b8445c3 https://hg.mozilla.org/integration/autoland/rev/7e91329fdae7 part 6 - add-on gating and requestPort() dialog for WebSerial r=fluent-reviewers,extension-reviewers,desktop-theme-reviewers,akulyk,bolsson,rpl,emilio https://github.com/mozilla-firefox/firefox/commit/f773928f384f https://hg.mozilla.org/integration/autoland/rev/7cd20c2df724 part 7 - WebSerial security feature policy (with reftests) r=dveditz,permissions-reviewers,tschuster,dom-worker-reviewers,edenchuang https://github.com/mozilla-firefox/firefox/commit/5a6091aab537 https://hg.mozilla.org/integration/autoland/rev/e13d5ef14f33 part 8 - WebSerial USB entitlements for Mac r=mac-reviewers,haik https://github.com/mozilla-firefox/firefox/commit/68c2decfe20b https://hg.mozilla.org/integration/autoland/rev/bdabef4146a2 part 9 - WebSerial tests r=rpl,emilio
Regressions: 2030850
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d4a0db7133ec https://hg.mozilla.org/integration/autoland/rev/bad587d7d94e Revert "Bug 2010930 part 9 - WebSerial tests r=rpl,emilio" for causing webserial related mochitest failures
Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/65e083ebe6e8 https://hg.mozilla.org/integration/autoland/rev/963bb3fde922 part 1 - add WebSerial interfaces to .webidl files r=cmartin,webidl,smaug,emilio https://github.com/mozilla-firefox/firefox/commit/f737290616c0 https://hg.mozilla.org/integration/autoland/rev/b201df33ac88 part 2 - WebSerial core code (minus IPC and platform-specific code) r=cmartin,saschanaz,webidl,smaug https://github.com/mozilla-firefox/firefox/commit/cc912aa78425 https://hg.mozilla.org/integration/autoland/rev/0a6ccb037f58 part 3 - WebSerial IPC code r=nika https://github.com/mozilla-firefox/firefox/commit/e682213c6296 https://hg.mozilla.org/integration/autoland/rev/4032625198b1 part 4 - WebSerial Windows-specific code r=cmartin,win-reviewers https://github.com/mozilla-firefox/firefox/commit/f8ce96045f93 https://hg.mozilla.org/integration/autoland/rev/1e1ab72ac209 part 5 - WebSerial Mac/Linux-specific code r=mac-reviewers,Thinker,bradwerth,cmartin https://github.com/mozilla-firefox/firefox/commit/5eeec3718b49 https://hg.mozilla.org/integration/autoland/rev/9e036b4a4aa2 part 6 - add-on gating and requestPort() dialog for WebSerial r=fluent-reviewers,extension-reviewers,desktop-theme-reviewers,akulyk,bolsson,rpl,emilio https://github.com/mozilla-firefox/firefox/commit/d044fc30199e https://hg.mozilla.org/integration/autoland/rev/6f8034414b93 part 7 - WebSerial security feature policy (with reftests) r=dveditz,permissions-reviewers,tschuster,dom-worker-reviewers,edenchuang https://github.com/mozilla-firefox/firefox/commit/9315cd8184a3 https://hg.mozilla.org/integration/autoland/rev/17ed4310d687 part 8 - WebSerial USB entitlements for Mac r=mac-reviewers,haik https://github.com/mozilla-firefox/firefox/commit/ae2b22c980ba https://hg.mozilla.org/integration/autoland/rev/c68a8640b4c3 part 9 - WebSerial tests r=rpl,emilio
Flags: needinfo?(gstoll)
Blocks: 2030944
Regressions: 2031047
Regressions: 2031654
Regressions: 2032631
Depends on: 2032667
Blocks: 2032667
No longer depends on: 2032667
Regressions: 2033399
QA Whiteboard: [qa-triage-done-c152/b151]
Regressions: 2034138
Regressions: 2033188

(In reply to Pulsebot from comment #15)

Pushed by gstoll@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/8dfe48a33c5a
https://hg.mozilla.org/integration/autoland/rev/5a86fd004b08
part 1 - add WebSerial interfaces to .webidl files
r=cmartin,webidl,smaug,emilio
https://github.com/mozilla-firefox/firefox/commit/cbcfcae79a4c
https://hg.mozilla.org/integration/autoland/rev/cea5f8ea0c56
part 2 - WebSerial core code (minus IPC and platform-specific code)
r=cmartin,saschanaz,webidl,smaug
https://github.com/mozilla-firefox/firefox/commit/20b7e1ca1c90
https://hg.mozilla.org/integration/autoland/rev/c6dc2483afa7
part 3 - WebSerial IPC code r=nika
https://github.com/mozilla-firefox/firefox/commit/6ffc38891c50
https://hg.mozilla.org/integration/autoland/rev/9e136382a433
part 4 - WebSerial Windows-specific code r=cmartin,win-reviewers
https://github.com/mozilla-firefox/firefox/commit/40304769aa0a
https://hg.mozilla.org/integration/autoland/rev/32bbd7e184a9
part 5 - WebSerial Mac/Linux-specific code
r=mac-reviewers,Thinker,bradwerth,cmartin
https://github.com/mozilla-firefox/firefox/commit/c93f8f139dfd
https://hg.mozilla.org/integration/autoland/rev/8f9b504d48a6
part 6 - add-on gating and requestPort() dialog for WebSerial
r=fluent-reviewers,extension-reviewers,desktop-theme-reviewers,akulyk,
bolsson,rpl,emilio
https://github.com/mozilla-firefox/firefox/commit/b6d45de2950f
https://hg.mozilla.org/integration/autoland/rev/25f6784571f2
part 7 - WebSerial security feature policy (with reftests)
r=dveditz,permissions-reviewers,tschuster,dom-worker-reviewers,edenchuang
https://github.com/mozilla-firefox/firefox/commit/94c189140fb6
https://hg.mozilla.org/integration/autoland/rev/5514dfa9509e
part 8 - WebSerial USB entitlements for Mac r=mac-reviewers,haik
https://github.com/mozilla-firefox/firefox/commit/62f8d4670bc1
https://hg.mozilla.org/integration/autoland/rev/13fd66a96bc5
part 9 - WebSerial tests r=rpl,emilio

Perfherder has detected a build_metrics performance change from push 13fd66a96bc5936446a4247293996a9ef66973bb.

No action is required from the author; this comment is provided for informational purposes only.

Regression Test Platform Options Absolute values [old vs new]
0.18% installer size osx-nightlyasrelease nightly nightly-as-release 116,730,000.25 -> 116,936,607.58

Need Help or Information?

If you have any questions, please reach out to afinder@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

(FYI that last comment looks like a duplicate of bug 2034138)

Regressions: 2042781
Regressions: 2043241
Depends on: 2048233
Component: DOM: Device Interfaces → Dom: Web Serial
Keywords: perf-alert
Type: enhancement → defect
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: