Skip to content

v1.2.1 β€” Observer leak fix

Latest

Choose a tag to compare

@aashutoshrathi aashutoshrathi released this 07 Aug 08:31
4c711eb

πŸ› Bug fix

A MutationObserver was left running for every client-side navigation, so the extension got steadily heavier the longer a tab stayed open.

What changed

  • initCherryPicker() now retires the previous page's observer before registering a new one, instead of stacking them.
  • The observer is also disconnected entirely when navigating to a page with no commits on it, which never happened before.

Measured on a live GitLab commits page, counting observers that are actively watching the document:

Scenario v1.2 v1.2.1
6 client-side navigations between commit pages 6 live 1 live
then navigating to a non-commit page 6 live 0 live

Most noticeable on GitLab, whose merge request tabs switch client-side far more than GitHub's do. No change to cherry placement or SHA extraction.

Install

Full Changelog: v1.2...v1.2.1