js/src/tests/ecma/extensions/trapflatclosure.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 // |reftest| require-or(debugMode,skip)
     2 /*
     3  * Any copyright is dedicated to the Public Domain.
     4  * http://creativecommons.org/licenses/publicdomain/
     5  */
     7 var BUGNUMBER = 549617;
     8 var summary = 'flat closure debugged via trap while still active';
    10 var expect = "abc";
    11 var actual = expect;
    13 function a(x, y) {
    14     return function () { return x; };
    15 }
    17 var f = a("abc", 123);
    18 if (this.trap && this.setDebug) {
    19     setDebug(true);
    20     trap(f, "try {actual = x} catch (e) {actual = e}");
    21 }
    22 f();
    24 reportCompare(expect, actual, summary);
    26 printStatus("All tests passed!");

mercurial