OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 "use strict"; |
| 6 |
| 7 // After captureStackTrace. |
| 8 |
| 9 var a = {}; |
| 10 Error.captureStackTrace(a, Error); |
| 11 a.stack = 1; // Should not throw, stack should be writable. |
| 12 |
| 13 // After the standard Error constructor. |
| 14 |
| 15 var b = new Error(); |
| 16 b.stack = 1; // Should not throw, stack should be writable. |
| 17 b.stack = 1; // Still writable. |
| 18 |
| 19 // After read access to stack. |
| 20 |
| 21 var c = new Error(); |
| 22 var old_stack = c.stack; |
| 23 c.stack = 1; // Should not throw, stack should be writable. |
| 24 c.stack = 1; // Still writable. |
OLD | NEW |