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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 var BUGNUMBER = '';
michael@0 2 function printBugNumber (num)
michael@0 3 {
michael@0 4 return "foo";
michael@0 5 }
michael@0 6 function optionsClear() {
michael@0 7 var x = printBugNumber().split(',');
michael@0 8 }
michael@0 9 function optionsReset() {
michael@0 10 optionsClear();
michael@0 11 }
michael@0 12 var code = new Array();
michael@0 13 code.push("evaluate");
michael@0 14 var x0 = "\
michael@0 15 printBugNumber(BUGNUMBER);\n\
michael@0 16 function gen()\n\
michael@0 17 {\n\
michael@0 18 try {\n\
michael@0 19 yield 0;\n\
michael@0 20 } finally {\n\
michael@0 21 }\n\
michael@0 22 }\n\
michael@0 23 var iter1 = gen( iter1=\"NaN\", new gen(gen)) ;\n\
michael@0 24 gc();\n\
michael@0 25 ";
michael@0 26 code.push(x0);
michael@0 27 code.push("evaluate");
michael@0 28 var files = new Array();
michael@0 29 while (true) {
michael@0 30 var file = code.shift();
michael@0 31 if (file == "evaluate") {
michael@0 32 loadFiles(files);
michael@0 33 } else if (file == undefined) {
michael@0 34 break;
michael@0 35 } else {
michael@0 36 files.push(file);
michael@0 37 }
michael@0 38 }
michael@0 39 function loadFiles(x) {
michael@0 40 for (i in x) {
michael@0 41 try {
michael@0 42 eval(x[i]);
michael@0 43 } catch (e) {
michael@0 44 }
michael@0 45 }
michael@0 46 optionsReset();
michael@0 47 }
michael@0 48

mercurial