| // Copyright 2018 the V8 project authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| (function CycleDetection() { |
| assertSame('1,', arr.toLocaleString()); |
| assertSame('1,', arr.toLocaleString()); |
| assertThrows(() => arr.toLocaleString(), TestError); |
| // Verifies cycle detection still works properly after thrown error. |
| assertSame('1', arr.toLocaleString()); |
| (function AccessThrowsError(){ |
| assertThrows(() => arr.toLocaleString(), TestError); |
| // Verifies cycle detection still works properly after thrown error. |
| assertSame('1', arr.toLocaleString()); |
| assertThrows(() => arr.toLocaleString(), TypeError, '7 is not a function'); |
| // Verifies cycle detection still works properly after thrown error. |
| assertSame('1', arr.toLocaleString()); |