From c8dbaf579c0a8a479183ca9036be0abfda72a33d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 11 Oct 2011 14:38:38 -0700 Subject: [PATCH] Remove --use-legacy and --use-uv --- src/node.cc | 7 +------ src/node.js | 28 ---------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/node.cc b/src/node.cc index d55e0cbff..af35c67ee 100644 --- a/src/node.cc +++ b/src/node.cc @@ -136,8 +136,6 @@ static bool need_tick_cb; static Persistent tick_callback_sym; -static bool use_uv = true; - #ifdef OPENSSL_NPN_NEGOTIATED static bool use_npn = true; #else @@ -2076,7 +2074,7 @@ static Handle 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(""); - } else if (!strcmp(arg, "--use-legacy")) { - use_uv = false; - argv[i] = const_cast(""); } else if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) { printf("%s\n", NODE_VERSION); exit(0); diff --git a/src/node.js b/src/node.js index e9e056683..93fc6b5fb 100644 --- a/src/node.js +++ b/src/node.js @@ -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]; } -- 2.34.1