mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-08 03:44:14 +01:00
Use sandboxes for all JS contexts, to fix breakage, now that we have CPG anyway.
--HG-- extra : rebase_source : 0eb9d8c6a8ee533d6e12d71372554163f9479cf2
This commit is contained in:
@@ -132,17 +132,15 @@ var Modules = function Modules(window) {
|
||||
if (normal)
|
||||
return create(proto);
|
||||
|
||||
if (services.has("dactyl") && services.dactyl.createGlobal)
|
||||
var sandbox = services.dactyl.createGlobal();
|
||||
else
|
||||
sandbox = Components.utils.Sandbox(window, { sandboxPrototype: proto || modules,
|
||||
sandboxName: name || ("Dactyl Sandbox " + ++_id),
|
||||
wantXrays: false });
|
||||
sandbox = Components.utils.Sandbox(window, { sandboxPrototype: proto || modules,
|
||||
sandboxName: name || ("Dactyl Sandbox " + ++_id),
|
||||
wantXrays: false });
|
||||
|
||||
// Hack:
|
||||
// sandbox.Object = jsmodules.Object;
|
||||
sandbox.File = jsmodules.File;
|
||||
sandbox.Math = jsmodules.Math;
|
||||
sandbox.Set = jsmodules.Set;
|
||||
sandbox.__proto__ = proto || modules;
|
||||
return sandbox;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user