oos2.js 1.0 KB

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. function echo(m) { this.WScript ? WScript.Echo(m) : console.log(m); }
  6. function oos() {
  7. oos();
  8. }
  9. try {
  10. try {
  11. oos();
  12. } finally {
  13. try {
  14. oos();
  15. } catch (e) {
  16. } finally {
  17. }
  18. }
  19. //
  20. // Win8: 772949
  21. // The inner finally cleared threadContext->OOS.thrownObject.
  22. //
  23. // In chk build, outer finally asserts.
  24. // In fre build, outer finally gets a NULL thrownObject from shared OOS and sends
  25. // NULL to catch below. e == NULL, causes AV as NULL is not a valid Var.
  26. //
  27. } catch (e) {
  28. if (e) {
  29. echo("pass");
  30. }
  31. }