tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

15.2.3.12-2-a-8.js (721B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 15.2.3.12-2-a-8
      6 description: >
      7    Object.isFrozen - 'P' is own accessor property without a get
      8    function that overrides an inherited accessor property
      9 ---*/
     10 
     11 var proto = {};
     12 
     13 Object.defineProperty(proto, "foo", {
     14  get: function() {
     15    return 9;
     16  },
     17  configurable: false
     18 });
     19 
     20 var Con = function() {};
     21 Con.prototype = proto;
     22 var child = new Con();
     23 
     24 Object.defineProperty(child, "foo", {
     25  set: function() {},
     26  configurable: true
     27 });
     28 
     29 Object.preventExtensions(child);
     30 
     31 assert.sameValue(Object.isFrozen(child), false, 'Object.isFrozen(child)');
     32 
     33 reportCompare(0, 0);