stackTrace.js 986 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. if (this.WScript && this.WScript.LoadScriptFile) {
  6. this.WScript.LoadScriptFile("TrimStackTracePath.js");
  7. }
  8. function Dump(output)
  9. {
  10. if (this.WScript)
  11. {
  12. WScript.Echo(output);
  13. }
  14. else
  15. {
  16. alert(output);
  17. }
  18. }
  19. function test0() {
  20. var obj0 = {};
  21. var func4 = function () {
  22. var a = ui8;
  23. func0();
  24. };
  25. var func0 = function() {
  26. for (; prop0 < 100; ) {
  27. argMath5;
  28. }
  29. }
  30. obj0.method1 = func4;
  31. var ui8 = new Uint8Array(256);
  32. prop0 = Infinity;
  33. obj0.method1();
  34. prop0 = -1766989739;
  35. obj0.method1();
  36. }
  37. try {
  38. test0();
  39. } catch(e) {
  40. Dump(TrimStackTracePath(e.stack));
  41. }