Skip to content

Commit adec544

Browse files
committed
Revert "Expose the V8 debug object process.debug"
This reverts commit d9fbb8a.
1 parent 31b5940 commit adec544

File tree

4 files changed

+12
-44
lines changed

4 files changed

+12
-44
lines changed

lib/module.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ Module.prototype._compile = function (content, filename) {
420420
+ "\n});";
421421

422422
var compiledWrapper = process.compile(wrapper, filename);
423-
if (filename === process.argv[1] && process._debugWaitConnect) {
424-
process.debug.setBreakPoint(compiledWrapper, 0, 0);
423+
if (filename === process.argv[1] && global.v8debug) {
424+
global.v8debug.Debug.setBreakPoint(compiledWrapper, 0, 0);
425425
}
426426
compiledWrapper.apply(self.exports, [self.exports, require, self, filename, dirname]);
427427
} else {

src/node.cc

+10-12
Original file line numberDiff line numberDiff line change
@@ -1631,9 +1631,6 @@ static void Load(int argc, char *argv[]) {
16311631
// who do not like how 'src/node.js' setups the module system but do like
16321632
// Node's I/O bindings may want to replace 'f' with their own function.
16331633

1634-
process->Set(String::NewSymbol("_debugWaitConnect"),
1635-
node::debug_wait_connect ? True() : False());
1636-
16371634
Local<Value> args[1] = { Local<Value>::New(process) };
16381635

16391636
f->Call(global, 1, args);
@@ -1744,15 +1741,16 @@ int main(int argc, char *argv[]) {
17441741
int v8argc = node::option_end_index;
17451742
char **v8argv = argv;
17461743

1747-
// v8argv is a copy of argv up to the script file argument +2
1748-
// to expose the v8 debugger js object so that module.js can set
1749-
// a breakpoint on the first line of the startup script
1750-
v8argc += 2;
1751-
v8argv = new char*[v8argc];
1752-
memcpy(v8argv, argv, sizeof(argv) * node::option_end_index);
1753-
v8argv[node::option_end_index] = const_cast<char*>("--expose_debug_as");
1754-
v8argv[node::option_end_index + 1] = const_cast<char*>("v8debug");
1755-
1744+
if (node::debug_wait_connect) {
1745+
// v8argv is a copy of argv up to the script file argument +2 if --debug-brk
1746+
// to expose the v8 debugger js object so that module.js can set
1747+
// a breakpoint on the first line of the startup script
1748+
v8argc += 2;
1749+
v8argv = new char*[v8argc];
1750+
memcpy(v8argv, argv, sizeof(argv) * node::option_end_index);
1751+
v8argv[node::option_end_index] = const_cast<char*>("--expose_debug_as");
1752+
v8argv[node::option_end_index + 1] = const_cast<char*>("v8debug");
1753+
}
17561754
V8::SetFlagsFromCommandLine(&v8argc, v8argv, false);
17571755

17581756
// Ignore SIGPIPE

src/node.js

-3
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ global.console.assert = function(expression){
233233

234234
global.Buffer = module.requireNative('buffer').Buffer;
235235

236-
process.debug = global.v8debug.Debug;
237-
global.v8debug = undefined;
238-
239236
process.exit = function (code) {
240237
process.emit("exit");
241238
process.reallyExit(code);

test/simple/test-liveedit.js

-27
This file was deleted.

0 commit comments

Comments
 (0)