Closed Bug 1748644 Opened 2 years ago Closed 2 years ago

A closed MIDI port remains open for some time on Linux

Categories

(Core :: DOM: Device Interfaces, defect)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: gsvelto, Assigned: gsvelto)

References

Details

Attachments

(1 file)

STR:

  1. Open https://mikatahara.github.io/MidiMonitor/ or another simple page reading MIDI inputs
  2. Allow the permission request and remember it so that we won't be prompted again
  3. Push some keys on your device to create a few events
  4. Reload the page
  5. Push some keys again

The expected behavior at this point is that the reloaded page will get the events from the device. What happens instead is that not only the page receives the events but messages like this show up in the log:

[Child 26034, Main Thread] WARNING: No document available to send MIDIMessageEvent to!: file /home/gsvelto/projects/mozilla-central/dom/midi/MIDIInput.cpp:42

This means that the callback that we have registered with the port here is still being called. This shouldn't happen as the relevant midir connection should have already being closed (and I've verified that we're calling midir_impl_close() on the port when re-loading the page).

This is an issue which I have experienced on Linux but which I suspect might happen on other platforms too.

Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Pushed by gsvelto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/74f95111f7f4
MIDI ports should stop responding to parent message once they've been disconnected from the document that owned them r=smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: