js/src/jit-test/tests/basic/bug642206.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 this.__proto__ = null;
     3 function testLenientAndStrict(code, lenient_pred, strict_pred) {
     4   return (strict_pred("'use strict'; " + code) && 
     5           lenient_pred(code));
     6 }
     7 function raisesException(exception) {
     8   return function (code) {
     9     try {
    10       eval(code);
    11     } catch (actual) {
    12     }
    13   };
    14 };
    15 try {
    16 function arr() {
    17   return Object.defineProperty(Object()* delete Object, 0, {writable: false});
    18 }
    19 assertEq(testLenientAndStrict('var a = arr(); [a.splice(0, 1), a]',
    20                               raisesException(TypeError),
    21                               raisesException(TypeError)),
    22          true);
    23 } catch (e) {}
    24 ForIn_2(this);
    25 function ForIn_2(object) {
    26   for ( property in object ) {
    27     with ( object ) {
    28     }
    29   }
    30 }

mercurial