Skip to content

Conversation

@daoshengmu
Copy link

Resolve #126 race condition issue.

@greggman
Copy link
Contributor

greggman commented Jan 6, 2017

It might depend on the browser? I'm not sure what exactly that race is. There's another race in loader.js . These 2 lines

injectScript("dependencies/syntaxhighlighter_3.0.83/shCore.js", injectState);
injectScript("dependencies/syntaxhighlighter_3.0.83/shBrushGLSL.js", injectState);

Since the scripts load async and the second one requires the first to already be loaded if they happen to load in the opposite order then it fails. That is fixed by the AMD loader since dependencies can be more explicit.

There's also a few circular dependencies which AFAICT are most ok (the aren't used until both loaded) but it would probably be good to remove the circles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants