summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/xdr/asm.js
blob: 5e28e9da004ec4e99f12336f4416b84191f330b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
load(libdir + 'bytecode-cache.js');

var test = (function () {
  function f() {
    var x = function inner() {
	"use asm";
	function g() {}
	return g;
    };
  };
  return f.toString();
})();

try {
  evalWithCache(test, {});
} catch (x) {
  assertEq(x.message.includes("Asm.js is not supported by XDR") ||
           x.message.includes("XDR encoding failure"), true);
}