OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 function nope() { return false; } |
| 6 var a = [ 1, 2, 3 ]; |
| 7 Object.seal(a); |
| 8 Object.isSealed = nope; |
| 9 |
| 10 assertThrows(function() { a.pop(); }, TypeError); |
| 11 assertThrows(function() { a.push(5); }, TypeError); |
| 12 assertThrows(function() { a.shift(); }, TypeError); |
| 13 assertThrows(function() { a.unshift(5); }, TypeError); |
| 14 assertThrows(function() { a.splice(0, 1); }, TypeError); |
OLD | NEW |