Closed Bug 906795 Opened 11 years ago Closed 11 years ago

safeErrorString should include a stack

Categories

(DevTools :: Debugger, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

Attachments

(1 file)

It should access the stack property if possible, and if one isn't available, it should just use Error().stack so we will at least know from where the handling was caught.
https://tbpl.mozilla.org/?tree=Try&rev=dfb1c4556485
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Attachment #792482 - Flags: review?(vporof)
Comment on attachment 792482 [details] [diff] [review]
bug-906795-safeErrorString.patch

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

r+ with the stuff below addressed.

::: toolkit/devtools/DevToolsUtils.js
@@ +15,5 @@
> +    if (typeof errorString === "string") {
> +      try {
> +        if (aError.stack) {
> +          let stack = aError.stack.toString();
> +          if (typeof stack === "string") {

Might want to add some comments here about all the trys and ifs. Why are you checking the typeof here, for example? If any of the conditionals are false, then nothing is returned, which I don't think is what should happen here.
Attachment #792482 - Flags: review?(vporof) → review+
https://hg.mozilla.org/mozilla-central/rev/faca4da6cadd
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Hurrah.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: