Closed Bug 1364014 Opened 7 years ago Closed 7 years ago

Remove the is-array check in GCMarker::restoreValueArray

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
In restoreValueArray we fail if we have dense elements and the object is not an array. Looking at blame data this check was added 5 years ago and it's probably from the "only arrays can have dense elements" days.

I instrumented the browser and we're hitting this case a bunch of times, sometimes for objects with more than 500 elements.
Attachment #8866699 - Flags: review?(jcoppeard)
Comment on attachment 8866699 [details] [diff] [review]
Patch

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

Wow, thanks for fixing this.  We certainly don't want to be continually rescanning large objects.
Attachment #8866699 - Flags: review?(jcoppeard) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2af9492e9b76
Remove unnecessary is-array check in GCMarker::restoreValueArray. r=jonco
https://hg.mozilla.org/mozilla-central/rev/2af9492e9b76
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: