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

SourceCache race condition can cause sources to fail to bubble events up to map #3735

Closed
lbud opened this issue Dec 2, 2016 · 0 comments
Closed
Assignees
Labels

Comments

@lbud
Copy link
Contributor

lbud commented Dec 2, 2016

There is a race condition wherein sources that quickly fire events upon construction fail to bubble events to their omniparent (map) because sources are created in SourceCache (source_cache.js#L30), but the SourceCache parent is created before calling setEventedParent(style.js#L376-L382) to add it to the Map -> Style -> SourceCache ownership chain. Generally in our existing source types this isn't a problem, as they usually load data over a network connection and don't race to fire events as quickly (so when they do they already have a map grandparent), but I noticed this problem while working on the canvas source type #3580 which loads its data from the same page.

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

No branches or pull requests

1 participant