From fe998eca06fc435dd4e53df902b8db6bf6f3f701 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 21 Apr 2013 19:57:28 -0700 Subject: [PATCH] Fix harmless error when document is unloaded immediately after exiting hint mode. --- common/content/hints.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/content/hints.js b/common/content/hints.js index 51b7ecfe..a9154e88 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -490,6 +490,10 @@ var HintSession = Class("HintSession", CommandMode, { let n = 5; (function next() { + if (Cu.isDeadWrapper && Cu.isDeadWrapper(elem)) + // Hint document has been unloaded. + return; + let hinted = n || this.validHints.some(function (h) h.elem === elem); if (!hinted) hints.setClass(elem, null);