Closed Bug 1215058 Opened 9 years ago Closed 9 years ago

Fix OOM handling behaviour related to off-thread compilation

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Adding an oomTest test case that calls offThreadCompileScript() showed up a couple of issues.
Here's a patch to add the test case and fix the problems.  There turned out to be quite a few of these.

Mostly it's reporting OOM, distinguishing OOM failure from other errors and relaxing assertions when we've already had OOM.

One issue however is that js::ReportOutOfMemory() does nothing if it's called on a helper thread.  For reporting OOM when parsing off-main-thread, I assume that a null script result without any other error reported is due to OOM.  This seems to work but maybe another approach would be better.
Attachment #8674857 - Flags: review?(jdemooij)
Comment on attachment 8674857 [details] [diff] [review]
bug1215058-off-thread-compile

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

Nice fixes, thanks!
Attachment #8674857 - Flags: review?(jdemooij) → review+
Summary: Fix OOM handling bevaiour related to off-thread compilation → Fix OOM handling behaviour related to off-thread compilation
https://hg.mozilla.org/mozilla-central/rev/6f1ff0ce8b6b
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: