FilterBar's maybeUpdateLayout is called when the Console is being destroyed
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox71 fixed)
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
Details
Attachments
(1 file)
Bug 1579422 - Disconnect FilterBar resize observer when observed node is disconnected. r=jdescottes.
47 bytes,
text/x-phabricator-request
|
Details | Review |
While testing https://phabricator.services.mozilla.com/D44109 Julian found that we are dispatching an action after the destroy function was called.
This is done in the FilterBar component, where the ResizeObserver we set is triggered because (I think), the node is detached, and the width is then 0, which triggers a layout change.
it doesn't really show up in profile, but I guess it's better if we disconnect the resizeObserver if the node isn't connected anymore, and not fire an action.
Assignee | ||
Comment 1•5 years ago
|
||
Since we don't properly unmount the Console React app,
FilterBar's componentWillUnmount is never called.
This was where we planned to disconnect the resize observer,
but it was in fact never called.
So what we do in this patch instead is in the resize observer
callback, check if the observed node is connected, and if
it's not, we disconnect the resize observer.
This prevent the console from dispatching an action, that
may slow down closing the console.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6d14b542c70 Disconnect FilterBar resize observer when observed node is disconnected. r=jdescottes.
Comment 3•5 years ago
|
||
bugherder |
Description
•