Closed Bug 1422432 Opened 5 years ago Closed 5 years ago

Improve or remove PrintJSStack()

Categories

(Core :: XPConnect, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

(In reply to Blake Kaplan (:mrbkap) from comment #10)
> (In reply to Andrew McCreight [:mccr8] from comment #7)
> > I changed the return value for the failure case to return the string instead
> > of printing it. I also had to change the return type to const char *.
> 
> At this point we should probably either add a comment that this function is
> intended to leak the return value or a comment to be clear that this
> function is only intended to be used from a debugger. Even in debug-only
> stuff, it makes me nervous to see a function returning both malloc'd memory
> and string literals.
> 
> Alternatively, maybe strdup the constant string?

Yeah, it is kind of gross. I could just delete it and see if anybody complains. Or move it to XPCDebug.
I vote for deleting it.
Priority: -- → P3
Comment on attachment 8933827 [details]
Bug 1422432 - Remove PrintJSStack().

https://reviewboard.mozilla.org/r/204744/#review210802
Attachment #8933827 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/mozilla-central/rev/a68d5f4b11c0
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.