Closed Bug 1120503 Opened 11 years ago Closed 11 years ago

Fix seal/freeze for typed arrays

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: jorendorff, Assigned: evilpies)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

> // Typed arrays are always sealed. > *resultp = true; > } else { > // Typed arrays cannot be frozen, but an empty typed array is > // trivially frozen. Jeff pointed out that neither comment is true anymore (bug 1112778 comment 22).
In theory we just need to remove the if (IsAnyTypedArray(obj)) block and add some tests.
QA Contact: evilpies
Assignee: nobody → evilpies
QA Contact: evilpies
As I suggested, this just removes the special code for typed arrays. I added some tests that makes sure we still consider non-extensible empty arrays as sealed and frozen. And some other cases like that non-empty arrays are never frozen, because the elements always stay writable.
Attachment #8564258 - Flags: review?(jwalden+bmo)
Attachment #8564258 - Flags: review?(jwalden+bmo) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: