Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Remove --use-legacy and --use-uv
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 11, 2011
1 parent 4f59041 commit c8dbaf5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
7 changes: 1 addition & 6 deletions src/node.cc
Expand Up @@ -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
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down
28 changes: 0 additions & 28 deletions src/node.js
Expand Up @@ -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
Expand Down Expand Up @@ -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 = {};
Expand All @@ -475,8 +452,6 @@
NativeModule._cache = {};

NativeModule.require = function(id) {
id = translateId(id);

if (id == 'native_module') {
return NativeModule;
}
Expand All @@ -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];
}

Expand Down

0 comments on commit c8dbaf5

Please sign in to comment.