js/src/jit-test/tests/basic/bug616009.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 function run() {
     2   var obj = {
     3     toJSON: function() {
     4       return {
     5         key: {
     6           toJSON: function() {
     7             for (i=0; i!=1<<10; ++i)
     8               new Object();
     9             var big = unescape("%udddd");
    10             while (big.length != 0x100000)
    11                big += big;
    12             for (i=0; i!=32; ++i)
    13               new String(big+i);
    14             return "whatever";
    15           }
    16         },
    17         __iterator__: function() {
    18           return {
    19             next: function() {
    20               return "key";
    21             }
    22           }
    23         }
    24       }
    25     }
    26   };
    28   var repl = function(id, val) {
    29     this[0]++;
    30     return val;
    31   };
    33   JSON.stringify(obj, repl);
    34 }
    35 run();

mercurial