bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

RegExp.prototype[@@replace] needs to call ToLength(lastIndex) for non-global regexp opt

RESOLVED DUPLICATE of bug 1343375

Status

()

Core
JavaScript: Standard Library
RESOLVED DUPLICATE of bug 1343375
a year ago
a year ago

People

(Reporter: anba, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox54 affected)

Details

(Reporter)

Description

a year ago
Test case:
---
var r = /a/;
r.lastIndex = {
    valueOf() {
        print("HI");
        return 0;
    }
};
r[Symbol.replace]("");
---

Expected: Prints "HI"
Actual: Doesn't print "HI"
(Reporter)

Comment 1

a year ago
Will fix as part of bug 1343375.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1343375
You need to log in before you can comment on or make changes to this bug.