js/src/jit-test/tests/debug/Object-deleteProperty-error-02.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 var g = newGlobal();
     2 var dbg = Debugger(g);
     3 dbg.onDebuggerStatement = function (frame) {
     4     try {
     5         frame.arguments[0].deleteProperty("x");
     6     } catch (exc) {
     7         assertEq(exc instanceof ReferenceError, true);
     8         assertEq(exc.message, "diaf");
     9         assertEq(exc.fileName, "fail");
    10         assertEq(exc.lineNumber, 4);
    11         assertEq(exc.columnNumber, 20);
    12         return;
    13     }
    14     throw new Error("deleteProperty should throw");
    15 };
    17 g.evaluate("function h(obj) { debugger; } \n" +
    18            "h(new Proxy({}, \n" +
    19            "            { deleteProperty: function () { \n" +
    20            "                var e = new ReferenceError('diaf', 'fail'); \n" +
    21            "                throw e; \n" +
    22            "              } \n" +
    23            "            }));");

mercurial