tor-browser

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

regress-466747.js (1449B)


      1 // |reftest| skip-if(xulRuntime.shell)
      2 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 //-----------------------------------------------------------------------------
      8 var BUGNUMBER = 466747;
      9 var summary = 'TM: Do not assert: fp->slots + fp->script->nfixed + ' +
     10  'js_ReconstructStackDepth(cx, fp->script, fp->regs->pc) == fp->regs->sp';
     11 var actual = '';
     12 var expect = '';
     13 
     14 
     15 //-----------------------------------------------------------------------------
     16 test();
     17 //-----------------------------------------------------------------------------
     18 
     19 function test()
     20 {
     21  printBugNumber(BUGNUMBER);
     22  printStatus (summary);
     23 
     24  gDelayTestDriverEnd = true;
     25 
     26    function newScriptWithLoop(m)
     27    {
     28      var ns = document.createElement("script");
     29      var nt = document.createTextNode("for (var q = 0; q < " + m + "; ++q) { }");
     30      ns.appendChild(nt);
     31      return ns;
     32    }
     33 
     34    function boom()
     35    {
     36      var div = document.createElement("div");
     37      div.appendChild(newScriptWithLoop(7));
     38      div.appendChild(newScriptWithLoop(1));
     39      document.body.appendChild(div);
     40 
     41 
     42      reportCompare(expect, actual, summary);
     43      gDelayTestDriverEnd = false;
     44      jsTestDriverEnd();
     45    }
     46 
     47  window.addEventListener('load', boom, false);
     48 }