js/src/jit-test/tests/gc/bug-948423.js

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 if (!this.hasOwnProperty("TypedObject"))
     2   quit();
     4 var ArrayType = TypedObject.ArrayType;
     5 var StructType = TypedObject.StructType;
     6 var uint8 = TypedObject.uint8;
     7 var uint32 = TypedObject.uint32;
     8 var ObjectType = TypedObject.Object;
     9 function runTests() {
    10   (function DimensionLinkedToUndimension() {
    11     var UintsA = uint32.array();
    12     var FiveUintsA = UintsA.dimension(5);
    13     var FiveUintsB = uint32.array(5);
    14     assertEq(true, 
    15 	FiveUintsA.equivalent(FiveUintsB)
    16 	);
    17   })();
    18   (function PrototypeHierarchy() {
    19     schedulegc(3);
    20     var Uint8s = uint8.array();
    21   })();
    22 }
    23 runTests();

mercurial