Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMissing return_rw_data calls in LayoutTask? #8358
Open
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 theLayoutTaskDatainLayoutTask::start.We still want to allow layout code to update the
LayoutTaskDatabefore the first reflow, so we allow it to callLayoutTask::lock_rw_datato take the lock, and then callingLayoutTask::return_rw_datato return the lock (keeping the script code waiting).However, some callers (at least
GetCurrentEpoch,GetWebFontLoadStateandCollectReports) don't callLayoutTask::return_rw_data, and thus leave the script thread free to read from theLayoutTaskData.As far as I can tell, there is no fundamental reason none of those can happen before the first reflow.