mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 14:30:43 +00:00

Only transactions that contain the generate_frame flag are tracked by the pending frame and frame build counters. This patch attempts to make this clearer with two small adjustments: Firstly by putting the IncPendingFrameCount call right next to Transaction::GenerateFrame. Secondly, undoing the hack in wr_notifier_wake_up. The latter is called outside of normal rendered/tracked frames and was calling HandleFrameOneDoc which decrements the rendered frame counter. To compensate it had to manually increment both counters via IncPendingFrameCount and manually decrement the built frame counter via DecPendingFrameBuildCount. Instead this patch introduces the aTrackedFrame argument so that HandleFrameOneDoc only fiddles with the counters when needed and wake_up does not have to hack around it. Differential Revision: https://phabricator.services.mozilla.com/D162298