bug677247.js 927 B

123456789101112131415161718192021222324252627282930313233
  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. // bug around fixed accessor properties
  6. obj = {};
  7. Object.defineProperty(obj, 'prop0', {
  8. value:
  9. {
  10. get x() {
  11. try{this;}
  12. catch(e){};
  13. function bar(arg){
  14. WScript.Echo("getter");
  15. this.prop1 = 1;
  16. }
  17. return bar;
  18. }
  19. },
  20. configurable: true
  21. });
  22. function foo()
  23. {
  24. new obj.prop0.x(this);
  25. }
  26. foo();
  27. foo();
  28. foo();