mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
process.evalcx has a deprecation message.
This commit is contained in:
1 parent
7e4c1285dc
commit
7a72885ede
1 file changed
+9
-1
+9
-1
@@ -29,7 +29,15 @@ process.assert = function (x, msg) {
|
||||
if (!x) throw new Error(msg || "assertion error");
|
||||
};
|
||||
|
||||
process.evalcx = process.binding('evals').Script.runInNewContext;
|
||||
var evalcxMsg;
|
||||
process.evalcx = function () {
|
||||
if (!evalcxMsg) {
|
||||
process.binding('stdio').writeError(evalcxMsg =
|
||||
"process.evalcx is deprecated. Use Script.runInNewContext instead.\n");
|
||||
}
|
||||
return process.binding('evals').Script
|
||||
.runInNewContext.apply(null, arguments);
|
||||
};
|
||||
|
||||
// nextTick()
|
||||
|
||||
|
||||
Reference in new issue
Block a user