| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 530b8a4 commit f0c8f69
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,8 @@ if (process.argv[2] === 'child') { | |||
| 19 | 19 | } | |
| 20 | 20 | ||
| 21 | 21 | if (!common.isWindows) { | |
| 22 | - if (!frames.some((frame) => frame.includes(`[${process.execPath}]`))) { | ||
| 22 | + const { getBinaryPath } = require('../common/shared-lib-util'); | ||
| 23 | + if (!frames.some((frame) => frame.includes(`[${getBinaryPath()}]`))) { | ||
| 23 | 24 | assert.fail(`Some frames should include the binary name:\n${stderr}`); | |
| 24 | 25 | } | |
| 25 | 26 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ exports.addLibraryPath = function(env) { | |||
| 29 | 29 | path.dirname(process.execPath); | |
| 30 | 30 | }; | |
| 31 | 31 | ||
| 32 | - // Get the full path of shared lib | ||
| 32 | + // Get the full path of shared lib. | ||
| 33 | 33 | exports.getSharedLibPath = function() { | |
| 34 | 34 | if (common.isWindows) { | |
| 35 | 35 | return path.join(path.dirname(process.execPath), 'node.dll'); | |
@@ -42,3 +42,9 @@ exports.getSharedLibPath = function() { | |||
| 42 | 42 | `libnode.${process.config.variables.shlib_suffix}`); | |
| 43 | 43 | } | |
| 44 | 44 | }; | |
| 45 | + | ||
| 46 | + // Get the binary path of stack frames. | ||
| 47 | + exports.getBinaryPath = function() { | ||
| 48 | + return process.config.variables.node_shared ? | ||
| 49 | + exports.getSharedLibPath() : process.execPath; | ||
| 50 | + }; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments