fix: remove obsoleted --inspect-brk
logic (#46560)
fix: remove obsoleted --inspect-brk logic
This commit is contained in:
parent
521108e2a5
commit
45a0494287
3 changed files with 0 additions and 20 deletions
|
@ -218,7 +218,6 @@ if (packagePath) {
|
||||||
} else {
|
} else {
|
||||||
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is synchronous
|
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is synchronous
|
||||||
appCodeLoaded!();
|
appCodeLoaded!();
|
||||||
process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false);
|
|
||||||
Module._load(path.join(packagePath, mainStartupScript), Module, true);
|
Module._load(path.join(packagePath, mainStartupScript), Module, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -7,24 +7,6 @@ This allows embedders to tell Node.js what the first "real" file is when
|
||||||
they use themselves as the entry point. We should try to upstream some form
|
they use themselves as the entry point. We should try to upstream some form
|
||||||
of this.
|
of this.
|
||||||
|
|
||||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
|
||||||
index 9b5772fe9b8babbb892c7a5ec79258472da55a76..3568fd6ea0816f62d97d46f5d497bb1b23bf4e25 100644
|
|
||||||
--- a/lib/internal/modules/cjs/loader.js
|
|
||||||
+++ b/lib/internal/modules/cjs/loader.js
|
|
||||||
@@ -1555,6 +1555,13 @@ Module.prototype._compile = function(content, filename, format) {
|
|
||||||
this[kIsExecuting] = true;
|
|
||||||
if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) {
|
|
||||||
const { callAndPauseOnStart } = internalBinding('inspector');
|
|
||||||
+ // process._firstFileName is used by Embedders to tell node what
|
|
||||||
+ // the first "real" file is when they use themselves as the entry
|
|
||||||
+ // point
|
|
||||||
+ if (process._firstFileName) {
|
|
||||||
+ resolvedArgv = process._firstFileName;
|
|
||||||
+ delete process._firstFileName;
|
|
||||||
+ }
|
|
||||||
result = callAndPauseOnStart(compiledWrapper, thisValue, exports,
|
|
||||||
require, module, filename, dirname,
|
|
||||||
process, localGlobal, localBuffer);
|
|
||||||
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
|
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
|
||||||
index d1c05d1717cdc825c4e48885c963c9ed65bcf51c..278665921c5160ff10b3178db27d4df319fab6b3 100644
|
index d1c05d1717cdc825c4e48885c963c9ed65bcf51c..278665921c5160ff10b3178db27d4df319fab6b3 100644
|
||||||
--- a/lib/internal/process/pre_execution.js
|
--- a/lib/internal/process/pre_execution.js
|
||||||
|
|
1
typings/internal-ambient.d.ts
vendored
1
typings/internal-ambient.d.ts
vendored
|
@ -255,7 +255,6 @@ declare namespace NodeJS {
|
||||||
once(event: 'document-end', listener: () => any): this;
|
once(event: 'document-end', listener: () => any): this;
|
||||||
|
|
||||||
// Additional properties
|
// Additional properties
|
||||||
_firstFileName?: string;
|
|
||||||
_serviceStartupScript: string;
|
_serviceStartupScript: string;
|
||||||
_getOrCreateArchive?: (path: string) => NodeJS.AsarArchive | null;
|
_getOrCreateArchive?: (path: string) => NodeJS.AsarArchive | null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue