Closed Bug 1240550 Opened 4 years ago Closed 4 years ago
Script Error should check for fn Name and file, not line
58 bytes, text/x-review-board-request
Previously fnName and line was tested as the entry requirement for printing the filename to the trace information. Testing line here was premature since it is meant to be an optional argument. This patch rectifies this behaviour by testing for each of the optional arguments sequentially. This means the file argument is required to print the line, and the fnName argument is required to print any of those two. Review commit: https://reviewboard.mozilla.org/r/31289/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/31289/
Attachment #8709130 - Flags: review?(dburns)
Comment on attachment 8709130 [details] MozReview Request: Bug 1240550 - Make fnName, file, and line optional arguments; r?automatedtester https://reviewboard.mozilla.org/r/31289/#review28063
Attachment #8709130 - Flags: review?(dburns) → review+
This appears to have been caused by a race condition for the brief moment bug 1239373 was on inbound at the same time as this patch. It should be fine to re-land this changeset as-is now that bug 1239373 has been backed out.
Comment on attachment 8709130 [details] MozReview Request: Bug 1240550 - Make fnName, file, and line optional arguments; r?automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31289/diff/1-2/
This is an example where the first xpcshell tests for Marionette actually caught a real bug! I pushed an update to this patch that adds a whitespace character.
You need to log in before you can comment on or make changes to this bug.