summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1061534.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug1061534.js')
-rw-r--r--js/src/jit-test/tests/basic/bug1061534.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug1061534.js b/js/src/jit-test/tests/basic/bug1061534.js
new file mode 100644
index 0000000000..3fce6a7580
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug1061534.js
@@ -0,0 +1,15 @@
+
+test = (function () {
+ function f() {};
+ return "var obj = { x : 2 };" + f.toString() + (4);
+})();
+evalWithCache(test, {});
+function evalWithCache(code, ctx) {
+ code = cacheEntry(code);
+ ctx.global = newGlobal({ cloneSingletons: true });
+ var res1 = evaluate(code, Object.create(ctx, {saveIncrementalBytecode: { value: true } }));
+}
+if (typeof assertThrowsInstanceOf === 'undefined') {
+ var assertThrowsInstanceOf = function assertThrowsInstanceOf(f, ctor, msg) {};
+}
+evaluate('evaluate(\'assertThrowsInstanceOf(function () {}, ["jak", "ms"]);\', { noScriptRval : true, isRunOnce: true })');