Commit 562ea3ef authored by Alex Clarke's avatar Alex Clarke Committed by Commit Bot

The background parser doesn't need to block Virtual Time anymore

For determinism Virtual Time needed to be blocked when the background
parser was running on the background thread.  That thread no longer
exists (it now runs on the main thread) so we can remove the
WebScopedVirtualTimePauser.

Bug: 777763
Change-Id: I0c5f31fcb8c7dbd45ac922be831951143f1c48a9
Reviewed-on: https://chromium-review.googlesource.com/817747
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523085}
parent 145f1616
...@@ -797,15 +797,6 @@ void HTMLDocumentParser::StartBackgroundParser() { ...@@ -797,15 +797,6 @@ void HTMLDocumentParser::StartBackgroundParser() {
DCHECK(GetDocument()); DCHECK(GetDocument());
have_background_parser_ = true; have_background_parser_ = true;
if (GetDocument()->GetFrame() &&
GetDocument()->GetFrame()->FrameScheduler()) {
virtual_time_pauser_ = GetDocument()
->GetFrame()
->FrameScheduler()
->CreateWebScopedVirtualTimePauser();
virtual_time_pauser_.PauseVirtualTime(true);
}
// Make sure that a resolver is set up, so that the correct viewport // Make sure that a resolver is set up, so that the correct viewport
// dimensions will be fed to the background parser and preload scanner. // dimensions will be fed to the background parser and preload scanner.
if (GetDocument()->Loader()) if (GetDocument()->Loader())
...@@ -856,7 +847,6 @@ void HTMLDocumentParser::StopBackgroundParser() { ...@@ -856,7 +847,6 @@ void HTMLDocumentParser::StopBackgroundParser() {
DCHECK(ShouldUseThreading()); DCHECK(ShouldUseThreading());
DCHECK(have_background_parser_); DCHECK(have_background_parser_);
virtual_time_pauser_.PauseVirtualTime(false);
have_background_parser_ = false; have_background_parser_ = false;
// Make this sync, as lsan triggers on some unittests if the task runner is // Make this sync, as lsan triggers on some unittests if the task runner is
......
...@@ -285,8 +285,6 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser, ...@@ -285,8 +285,6 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
bool tried_loading_link_headers_; bool tried_loading_link_headers_;
bool added_pending_stylesheet_in_body_; bool added_pending_stylesheet_in_body_;
bool is_waiting_for_stylesheets_; bool is_waiting_for_stylesheets_;
WebScopedVirtualTimePauser virtual_time_pauser_;
}; };
} // namespace blink } // namespace blink
......
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