tor-browser

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

length-non-writable.js (562B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: The length property of eval has the attribute ReadOnly
      6 esid: sec-eval-x
      7 description: Checking if varying the length property fails
      8 includes: [propertyHelper.js]
      9 ---*/
     10 
     11 //CHECK#1
     12 var x = eval.length;
     13 verifyNotWritable(eval, "length", null, Infinity);
     14 if (eval.length !== x) {
     15  throw new Test262Error('#1: x = eval.length; eval.length = Infinity; eval.length === x. Actual: ' + (eval.length));
     16 }
     17 
     18 reportCompare(0, 0);