Closed Bug 1248405 Opened 10 years ago Closed 10 years ago

CanOptimizeForDenseStorage should distinguish OOM and not-optimizable cases.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: arai, Assigned: arai)

Details

Attachments

(1 file, 1 obsolete file)

> ObjectGroup* arrGroup = arr->getGroup(cx); > if (MOZ_UNLIKELY(!arrGroup || arrGroup->hasAllFlags(OBJECT_FLAG_ITERATED))) > return false; Here, returning false means 2 things, OOM and not-optimizable. We should have out parameter for optimizable/not-optimizable.
added optimizable out parameter to CanOptimizeForDenseStorage, and fixed caller accordingly.
Assignee: nobody → arai.unmht
Attachment #8719516 - Flags: review?(jdemooij)
I'm not sure about this patch - it makes the call sites more verbose and it should be fine to use the slow path on OOM. What if we do something like: if (!arrGroup) { cx->recoverFromOutOfMemory(); return false; }
Yeah, I agree this also works :)
Attachment #8719516 - Attachment is obsolete: true
Attachment #8719516 - Flags: review?(jdemooij)
Attachment #8719791 - Flags: review?(jdemooij)
Comment on attachment 8719791 [details] [diff] [review] Recover from JSObject::getGroup OOM in CanOptimizeForDenseStorage. Review of attachment 8719791 [details] [diff] [review]: ----------------------------------------------------------------- Thank you.
Attachment #8719791 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/bda2d0f0622c578748d5eeadb32942575c2f83b5 Bug 1248405 - Recover from JSObject::getGroup OOM in CanOptimizeForDenseStorage. r=jandem
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: