Commit f32c0467 authored by Adam Rice's avatar Adam Rice Committed by Commit Bot

Remove unneeded CHECKs from CloseAndLockAndDisturb

https://chromium-review.googlesource.com/c/1262055 introduced CHECK
statements to BodyStreamBuffer::CloseAndLockAndDisturb to verify that
the stream is not garbage collected during execution of the function.
None of the CHECK statements have been hit, so we can reasonably
conclude that this is not happening in practice.

These CHECKs should not be included in a stable release, so remove them.

BUG=882599

Change-Id: I6c132ffd81c6642df7f4d9628b76f108f24bc2ed
Reviewed-on: https://chromium-review.googlesource.com/c/1296571Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603054}
parent 821303d2
......@@ -402,11 +402,6 @@ void BodyStreamBuffer::CloseAndLockAndDisturb(ExceptionState& exception_state) {
if (exception_state.HadException())
return;
// This IsEmpty() CHECK and the other ones in this method are temporary to
// help diagnose https://crbug.com/882599.
// TODO(ricea): Remove these checks before M71 becomes stable.
CHECK(!stream_.IsEmpty());
DCHECK(is_readable.has_value());
if (is_readable.value()) {
// Note that the stream cannot be "draining", because it doesn't have
......@@ -417,14 +412,10 @@ void BodyStreamBuffer::CloseAndLockAndDisturb(ExceptionState& exception_state) {
ScriptState::Scope scope(script_state_);
CHECK(!stream_.IsEmpty());
const base::Optional<bool> is_locked = IsStreamLocked(exception_state);
if (exception_state.HadException() || is_locked.value())
return;
CHECK(!stream_.IsEmpty());
ScriptValue reader = ReadableStreamOperations::GetReader(
script_state_, Stream(), exception_state);
if (exception_state.HadException()) {
......@@ -432,8 +423,6 @@ void BodyStreamBuffer::CloseAndLockAndDisturb(ExceptionState& exception_state) {
return;
}
CHECK(!stream_.IsEmpty());
ReadableStreamOperations::DefaultReaderRead(script_state_, reader);
}
......
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