Use a counter for DocumentLoader::BlockParser().
Replace usage of a bool by a counter to control whether or not the parser is allowed to read new data or not. Since WebDocumentLoader::BlockParser() is public, they may be several components trying to pause the parser at the same time. Using a counter make it possible to wait for all of them to call WebDocumentLoader::ResumeParser(). This is a follow up for: https://chromium-review.googlesource.com/982059 Bug: 822650 Change-Id: Id6d42f911f4b6e69ca942d8bf19acd296327d419 Reviewed-on: https://chromium-review.googlesource.com/992033Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#548028}
Showing
Please register or sign in to comment