mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
38f04d4da1
`node --prof foo.js` may not print the full profile log file, leaving the last line broken (for example `tick,`. When that happens, `readline` will be stuck in an infinite loop. This patch fixes it. Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code on tick-processor tests. PR-URL: https://github.com/nodejs/node/pull/18641 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
21 lines
454 B
JavaScript
21 lines
454 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
if (!common.enoughTestCpu)
|
|
common.skip('test is CPU-intensive');
|
|
|
|
if (common.isCPPSymbolsNotMapped) {
|
|
common.skip('C++ symbols are not mapped for this os.');
|
|
}
|
|
|
|
const base = require('./tick-processor-base.js');
|
|
|
|
base.runTest({
|
|
pattern: /MakeContext/,
|
|
code: `function f() {
|
|
require('vm').createContext({});
|
|
setImmediate(function() { f(); });
|
|
};
|
|
f();`
|
|
});
|