зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1778432 - [devtools] Guard against missing Services.profiler in Actor:_sendEvent r=nchevobbe
The Services object is replaced by a mock in the worker loader so Services.profiler might be undefined. Differential Revision: https://phabricator.services.mozilla.com/D151211
This commit is contained in:
Родитель
c5f7c7111f
Коммит
d6eac88099
|
@ -76,7 +76,9 @@ class Actor extends Pool {
|
|||
|
||||
// This can really be a hot path, even computing the marker label can
|
||||
// have some performance impact.
|
||||
if (Services.profiler.IsActive()) {
|
||||
// Guard against missing `Services.profiler` because Services is mocked to
|
||||
// an empty object in the worker loader.
|
||||
if (Services.profiler?.IsActive()) {
|
||||
ChromeUtils.addProfilerMarker(
|
||||
"DevTools:RDP Actor",
|
||||
null,
|
||||
|
|
Загрузка…
Ссылка в новой задаче