Bug 1342051 - clear css grid pattern cache when destroying highlighter;r=zer0

MozReview-Commit-ID: 5LpjjzjZfs3

--HG--
extra : rebase_source : f23974994ff8d10b61e4b6f79dffb69eb985822a
This commit is contained in:
Julian Descottes 2017-02-27 18:59:49 +01:00
Родитель 51cb975bac
Коммит d539aebf32
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -30,7 +30,7 @@ add_task(function* () {
let target = TargetFactory.forTab(gBrowser.selectedTab);
yield gDevTools.closeToolbox(target);
refreshTab(gBrowser.selectedTab);
yield refreshTab(gBrowser.selectedTab);
info("Check that the grid highlighter can be displayed after reloading the page");
yield checkGridHighlighter();

Просмотреть файл

@ -241,6 +241,9 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, {
pageListenerTarget.removeEventListener("pagehide", this.onPageHide);
this.markup.destroy();
// Clear the pattern cache to avoid dead object exceptions (Bug 1342051).
this._clearCache();
AutoRefreshHighlighter.prototype.destroy.call(this);
},