stackoverflow.js 628 B

1234567891011121314151617181920
  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. try
  6. {
  7. // Issue Microsoft/ChakraCore#3900
  8. var o = { 0: 1, 1: 1 };
  9. JSON.parse('[0,0]', function () {
  10. this[1] = o;
  11. });
  12. }
  13. catch (ex)
  14. {
  15. if (ex.message == "Out of stack space")
  16. {
  17. console.log("PASS");
  18. }
  19. }