1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 02:54:13 +01:00

Fix minor bugs and remove dead code.

--HG--
extra : rebase_source : 2b724d92734c547be0fc808a4e39fde0bc339542
This commit is contained in:
Kris Maglione
2013-07-06 14:49:44 -07:00
parent 003b76eb2c
commit 758a4806c2
2 changed files with 8 additions and 2 deletions

View File

@@ -1144,7 +1144,10 @@ var Buffer = Module("Buffer", {
let ext = uri.fileExtension || "txt";
if (doc.contentType)
ext = services.mime.getPrimaryExtension(doc.contentType, ext);
try {
ext = services.mime.getPrimaryExtension(doc.contentType, ext);
}
catch (e) {}
if (!isString(doc))
return io.withTempFiles(function (temp) {

View File

@@ -125,7 +125,7 @@ var DOM = Class("DOM", {
if (val instanceof Ci.nsIDOMNode)
return val;
if (typeof val == "xml" || DOM.isJSONXML(val)) {
if (DOM.isJSONXML(val)) {
val = dom.constructor(val, dom.document);
if (container)
container[idx] = val[0];
@@ -140,6 +140,9 @@ var DOM = Class("DOM", {
return val;
}
if (DOM.isJSONXML(val))
val = (function () this).bind(val);
if (callable(val))
return this.each(function (elem, i) {
util.withProperErrors(fn, this, munge(val.call(this, elem, i)), elem, i);