Skip to content

Commit

Permalink
Check SpanOrSize data before using it. (#25904)
Browse files Browse the repository at this point in the history
* Check SpanOrSize data before using it.

* Simplify condition.
  • Loading branch information
goodov authored and emerick committed Oct 9, 2024
1 parent 045c0b5 commit df66a60
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,9 @@ void PageGraph::DidReceiveData(uint64_t identifier,
if (TrackedRequestRecord* request_record =
request_tracker_.GetTrackingRecord(identifier)) {
if (TrackedRequest* request = request_record->request.get()) {
request->UpdateResponseBodyHash(*data.span());
if (auto data_span = data.span()) {
request->UpdateResponseBodyHash(*data_span);
}
}
return;
}
Expand Down

0 comments on commit df66a60

Please sign in to comment.