tor-browser

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

15.2.3.7-6-a-86-1.js (1045B)


      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.7-6-a-86-1
      6 description: >
      7    Object.defineProperties will not throw TypeError when
      8    P.configurable is false, both properties.[[Set]] and P.[[Set]] are
      9    two objects which refer to the same object and the object has been
     10    updated after defined(8.12.9 step 11.a.i)
     11 includes: [propertyHelper.js]
     12 ---*/
     13 
     14 
     15 var obj = {};
     16 
     17 var set_func = function(value) {
     18  obj.setVerifyHelpProp = value;
     19 };
     20 
     21 Object.defineProperty(obj, "foo", {
     22  set: set_func,
     23  configurable: false
     24 });
     25 
     26 set_func = function(value) {
     27  obj.setVerifyHelpProp1 = value;
     28 };
     29 
     30 try {
     31  Object.defineProperties(obj, {
     32    foo: {
     33      set: set_func
     34    }
     35  });
     36 } catch (e) {
     37  if (!(e instanceof TypeError)) {
     38    throw new Test262Error("Expected TypeError, got " + e);
     39  }
     40 }
     41 
     42 verifyWritable(obj, "foo", "setVerifyHelpProp");
     43 
     44 verifyProperty(obj, "foo", {
     45  enumerable: false,
     46  configurable: false,
     47 });
     48 
     49 reportCompare(0, 0);