DescriptionThreaded HTML parser ASSERTs on Android
The parser is supposed to stop processing data when there's a pending location
change, but before this CL we would actually process the first token from every
chunk when there was a pending location change.
If the first token in a chunk was a "script" start tag, that would put the tree
builder into TextMode, which can only process character tokens. If the next
chunk starts with another start tag token, the tree builder would be sad and
hit an ASSERT.
This CL reorders a couple lines in HTMLDocumentParser so that we check for
pending location changes before processing any tokens. This change stops us
from processing the first token from each chunk while there is a pending
location change.
This issue can reproduce on any platform, but it reproduced often on Android
because mobile markup often elides spaces between consecutive script tags. If
there are space characters between the script tags, then those space characters
will be the first ones processes in the chunk, which doesn't trigger the ASSERT.
BUG=230542
R=eseidel@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=150065
Patch Set 1 #
Messages
Total messages: 4 (0 generated)
|