Commit 53671fc6 authored by Richard Townsend's avatar Richard Townsend Committed by Chromium LUCI CQ

fixup: ensure HTMLPreloadScanner construction on Append

Attempts to fix an ASAN-detected crash for IsPrefetchOnly() Documents.

Bug: 901056, 1164226, 1160665, 1164377
Change-Id: I74c75c58d3e2d9319f67997e3b08d1ab7d5e008d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2618362Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#841588}
parent 50f5085c
...@@ -1229,7 +1229,7 @@ void HTMLDocumentParser::Append(const String& input_source) { ...@@ -1229,7 +1229,7 @@ void HTMLDocumentParser::Append(const String& input_source) {
const SegmentedString source(input_source); const SegmentedString source(input_source);
if (!preload_scanner_ && preloader_ && GetDocument()->Url().IsValid() && if (!preload_scanner_ && GetDocument()->Url().IsValid() &&
(!task_runner_state_->IsSynchronous() || (!task_runner_state_->IsSynchronous() ||
GetDocument()->IsPrefetchOnly() || IsPaused())) { GetDocument()->IsPrefetchOnly() || IsPaused())) {
// If we're operating with synchronous, budgeted foreground HTML parsing // If we're operating with synchronous, budgeted foreground HTML parsing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment