From 30c24f8a5c6d5e86a626fa3665705f827160d2da Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 5 Jul 2011 14:21:29 -0400 Subject: [PATCH] Move QI inside try-catch. --HG-- extra : rebase_source : 755489b7f3bef0f51dce3233b0ef4ce0688d4a1b --- common/content/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/editor.js b/common/content/editor.js index 4a0ff442..555c99b0 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -398,9 +398,9 @@ var Editor = Module("editor", { elem = dactyl.focusedElement || document.commandDispatcher.focusedWindow; dactyl.assert(elem); - if (elem instanceof Element) - return elem.QueryInterface(Ci.nsIDOMNSEditableElement).editor; try { + if (elem instanceof Element) + return elem.QueryInterface(Ci.nsIDOMNSEditableElement).editor; return elem.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIEditingSession) .getEditorForWindow(elem);