OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var error; | 5 var error; |
6 try { reference_error(); } catch (e) { error = e; } | 6 try { reference_error(); } catch (e) { error = e; } |
7 toString = error.toString; | 7 toString = error.toString; |
8 error.__proto__ = []; | 8 error.__proto__ = []; |
9 assertEquals("Array: reference_error is not defined", | 9 assertEquals("ReferenceError: reference_error is not defined", |
10 toString.call(error)); | 10 toString.call(error)); |
OLD | NEW |