Closed Bug 1512809 Opened 5 years ago Closed 5 years ago

DEVTOOLS_FLEXBOX_HIGHLIGHTER_TIME_ACTIVE_SECONDS intermittently throws an exception during tests

Categories

(DevTools :: Inspector, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: miker, Assigned: miker)

References

(Blocks 1 open bug)

Details

The problem is difficult to explain but here goes:

1. toolOpened() is called with a reference to the highlighter overlay (obj1).
2. toolOpened() is called with a reference to obj1 overwriting the previous call.
3. toolClosed() is called with a reference to obj1, which finalizes the toolOpened reference.
4. toolClosed() is called with a reference to obj1. Because this event was finalized this throws the following exception:
   'Error: TelemetryStopwatch: requesting elapsed time for nonexisting stopwatch. Histogram: "DEVTOOLS_FLEXBOX_HIGHLIGHTER_TIME_ACTIVE_SECONDS"'

The reason this happens is that the object you send needs to be unique to a single toolOpen and toolClosed event.

This is not normally a problem but because "display-change" is a batched event we don't receive it straight away.

The following would work:

1. toolOpened() is called with a reference to some unique object (obj1).
2. toolOpened() is called with a reference to another unique object (obj2).
3. toolClosed() is called with a reference to obj1.
4. toolClosed() is called with a reference to obj2.

The difficulty here is finding a way to send the same object from toolClosed() as we did for toolOpened() because we can receive them in any order.

This was fixed in the last telemetry update.

Assignee: nobody → mratcliffe
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.