Skip to content

Commit f714556

Browse files
authored
fix: ensure object is not used after move (electron#26115)
1 parent 29016b4 commit f714556

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shell/browser/net/electron_url_loader_factory.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,10 @@ void ElectronURLLoaderFactory::SendContents(
549549
write_data->data = std::move(data);
550550
write_data->producer =
551551
std::make_unique<mojo::DataPipeProducer>(std::move(producer));
552+
auto* producer_ptr = write_data->producer.get();
552553

553554
base::StringPiece string_piece(write_data->data);
554-
write_data->producer->Write(
555+
producer_ptr->Write(
555556
std::make_unique<mojo::StringDataSource>(
556557
string_piece, mojo::StringDataSource::AsyncWritingMode::
557558
STRING_STAYS_VALID_UNTIL_COMPLETION),

0 commit comments

Comments
 (0)