bug12340575.js 615 B

12345678910111213141516
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. Object.defineProperty(Array.prototype, 2, {get: function () { } });
  6. var arr = {};
  7. arr[0] = {};
  8. arr.length = 10;
  9. var protoObj = {};
  10. Object.defineProperty(protoObj, 10, {});
  11. arr.__proto__ = protoObj;
  12. Array.prototype.sort.call(arr);
  13. print('Pass');