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

Commit

Permalink
Browse files Browse the repository at this point in the history
Add process.features.debug; fixes simple/test-executable-path.js
  • 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
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
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.