Remove --use-legacy and --use-uv

This commit is contained in:
Ryan Dahl
2011-10-11 14:38:38 -07:00
parent 4f59041990
commit c8dbaf579c
2 changed files with 1 additions and 34 deletions

View File

@@ -136,8 +136,6 @@ static bool need_tick_cb;
static Persistent<String> tick_callback_sym;
static bool use_uv = true;
#ifdef OPENSSL_NPN_NEGOTIATED
static bool use_npn = true;
#else
@@ -2076,7 +2074,7 @@ static Handle<Object> GetFeatures() {
#endif
);
obj->Set(String::NewSymbol("uv"), Boolean::New(use_uv));
obj->Set(String::NewSymbol("uv"), True());
obj->Set(String::NewSymbol("ipv6"), True()); // TODO ping libuv
obj->Set(String::NewSymbol("tls_npn"), Boolean::New(use_npn));
obj->Set(String::NewSymbol("tls_sni"), Boolean::New(use_sni));
@@ -2348,9 +2346,6 @@ static void ParseArgs(int argc, char **argv) {
if (strstr(arg, "--debug") == arg) {
ParseDebugOpt(arg);
argv[i] = const_cast<char*>("");
} else if (!strcmp(arg, "--use-legacy")) {
use_uv = false;
argv[i] = const_cast<char*>("");
} else if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) {
printf("%s\n", NODE_VERSION);
exit(0);

View File

@@ -30,18 +30,6 @@
var EventEmitter;
function startup() {
if ('NODE_USE_UV' in process.env) {
process.features.uv = process.env.NODE_USE_UV != '0';
}
// make sure --use-uv is propagated to child processes
if (process.features.uv) {
process.env.NODE_USE_UV = '1';
} else {
delete process.env.NODE_USE_UV;
}
EventEmitter = NativeModule.require('events').EventEmitter;
process.__proto__ = EventEmitter.prototype;
process.EventEmitter = EventEmitter; // process.EventEmitter is deprecated
@@ -453,18 +441,7 @@
var Script = process.binding('evals').NodeScript;
var runInThisContext = Script.runInThisContext;
// A special hook to test the new platform layer. Use the command-line
// flag --use-uv to enable the libuv backend instead of the legacy
// backend.
function translateId(id) {
switch (id) {
default:
return id;
}
}
function NativeModule(id) {
id = translateId(id);
this.filename = id + '.js';
this.id = id;
this.exports = {};
@@ -475,8 +452,6 @@
NativeModule._cache = {};
NativeModule.require = function(id) {
id = translateId(id);
if (id == 'native_module') {
return NativeModule;
}
@@ -501,17 +476,14 @@
};
NativeModule.getCached = function(id) {
id = translateId(id);
return NativeModule._cache[id];
}
NativeModule.exists = function(id) {
id = translateId(id);
return (id in NativeModule._source);
}
NativeModule.getSource = function(id) {
id = translateId(id);
return NativeModule._source[id];
}