Skip to content
Permalink
Browse files

Use nodejs vm module instead of undocumented internal API call.

  • Loading branch information...
henvic committed Oct 15, 2014
1 parent 4ee0dac commit d909e5aa4b71923d72c15305f70d01a976c9947f
Showing with 2 additions and 1 deletion.
  1. +2 −1 closure/goog/bootstrap/nodejs.js
@@ -42,6 +42,7 @@

var fs = require('fs');
var path = require('path');
var vm = require('vm');


/**
@@ -66,7 +67,7 @@ global.CLOSURE_IMPORT_SCRIPT = function(src) {

// Declared here so it can be used to require base.js
function nodeGlobalRequire(file) {
process.binding('evals').NodeScript.runInThisContext.call(
vm.Script.runInThisContext.call(
global, fs.readFileSync(file), file);
}

0 comments on commit d909e5a

Please sign in to comment.
You can’t perform that action at this time.