Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/parallel/test-async-local-storage-deep-stack.js

16 lines
344 B
JavaScript
Raw Permalink Normal View History

async_hooks: fix resource stack for deep stacks 460c81dc0e0 introduced a bug where the execution resource was not stored properly if we needed to call into C++ to extend the stack size. Fix that bug by always storing the resource. Refs: https://github.com/nodejs/node/pull/34319 Fixes: https://github.com/nodejs/node/issues/34556 PR-URL: https://github.com/nodejs/node/pull/34573 Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Gus Caplan <me@gus.host>
2020-07-31 02:32:33 +02:00
'use strict';
const common = require('../common');
const { AsyncLocalStorage } = require('async_hooks');
// Regression test for: https://github.com/nodejs/node/issues/34556
const als = new AsyncLocalStorage();
const done = common.mustCall();
function run(count) {
if (count !== 0) return als.run({}, run, --count);
done();
}
run(1000);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 2451ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API