зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d1f0a04370
Коммит
a0db96a838
|
@ -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]"
|
||||
|
|
Загрузка…
Ссылка в новой задаче