Home | History | Annotate | Download | only in regress
      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 var o = { __proto__:Array.prototype, 0:"x" };
      6 function boomer() { return 0; }
      7 Object.defineProperty(o, "length", { get:boomer, set:boomer });
      8 Object.seal(o);
      9 
     10 assertDoesNotThrow(function() { o.push(1); });
     11 assertEquals(0, o.length);
     12 assertEquals(1, o[0]);
     13 
     14 assertDoesNotThrow(function() { o.unshift(2); });
     15 assertEquals(0, o.length);
     16 assertEquals(2, o[0]);
     17