зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646266 - Marker option: MarkerInnerWindowId - r=gregtatum
This option can take an inner window id. Differential Revision: https://phabricator.services.mozilla.com/D87248
This commit is contained in:
Родитель
e31033f92d
Коммит
092e6ca746
|
@ -535,6 +535,27 @@ class MarkerStack {
|
||||||
ProfileChunkedBuffer* mChunkedBuffer = nullptr;
|
ProfileChunkedBuffer* mChunkedBuffer = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// This marker option captures a given inner window id.
|
||||||
|
class MarkerInnerWindowId {
|
||||||
|
public:
|
||||||
|
// Default constructor, it leaves the id unspecified.
|
||||||
|
constexpr MarkerInnerWindowId() = default;
|
||||||
|
|
||||||
|
// Constructor with a specified inner window id.
|
||||||
|
constexpr explicit MarkerInnerWindowId(uint64_t i) : mInnerWindowId(i) {}
|
||||||
|
|
||||||
|
// Explicit option with unspecified id.
|
||||||
|
constexpr static MarkerInnerWindowId NoId() { return MarkerInnerWindowId{}; }
|
||||||
|
|
||||||
|
[[nodiscard]] bool IsUnspecified() const { return mInnerWindowId == scNoId; }
|
||||||
|
|
||||||
|
[[nodiscard]] constexpr uint64_t Id() const { return mInnerWindowId; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static constexpr uint64_t scNoId = 0;
|
||||||
|
uint64_t mInnerWindowId = scNoId;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // MOZ_GECKO_PROFILER
|
#endif // MOZ_GECKO_PROFILER
|
||||||
|
|
Загрузка…
Ссылка в новой задаче