bug_os16855035.js 840 B

123456789101112131415161718192021222324252627282930313233
  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. // With -useparserstatecache -force:deferparse -force:redeferral -CollectGarbage we should not hit an AV
  6. var glo;
  7. function test()
  8. {
  9. function nested1(param2)
  10. {
  11. function nested2()
  12. {
  13. return param2;
  14. }
  15. escape();
  16. return 'pass';
  17. }
  18. WScript.Echo(nested1());
  19. function blah() { return 'pass' }
  20. function escape() { glo = blah; }
  21. }
  22. test("test3" )
  23. WScript.Echo(glo());
  24. CollectGarbage();
  25. test("test1");