Bug 1008450 - Bail on _findIterator when we lack a body node. r=mikedeboer

This commit is contained in:
Adam Dane [:hobophobe] 2014-05-14 15:16:03 -05:00
parent 0fe2edac9f
commit c5d02a1e51

View File

@ -358,6 +358,9 @@ Finder.prototype = {
let body = (doc instanceof Ci.nsIDOMHTMLDocument && doc.body) ?
doc.body : doc.documentElement;
if (!body)
return;
let searchRange = doc.createRange();
searchRange.selectNodeContents(body);