bug_vso_os_1206083.js 772 B

1234567891011121314
  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. // VSO OS Bug 1206083
  6. // Accessor inline cache was not invalidated after eval() function definition overwrites global accessor property with same name
  7. function print(x) { WScript.Echo("" + x); }
  8. Object.defineProperty(this, "z", { get: function () { print("getter") }, set: function () { print("setter") }, configurable: true });
  9. print(z);
  10. eval('function z(){}');
  11. print(z);
  12. z = 0;
  13. print(z);