You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some RPC queries (in particular, hit_test/get_nodes_under_mouse) are made from script without requesting a reflow first. In order to prevent these queries finishing before the first reflow, we lock the LayoutTaskData in LayoutTask::start.
We still want to allow layout code to update the LayoutTaskData before the first reflow, so we allow it to call LayoutTask::lock_rw_data to take the lock, and then calling LayoutTask::return_rw_data to return the lock (keeping the script code waiting).
However, some callers (at least GetCurrentEpoch, GetWebFontLoadState and CollectReports) don't call LayoutTask::return_rw_data, and thus leave the script thread free to read from the LayoutTaskData.
As far as I can tell, there is no fundamental reason none of those can happen before the first reflow.
Activity
Ms2ger commentedon Nov 5, 2015
CC @pcwalton
mrobinson commentedon Aug 5, 2025
I think this is no longer applicable since we do trigger layouts for most queries and layout and script aren't separated by RPC any longer.