Commit 334a196b authored by Daniel Vogelheim's avatar Daniel Vogelheim Committed by Commit Bot

Add additional checks for script streaming.

Add additional checks to script streaming, to help diagnose crbug.com/784326.

Bug: 784326
Change-Id: I19aacefc260dce0f5836fa14a217701d388f566c
Reviewed-on: https://chromium-review.googlesource.com/874191Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530467}
parent 98744bfa
......@@ -148,6 +148,8 @@ void ClassicPendingScript::CancelStreaming() {
streamer_->Cancel();
streamer_ = nullptr;
streamer_done_.Reset();
is_currently_streaming_ = false;
DCHECK(!IsCurrentlyStreaming());
}
void ClassicPendingScript::NotifyFinished(Resource* resource) {
......@@ -324,6 +326,13 @@ void ClassicPendingScript::AdvanceReadyState(ReadyState new_ready_state) {
// Streaming-related post conditions:
// To help diagnose crbug.com/78426, we'll temporarily add some DCHECKs
// that are a subset of the DCHECKs below:
if (IsCurrentlyStreaming()) {
DCHECK(streamer_);
DCHECK(!streamer_->IsFinished());
}
// IsCurrentlyStreaming should match what streamer_ thinks.
DCHECK_EQ(IsCurrentlyStreaming(), streamer_ && !streamer_->IsFinished());
// IsCurrentlyStreaming should match the ready_state_.
......
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