Bug 1511714 - Unbreak on platform without GeckoProfiler after bug 1509571. r=mconley

This commit is contained in:
Jan Beich 2018-12-02 11:56:00 +02:00
Родитель 10e1038809
Коммит afaa32ab40
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -76,7 +76,9 @@ var StartupPerformance = {
// Record the start timestamp, setup the timer and `this._promiseFinished`.
// Behavior is unspecified if there was already an ongoing measure.
_onRestorationStarts(isAutoRestore) {
Services.profiler.AddMarker("_onRestorationStarts");
if (Services.profiler) {
Services.profiler.AddMarker("_onRestorationStarts");
}
this._latestRestoredTimeStamp = this._startTimeStamp = Date.now();
this._totalNumberOfEagerTabs = 0;
this._totalNumberOfTabs = 0;
@ -199,7 +201,9 @@ var StartupPerformance = {
// to the user switching to a lazily restored tab, or for tabs
// that are restoring eagerly.
if (!event.detail.isRemotenessUpdate) {
Services.profiler.AddMarker("SSTabRestored");
if (Services.profiler) {
Services.profiler.AddMarker("SSTabRestored");
}
this._latestRestoredTimeStamp = Date.now();
this._totalNumberOfEagerTabs += 1;
}