Closed Bug 1199422 Opened 10 years ago Closed 10 years ago

Bytecode inspection in String.p.replace and Array.p.sort needs to check for classes

Categories

(Core :: JavaScript: Standard Library, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox43 --- affected
firefox45 --- fixed

People

(Reporter: anba, Assigned: evilpies)

References

Details

Attachments

(1 file)

Test cases: --- // String.prototype.replace (function() { var b = {a:"A"}; return "a".replace(/a/, class {constructor(a){return b[a]}}); })() // Array.prototype.sort [1, 2, 3].sort(class {constructor(x,y){return x - y}}) --- Expected: Both calls throw a TypeError Actual: No TypeError thrown
Assignee: nobody → evilpies
Attachment #8694382 - Flags: review?(efaustbmo)
Comment on attachment 8694382 [details] [diff] [review] v1 - Stop pattern matching Review of attachment 8694382 [details] [diff] [review]: ----------------------------------------------------------------- wfm. Nice test.
Attachment #8694382 - Flags: review?(efaustbmo) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: