Bug 1196901 - Use correct GC marker reasoning, regression from 1191153. r=fitzgen

This commit is contained in:
Jordan Santell 2015-08-20 14:17:24 -07:00
parent 4e47d85120
commit 7ae45e69ee
2 changed files with 3 additions and 3 deletions

View File

@ -362,7 +362,7 @@ const Formatters = {
GCFields: function (marker) {
let fields = Object.create(null);
let cause = marker.cause;
let cause = marker.causeName;
let label = L10N.getStr(`marker.gcreason.label.${cause}`) || cause;
fields[L10N.getStr("marker.field.causeName")] = label;

View File

@ -39,10 +39,10 @@ add_task(function () {
equal(fields[1].label, "Phase:", "getMarkerFields() correctly returns fields via function (3)");
equal(fields[1].value, "Target", "getMarkerFields() correctly returns fields via function (4)");
fields = Utils.getMarkerFields({ name: "GarbageCollection", cause: "ALLOC_TRIGGER" });
fields = Utils.getMarkerFields({ name: "GarbageCollection", causeName: "ALLOC_TRIGGER" });
equal(fields[0].value, "Too Many Allocations", "Uses L10N for GC reasons");
fields = Utils.getMarkerFields({ name: "GarbageCollection", cause: "NOT_A_GC_REASON" });
fields = Utils.getMarkerFields({ name: "GarbageCollection", causeName: "NOT_A_GC_REASON" });
equal(fields[0].value, "NOT_A_GC_REASON", "Defaults to enum for GC reasons when not L10N'd");
equal(Utils.getMarkerFields({ name: "Javascript", causeName: "Some Platform Field" })[0].value, "(Gecko)",