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)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: anba, Assigned: evilpies)
References
Details
Attachments
(1 file)
2.17 KB,
patch
|
efaust
:
review+
|
Details | Diff | Splinter Review |
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
Reporter | ||
Updated•10 years ago
|
Blocks: harmony-classes
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → evilpies
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8694382 -
Flags: review?(efaustbmo)
Comment 2•10 years ago
|
||
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+
Comment 4•10 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•