Bug 1335730 - delete the map entry when a window unloads and is tracked by the FinderHighlighter. r?jaws
MozReview-Commit-ID: 7vJ4HQwNnPp
--- a/toolkit/modules/FinderHighlighter.jsm
+++ b/toolkit/modules/FinderHighlighter.jsm
@@ -473,22 +473,20 @@ FinderHighlighter.prototype = {
* When the current page is refreshed or navigated away from, the CanvasFrame
* contents is not valid anymore, i.e. all anonymous content is destroyed.
* We need to clear the references we keep, which'll make sure we redraw
* everything when the user starts to find in page again.
*/
onLocationChange() {
let window = this.finder._getWindow();
this.hide(window);
- let dict = this.getForWindow(window);
this.clear(window);
- dict.currentFoundRange = dict.lastIteratorParams = dict.previousFoundRange =
- dict.previousUpdatedRange = null;
+ this._removeRangeOutline(window);
- this._removeRangeOutline(window);
+ gWindows.delete(window.top);
},
/**
* When `kModalHighlightPref` pref changed during a session, this callback is
* invoked. When modal highlighting is turned off, we hide the CanvasFrame
* contents.
*
* @param {Boolean} useModalHighlight