Debian Codegraph @

js/src/jit-test/tests/basic/bug1380962.js

raw
1 // |jit-test| skip-if: !Function.prototype.toSource
2
3 // Source string has balanced parentheses even when the source code was discarded.
4
5 function test() {
6 eval("var f = function() { return 0; };");
7 assertEq(f.toSource(), "(function() {\n [native code]\n})");
8 }
9
10 var g = newGlobal({ discardSource: true });
11 g.evaluate(test.toString() + "test()");