Index: test/mjsunit/regress/regress-877615.js |
diff --git a/test/mjsunit/regress/regress-877615.js b/test/mjsunit/regress/regress-877615.js |
index d35aba62d3aacd749893a50186be162fec5aeea4..bec5a4d1b8d6e209cdde41c383a89824a4ce5726 100644 |
--- a/test/mjsunit/regress/regress-877615.js |
+++ b/test/mjsunit/regress/regress-877615.js |
@@ -25,13 +25,13 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-Number.prototype.toLocaleString = function() { return 'invalid'}; |
-assertEquals([1].toLocaleString(), 'invalid'); // invalid |
+Number.prototype.toLocaleString = function() { return 'invalid'; }; |
+assertEquals('invalid', [1].toLocaleString()); // invalid |
Number.prototype.toLocaleString = 'invalid'; |
-assertEquals([1].toLocaleString(), '1'); // 1 |
+assertThrows(function() { [1].toLocaleString(); }); // Not callable. |
+delete Number.prototype.toLocaleString; |
Number.prototype.toString = function() { return 'invalid' }; |
-assertEquals([1].toLocaleString(), '1'); // 1 |
-assertEquals([1].toString(), '1'); // 1 |
- |
+assertEquals([1].toLocaleString(), 'invalid'); // Uses ToObject on elements. |
+assertEquals([1].toString(), '1'); // Uses ToString directly on elements. |