зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2963382a49
Коммит
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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче