Closed
Bug 1248405
Opened 10 years ago
Closed 10 years ago
CanOptimizeForDenseStorage should distinguish OOM and not-optimizable cases.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla47
| Tracking | Status | |
|---|---|---|
| firefox47 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
Details
Attachments
(1 file, 1 obsolete file)
|
1.40 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
> 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.
| Assignee | ||
Comment 1•10 years ago
|
||
added optimizable out parameter to CanOptimizeForDenseStorage, and fixed caller accordingly.
Assignee: nobody → arai.unmht
Attachment #8719516 -
Flags: review?(jdemooij)
Comment 2•10 years ago
|
||
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;
}
| Assignee | ||
Comment 3•10 years ago
|
||
Yeah, I agree this also works :)
Attachment #8719516 -
Attachment is obsolete: true
Attachment #8719516 -
Flags: review?(jdemooij)
Attachment #8719791 -
Flags: review?(jdemooij)
Comment 4•10 years ago
|
||
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+
| Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/bda2d0f0622c578748d5eeadb32942575c2f83b5
Bug 1248405 - Recover from JSObject::getGroup OOM in CanOptimizeForDenseStorage. r=jandem
Comment 6•10 years ago
|
||
| bugherder | ||
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.
Description
•