From 7a72885edeb002fc982b5125f4c64df2dbd0430d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herbert=20Voj=C4=8D=C3=ADk?= Date: Wed, 28 Apr 2010 22:51:16 +0200 Subject: [PATCH] process.evalcx has a deprecation message. --- src/node.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index d745588..ef3441e 100644 --- a/src/node.js +++ b/src/node.js @@ -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() -- 2.7.4