mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1489455 - Replace evalInSandbox from httpd.js r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D5243 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2963382a49
commit
dae6ac4ec4
@ -2797,7 +2797,12 @@ ServerHandler.prototype =
|
||||
// getting the line number where we evaluate the SJS file. Don't
|
||||
// separate these two lines!
|
||||
var line = new Error().lineNumber;
|
||||
Cu.evalInSandbox(sis.read(file.fileSize), s, "latest");
|
||||
let uri = Cc["@mozilla.org/network/io-service;1"]
|
||||
.getService(Ci.nsIIOService)
|
||||
.newFileURI(file);
|
||||
let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
|
||||
.getService(Ci.mozIJSSubScriptLoader);
|
||||
scriptLoader.loadSubScript(uri.spec, s);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user