blue_245702.js 838 B

12345678910111213141516171819202122232425262728293031323334
  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. var shouldBailout = false;
  6. function test() {
  7. var print = function (a) {
  8. WScript.Echo(a);
  9. };
  10. c = 1;
  11. if (shouldBailout) {
  12. delete this.c;
  13. }
  14. function shapeyConstructor() {
  15. 'use strict';
  16. for (c in ['']) {
  17. print(c);
  18. }
  19. }
  20. shapeyConstructor();
  21. }
  22. try{
  23. test();
  24. }
  25. catch(e){WScript.Echo(e);}
  26. shouldBailout = true;
  27. try{
  28. test();
  29. }
  30. catch(e){WScript.Echo(e);}