summaryrefslogtreecommitdiff
path: root/test/parallel/test-domain-top-level-error-handler-clears-stack.js
AgeCommit message (Collapse)Author
2019-06-12domain: error handler runs outside of its domainJulien Gilli
Before this change, domains' error handlers would run with the corresponding domain as the active domain. This creates the possibility for domains' error handlers to call themselves recursively if an event emitter created in the error handler emits an error, or if the error handler throws an error. This change sets the active domain to be the domain's parent (or null if the domain for which the error handler is called has no parent) to prevent that from happening. Fixes: https://github.com/nodejs/node/issues/26086 PR-URL: https://github.com/nodejs/node/pull/26211 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-11-29test: replace function with arrow functionLeko
1. Among the list of Code and Learn, I solved the unfinished task of replacing function with arrow function: https://github.com/nodejs/code-and-learn/issues/72#issuecomment-345667395 2. Replace arrow function with shorter property syntax Arrow function makes `this` lexical scope. But toString expects evaluate `this` in runtime. 3. Replace this with null makeBlock does not need `this`. update `this` with `null` to clarify the intent. PR-URL: https://github.com/nodejs/node/pull/17345 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
2016-04-28test,tools: adjust function argument alignmentRich Trott
In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. PR-URL: https://github.com/nodejs/node/pull/6390 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Imran Iqbal <imran@imraniqbal.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
2015-10-16test: port domains regression test from v0.10Jonas Dohse
f2a45caf2e1b73fea01fa9a941bc61096a999664 contained a test for a regression that had been introduced by the original change that 77a10ed05f1e413818d29f07cbb268108b1f08fa ported. While 77a10ed05f1e413818d29f07cbb268108b1f08fa did not contain that regression, the test that f2a45caf2e1b73fea01fa9a941bc61096a999664 contained should still be in the code base to prevent any regression from happening in the future. Original message for the commit that contained the test: domains: fix stack clearing after error handled caeb67735baa8e069902e23f21d01033907c4f33 introduced a regression where the domains stack would not be cleared after an error had been handled by the top-level domain. This change clears the domains stack regardless of the position of the active domain in the stack. PR: #9364 PR-URL: https://github.com/joyent/node/pull/9364 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Julien Gilli <julien.gilli@joyent.com> PR: #3356 PR-URL: https://github.com/nodejs/node/pull/3356 Reviewed-By: Ben Noordhuis <ben@strongloop.com>