1c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// Copyright 2014 the V8 project authors. All rights reserved. 2c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// Redistribution and use in source and binary forms, with or without 3c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// modification, are permitted provided that the following conditions are 4c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// met: 5c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// 6c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// * Redistributions of source code must retain the above copyright 7c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// notice, this list of conditions and the following disclaimer. 8c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// * Redistributions in binary form must reproduce the above 9c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// copyright notice, this list of conditions and the following 10c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// disclaimer in the documentation and/or other materials provided 11c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// with the distribution. 12c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// * Neither the name of Google Inc. nor the names of its 13c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// contributors may be used to endorse or promote products derived 14c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// from this software without specific prior written permission. 15c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// 16c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org 28c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org// This test passes if it does not crash in debug mode 29c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.org 30c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.orgarr = ['a', 'b', 'c', 'd']; 31c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.orgObject.defineProperty(arr.__proto__, '0', { get: function(){} }); 32c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.orgObject.defineProperty(arr, '2', {get: function(){} }); 33c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.orgObject.observe(arr, function() {}); 34c85dc10954aa3556a00b09b6d28cf2ebfcf528d8machenbach@chromium.orgarr.length = 2; 35