summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/wasm/regress/null-metadata-filename.js')
-rw-r--r--js/src/jit-test/tests/wasm/regress/null-metadata-filename.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js b/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js
new file mode 100644
index 0000000000..638fef6c40
--- /dev/null
+++ b/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js
@@ -0,0 +1,20 @@
+// |jit-test| skip-if: !isAsmJSCompilationAvailable()
+
+enableGeckoProfiling();
+var code = evaluate("(function() { 'use asm'; function g() { return 43 } return g })", {
+ fileName: null
+});
+
+assertEq(code()(), 43);
+
+evaluate(`
+let f = evalReturningScope.bind(null, '');
+
+(function(glob, stdlib) {
+ "use asm";
+ var f = stdlib.f;
+ function _() { f(); }
+ return _;
+})(this, { f })();
+`, { fileName: null });
+