Closed Bug 707911 Opened 14 years ago Closed 13 years ago

Rewrite StackTraceToString to use StringBuffer

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: evilpies, Assigned: evilpies)

Details

Attachments

(1 file)

No description provided.
Depends on: 700169
No longer depends on: 700169
Assignee: general → evilpies
Attached patch v1Splinter Review
I think this works around the problem in the old version of this. So before I try to add name, line and file for a new StackFrame, I first try to reserve that space, this way we shouldn't OOM while adding either name, line or file and all entries should be correct. I also kept around the length limit.
Attachment #624124 - Flags: review?(bhackett1024)
Comment on attachment 624124 [details] [diff] [review] v1 Review of attachment 624124 [details] [diff] [review]: ----------------------------------------------------------------- Nice cleanup. ::: js/src/jit-test/tests/basic/bug707911.js @@ +12,5 @@ > + /* oom should not cause abort, but instead just shorten the stacktrace */ > +} catch (e) { > + /* we assume at least one entry make it into the stack */ > + assertEq(e.stack.indexOf('a@') >= 0, true); > +} Without a value for -A this test won't trigger an OOM while constructing the stack trace, it will hit recursion limits long before. Either fix the test or remove it.
Attachment #624124 - Flags: review?(bhackett1024) → review+
Target Milestone: --- → mozilla15
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: