Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit c8dbaf579c0a8a479183ca9036be0abfda72a33d 1 parent 4f59041
@ry ry authored
Showing with 1 addition and 34 deletions.
  1. +1 −6 src/node.cc
  2. +0 −28 src/node.js
View
7 src/node.cc
@@ -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
28 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];
}
Please sign in to comment.
Something went wrong with that request. Please try again.