Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Use nodejs vm module instead of undocumented internal API call.
Browse files Browse the repository at this point in the history
  • Loading branch information
henvic committed Oct 15, 2014
1 parent 4ee0dac commit d909e5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion closure/goog/bootstrap/nodejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

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


/**
Expand All @@ -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);
}

Expand Down

0 comments on commit d909e5a

Please sign in to comment.