Open Bug 1624577 Opened 4 years ago Updated 2 years ago

Considering giving JSErrorReport ownership of all its strings

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: evilpie, Unassigned)

References

(Blocks 1 open bug)

Details

JSErrorBase/JSErrorReport contains message_ and linebuf_, which are only optionally owned by the error report. For filename we just hope that the actual JSScript lives long enough to keep it alive! I think we should consider just copying these strings and giving the error report complete ownership. This will increase memory usage, but we can probably spare it nowadays.

I just want to make sure we don't include megabytes long strings in linebuf_ if there some minified code.

File names can also be multi-megabytes large: bug 1577161 and bug 1485078 (https://bugzilla.mozilla.org/show_bug.cgi?id=1485078#c17).

Thank you! I forgot about data: URLs. The implicit lifetime dependency however is still questionable. Seems like fixing this might be a lot more work than it's worth at the moment.

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.