Repository navigation
Synchronous script loading during HTML parsing - #3721
Merged
Merged
Conversation
|
Critic review: https://critic.hoppipolla.co.uk/r/2904 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
mbrubeck
force-pushed
the
script-sync
branch
2 times, most recently
from
October 29, 2014 19:51
585b7cf to
b807bcb
Compare
Contributor
|
Possibly intermittent? |
This implements the parts of the "prepare a script element" algorithm that are required for synchronous scripts. It also adds some infrastructure for future support of the `async` and `defer` attributes.
This removes the old code for asyncronously loading scripts during HTML parsing and then executing them afterward. Fixes servo#3356.
This fixes a performance regression caused by the previous patches. Once we allowed script and layout to run during parsing, it was running too often (every time the document changed and called window.reflow). Fixes servo#1269.
Contributor
There was a problem hiding this comment.
Does the JS event loop get to spin while this happens?
Contributor
Author
There was a problem hiding this comment.
No, this blocks the script thread. We need to fix this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3356. This makes script elements fetch their source synchronously and execute immediately by default. It also lays some groundwork for future deferred or async script loading.
(Depends on #3716 to fix a content test failure caused by running script during parsing.)