mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
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:
parent
c5f7c7111f
commit
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,
|
||||
|
Loading…
Reference in New Issue
Block a user