Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-11-22 02:22:08 +0300
committerRyan Dahl <ry@tinyclouds.org>2010-11-22 02:22:08 +0300
commitf6479f2fb62daf1f4d46e0ff4d6012995d079cd1 (patch)
tree30b6d1083d8cdd5684b85c3241fabcf4b69bd5d7 /src
parenta16b3c3148554ec07ba3dd5581a6b1d2e4d62752 (diff)
Print deprecation warning on process.compile
Diffstat (limited to 'src')
-rw-r--r--src/node.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/node.cc b/src/node.cc
index 46c56e2b344..f87e91333da 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -1318,14 +1318,24 @@ Handle<Value> DLOpen(const v8::Arguments& args) {
}
+// TODO remove me before 0.4
Handle<Value> Compile(const Arguments& args) {
HandleScope scope;
+
if (args.Length() < 2) {
return ThrowException(Exception::TypeError(
String::New("needs two arguments.")));
}
+ static bool shown_error_message = false;
+
+ if (!shown_error_message) {
+ shown_error_message = true;
+ fprintf(stderr, "(node) process.compile should not be used. "
+ "Use require('vm').runInThisContext instead.\n");
+ }
+
Local<String> source = args[0]->ToString();
Local<String> filename = args[1]->ToString();