# HG changeset patch
# User Rob Cornish <
jrmco...@gmail.com>
# Date 1364036315 -39600
# Node ID 47664edbcbcd2ddd451ea57d32b3e77b244bd632
# Parent 1de75bbedeeecfb277299d8a6aa837cac549037e
Fixed view-source-externally bug.
Fixed a bug which caused sanitizer.getContext() to fail when passed the
top-level document node, which in particular broke Buffer.viewSourceExternally().
diff -r 1de75bbedeee -r 47664edbcbcd common/modules/sanitizer.jsm
--- a/common/modules/sanitizer.jsm Sun Mar 17 14:34:24 2013 -0700
+++ b/common/modules/sanitizer.jsm Sat Mar 23 21:58:35 2013 +1100
@@ -302,7 +302,7 @@
return null;
if (thing instanceof Ci.nsIDOMNode)
- thing = thing.ownerDocument;
+ thing = thing.ownerDocument || thing;
if (thing instanceof Ci.nsIDOMDocument)
thing = thing.defaultView;
if (thing instanceof Ci.nsIInterfaceRequestor)