fix: copy received data in URLPipeLoader to prevent corruption (#29567)
This commit is contained in:
parent
af7181b93f
commit
e8c9a814d6
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ void URLPipeLoader::OnDataReceived(base::StringPiece string_piece,
|
||||||
producer_->Write(
|
producer_->Write(
|
||||||
std::make_unique<mojo::StringDataSource>(
|
std::make_unique<mojo::StringDataSource>(
|
||||||
string_piece, mojo::StringDataSource::AsyncWritingMode::
|
string_piece, mojo::StringDataSource::AsyncWritingMode::
|
||||||
STRING_STAYS_VALID_UNTIL_COMPLETION),
|
STRING_MAY_BE_INVALIDATED_BEFORE_COMPLETION),
|
||||||
base::BindOnce(&URLPipeLoader::OnWrite, weak_factory_.GetWeakPtr(),
|
base::BindOnce(&URLPipeLoader::OnWrite, weak_factory_.GetWeakPtr(),
|
||||||
std::move(resume)));
|
std::move(resume)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue