Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing return_rw_data calls in LayoutTask? #8358

Open
Ms2ger opened this issue Nov 5, 2015 · 1 comment
Open

Missing return_rw_data calls in LayoutTask? #8358

Ms2ger opened this issue Nov 5, 2015 · 1 comment

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Nov 5, 2015

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.

@Ms2ger
Copy link
Contributor Author

@Ms2ger Ms2ger commented Nov 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.