1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-20 17:25:46 +01:00

Fix :js context on Minefield.

This commit is contained in:
Kris Maglione
2011-09-17 00:08:02 -04:00
parent 423767238b
commit 057600d780
7 changed files with 66 additions and 20 deletions

View File

@@ -475,7 +475,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
userEval: function (str, context, fileName, lineNumber) {
let ctxt;
if (jsmodules.__proto__ != window)
if (jsmodules.__proto__ != window && jsmodules.__proto__ != XPCNativeWrapper(window) &&
jsmodules.isPrototypeOf(context))
str = "with (window) { with (modules) { (this.eval || eval)(" + str.quote() + ") } }";
let info = contexts.context;
@@ -1218,8 +1219,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
util.reportError(error);
return;
}
if (error.result == Cr.NS_BINDING_ABORTED)
return;
if (echo)
dactyl.echoerr(error, commandline.FORCE_SINGLELINE);
else