Skip to content

Commit

Permalink
Add process.features.debug; fixes simple/test-executable-path.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Aug 24, 2011
1 parent 2876141 commit 52a40e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/simple/test-executable-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 52a40e0

Please sign in to comment.