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

--HG--
extra : rebase_source : 9c71a7bbd76f9c0ab5fb185e509d6fe5b59c5f80
This commit is contained in:
Jordan Santell 2016-02-08 14:25:00 +01:00
Родитель d1f0a04370
Коммит a0db96a838
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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]"