tor-browser

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

regress-328443.js (853B)


      1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 //-----------------------------------------------------------------------------
      7 var BUGNUMBER = 328443;
      8 var summary = 'Uncatchable exception with |new (G.call) (F);| when F proto is null';
      9 var actual = '';
     10 var expect = 'Exception caught';
     11 
     12 printBugNumber(BUGNUMBER);
     13 printStatus (summary);
     14 
     15 var F = (function(){});
     16 F.__proto__ = null;
     17 
     18 var G = (function(){});
     19 
     20 var z;
     21 
     22 z = "uncatchable exception!!!";
     23 try {
     24  new (G.call) (F);
     25 
     26  actual = "No exception";
     27 } catch (er) {
     28  actual = "Exception caught";
     29  printStatus("Exception was caught: " + er);
     30 }
     31 
     32 reportCompare(expect, actual, summary);