bug12782316.js 720 B

1234567891011121314151617181920212223242526
  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 o1 = {};
  6. var o2 = Object.create(o1);
  7. o2.x = 1;
  8. function foo( arg )
  9. {
  10. this.caller;
  11. arg.x && o1.y + o2.y;
  12. arg.x;
  13. };
  14. foo(o2);
  15. foo(o2);
  16. Object.defineProperty(o2, 'y', { get: function () {} });
  17. foo(o2);
  18. o1.x = {};
  19. foo(o1);
  20. Object.defineProperty(o1, 'y', { set: function () {} });
  21. foo(o2)
  22. WScript.Echo("PASSED");