Bug 1148383 - Add testcase for previously fixed object metadata issue r=terrence a=lizzard
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 14 Apr 2015 12:04:15 +0100
changeset 267027 3bbd67c48d8d3ae8df007fd93379232cf20a3a9a
parent 267026 c441433ba33e9169a2aefb77484c5dfef4bf1952
child 267028 c66b1101f3a93fe957875372ea0a50d3044109b7
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence, lizzard
bugs1148383
milestone39.0a2
Bug 1148383 - Add testcase for previously fixed object metadata issue r=terrence a=lizzard
js/src/jit-test/tests/gc/bug-1148383.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/gc/bug-1148383.js
@@ -0,0 +1,19 @@
+// This testcase tests setting object metadata for objects created from JIT
+// code.
+if (!("getJitCompilerOptions" in this))
+  quit();
+opts = getJitCompilerOptions();
+if (!opts['ion.enable'] || !opts['baseline.enable'])
+  quit();
+
+function TestCase() {}
+function reportCompare () {
+  var output = "";
+  var testcase = new TestCase();
+  testcase.reason = output;
+}
+reportCompare();
+gczeal(4, 1000);
+setObjectMetadataCallback(true);
+for (var i = 0; i < 10000; ++i)
+  reportCompare();