gecko-dev/testing/modules
Rob Wu 28d48c8abb Bug 1856464 - Include stack in Assert.rejects r=jmaher
Assert.rejects uses callbacks in a way that the stack no longer includes
the original caller in the stack when the stack is generated.
Consequently, when AssertionError tries to identify the caller, it is
unable to do so, resulting in a `null` stack.

This `null` stack is passed by the SpecialPowers glue to
`do_report_result` in xpcshell/head.js, which doesn't expect a `null`
stack, and consequently the following error is reported:
"TypeError: can't access property "filename", stack is null"

To fix this issue, we save the stack (including the caller) upon
entering `Assert.rejects`, and forward that to `AssertionError`.

Differential Revision: https://phabricator.services.mozilla.com/D189863
2023-10-26 09:59:26 +00:00
..
tests Bug 1856464 - Add test coverage for Assert.rejects itself r=jmaher 2023-10-26 09:59:25 +00:00
AppData.sys.mjs
AppInfo.sys.mjs
Assert.sys.mjs Bug 1856464 - Include stack in Assert.rejects r=jmaher 2023-10-26 09:59:26 +00:00
CoverageUtils.sys.mjs
FileTestUtils.sys.mjs
MockRegistrar.sys.mjs
MockRegistry.sys.mjs
moz.build
sinon-7.2.7.js
Sinon.sys.mjs
StructuredLog.sys.mjs
TestUtils.sys.mjs
XPCShellContentUtils.sys.mjs