mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: copy received data in URLPipeLoader to prevent corruption (#29667)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
@@ -87,7 +87,7 @@ void URLPipeLoader::OnDataReceived(base::StringPiece string_piece,
|
||||
producer_->Write(
|
||||
std::make_unique<mojo::StringDataSource>(
|
||||
string_piece, mojo::StringDataSource::AsyncWritingMode::
|
||||
STRING_STAYS_VALID_UNTIL_COMPLETION),
|
||||
STRING_MAY_BE_INVALIDATED_BEFORE_COMPLETION),
|
||||
base::BindOnce(&URLPipeLoader::OnWrite, weak_factory_.GetWeakPtr(),
|
||||
std::move(resume)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user