TryCatchStackOverflow.js 500 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. var a = [];
  6. function f() {
  7. try {
  8. f();
  9. } catch (e) {
  10. a.foo = 100;
  11. }
  12. }
  13. f();
  14. print("pass");