fix: ensure object is not used after move (#26115)
This commit is contained in:
parent
29016b42c7
commit
f714556a12
1 changed files with 2 additions and 1 deletions
|
@ -549,9 +549,10 @@ void ElectronURLLoaderFactory::SendContents(
|
|||
write_data->data = std::move(data);
|
||||
write_data->producer =
|
||||
std::make_unique<mojo::DataPipeProducer>(std::move(producer));
|
||||
auto* producer_ptr = write_data->producer.get();
|
||||
|
||||
base::StringPiece string_piece(write_data->data);
|
||||
write_data->producer->Write(
|
||||
producer_ptr->Write(
|
||||
std::make_unique<mojo::StringDataSource>(
|
||||
string_piece, mojo::StringDataSource::AsyncWritingMode::
|
||||
STRING_STAYS_VALID_UNTIL_COMPLETION),
|
||||
|
|
Loading…
Add table
Reference in a new issue