Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add process.features.debug; fixes simple/test-executable-path.js

  • Loading branch information...
commit 52a40e0fd5f59b295fe9bb74e7f14b35ca4bf96c 1 parent 2876141
@ry ry authored
Showing with 9 additions and 1 deletion.
  1. +8 −0 src/node.cc
  2. +1 −1  test/simple/test-executable-path.js
View
8 src/node.cc
@@ -2084,6 +2084,14 @@ static Handle<Object> GetFeatures() {
HandleScope scope;
Local<Object> obj = Object::New();
+ obj->Set(String::NewSymbol("debug"),
+#if defined(DEBUG) && DEBUG
+ True()
+#else
+ False()
+#endif
+ );
+
obj->Set(String::NewSymbol("uv"), Boolean::New(use_uv));
obj->Set(String::NewSymbol("http1"), Boolean::New(use_http1));
obj->Set(String::NewSymbol("ipv6"), True()); // TODO ping libuv
View
2  test/simple/test-executable-path.js
@@ -23,7 +23,7 @@ var common = require('../common');
var assert = require('assert');
var path = require('path');
-var isDebug = (process.version.indexOf('debug') >= 0);
+var isDebug = process.features.debug;
var debugPath = path.normalize(path.join(__dirname, '..', '..',
'out', 'Debug', 'node'));
Please sign in to comment.
Something went wrong with that request. Please try again.