If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

testing/xpcshell/head.js fails to match JS error stack frames

RESOLVED FIXED in mozilla26

Status

Testing
XPCShell Harness
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jimb, Assigned: jimb)

Tracking

unspecified
mozilla26
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
(I don't know if this is even a good idea to fix, but I fixed it...)

The regular expression in testing/xpcshell/head.js's _format_exception_stack function no longer matches stack frames stored on the 'stack' property of Error instances. Thus, errors appear this way in xpcshell test output:

 0:00.16 JS frame :: testAddrInUse@/home/jimb/moz/dbg/obj-bug/_tests/xpcshell/netwerk/test/unit/test_addr_in_use_error.js:15

instead of this, as _format_exception_stack apparently intends:

 0:00.16 JS frame :: /home/jimb/moz/dbg/obj-bug/_tests/xpcshell/netwerk/test/unit/test_addr_in_use_error.js :: testAddrInUse :: line 15

I don't know why one format is better than the other, but seeing the regexp which will never match in the code instills in one a certain sense of futility, reminiscent of the bitterness that lingers from the realization, so often reached at some bleak moment shortly after one had gained majority, that there is no responsive omnipotent will --- neither God, nor some emergent invisible hand, nor evolutionary forces onto which we might project our own aspirations and thus bring within reach of our comprehension, so we might bargain or ingratiate ourselves --- no will that watches for decay and corruption, and acts to repair it.

Of course, we could drop the frame-matching code altogether, and simply print the frames as the engine has formatted them. It being meaningless to attempt to distance oneself from a void that surrounds one in all directions, it may be better to extinguish a spark immediately, than to attempt to sustain it.
(Assignee)

Comment 1

4 years ago
Created attachment 795185 [details] [diff] [review]
Fix xpcshell test harness regexp matching JS stack frames. But to what end?
Assignee: nobody → jimb
Status: NEW → ASSIGNED
Attachment #795185 - Flags: review?(ted)
Comment on attachment 795185 [details] [diff] [review]
Fix xpcshell test harness regexp matching JS stack frames. But to what end?

Review of attachment 795185 [details] [diff] [review]:
-----------------------------------------------------------------

I honestly don't know why things are formatted that way. It probably doesn't matter how we print it, I'm 99% sure nothing actually relies on that stack format (or we presumably would have noticed it being broken in the interim).

A+++ would read comment 0 again.
Attachment #795185 - Flags: review?(ted) → review+
(Assignee)

Comment 3

4 years ago
Paranoid resource-wasting try push:
https://tbpl.mozilla.org/?tree=Try&rev=efcb231e95c7
(Assignee)

Comment 4

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f66ac3e480ca
Flags: in-testsuite-
Target Milestone: --- → mozilla26

Comment 5

4 years ago
https://hg.mozilla.org/mozilla-central/rev/f66ac3e480ca
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.