bug594298.js 746 B

12345678910111213141516171819202122232425262728293031
  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 obj0 = {};
  6. var protoObj1 = {};
  7. var func0 = function () {
  8. obj0.prop1;
  9. };
  10. var func2 = function () {
  11. obj0 = protoObj1;
  12. obj0.prop1 = 1;
  13. };
  14. func2();
  15. Object.defineProperty(obj0, 'prop1', {
  16. get: function () {
  17. return 3;
  18. }
  19. });
  20. func0();
  21. delete obj0.prop1;
  22. func2();
  23. Object.create(protoObj1);
  24. func0();
  25. WScript.Echo("PASSED");