moreProperties-enumeration.js 741 B

123456789101112131415161718192021
  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. // Bug 5397: Transition from PropertyIndex to BigPropertyIndex during enumeration causes a crash
  6. var o = {};
  7. var i;
  8. for(i = 0; i < 65530; ++i)
  9. o["p" + i] = 0;
  10. var add;
  11. for(; i < 65540; ++i) {
  12. add = true;
  13. for(var p in o) {
  14. if(add) {
  15. add = false;
  16. WScript.Echo(i);
  17. o["p" + i] = 0;
  18. }
  19. }
  20. }