Run stopTrackingMouseOverVideos inside of PictureInPictureChild's willDestroy
Categories
(Toolkit :: Video/Audio Controls, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Inside of PictureInPictureChild's willDestroy, we call removeMouseButtonListeners();
, which gets rid of all of the event listeners that we use to detect clicks on the page to check for clicking on the PiP toggle.
There are, however, other event listeners that aren't being removed, and more importantly, there are DeferredTask's that aren't being disarmed and torn down. This is causing us to sometimes log error messages to the console when navigating away, because the JSWindowActorChild has gone away by the time the DeferredTask runs.
So in willDestroy
, we should call stopTrackingMouseOverVideos
instead, which also shuts down the DeferredTask's (and also calls removeMouseButtonListeners
).
Assignee | ||
Comment 1•5 years ago
|
||
Inside of PictureInPictureChild's willDestroy, we were calling removeMouseButtonListeners();,
which gets rid of all of the event listeners that we use to detect clicks on the page to
check for clicking on the PiP toggle.
There are, however, other event listeners that weren't being removed, and more importantly,
there were DeferredTask's that weren't being disarmed and torn down. This was causing us to
sometimes log error messages to the console when navigating between pages, because the
JSWindowActorChild has gone away by the time the DeferredTask runs.
So now we call stopTrackingMouseOverVideos instead, which also shuts down the DeferredTask's
(and also calls removeMouseButtonListeners).
Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:mconley, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 5•5 years ago
|
||
bugherder |
Description
•