Bug 1244225 - Do not access allocation recording settings when the memory component isn't attached. r=fitzgen

This commit is contained in:
Jordan Santell 2016-02-08 14:25:00 +01:00
parent 345570e137
commit c3b5fde449

View File

@ -467,7 +467,13 @@ const PerformanceRecorder = exports.PerformanceRecorder = Class({
* @return {object}
*/
getConfiguration: function () {
return extend({}, this._memory.getAllocationsSettings(), this._profiler.getStartOptions());
let allocationSettings = Object.create(null);
if (this._memory.getState() === "attached") {
allocationSettings = this._memory.getAllocationsSettings();
}
return extend({}, allocationSettings, this._profiler.getStartOptions());
},
toString: () => "[object PerformanceRecorder]"