Closed Bug 1168524 Opened 10 years ago Closed 10 years ago

String.prototype.replace incorrectly throws a TypeError

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1168257

People

(Reporter: erik, Unassigned)

Details

From https://code.google.com/p/v8/issues/detail?id=4146 var regex = /0/g; Object.freeze(regex); var str = "abc000"; str.replace(regex, "o"); This throws a TypeError in Spdiermonkey, but since the value of lastIndex was already 0 the [[DefineProperty]] should succeed.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.