Considering giving JSErrorReport ownership of all its strings
Categories
(Core :: JavaScript Engine, task, P3)
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.
Comment 1•4 years ago
|
||
File names can also be multi-megabytes large: bug 1577161 and bug 1485078 (https://bugzilla.mozilla.org/show_bug.cgi?id=1485078#c17).
Reporter | ||
Comment 2•4 years ago
|
||
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.
Updated•4 years ago
|
Updated•2 years ago
|
Description
•