Commit a6ba0312 authored by Tarun Bansal's avatar Tarun Bansal Committed by Commit Bot

Resource Scheduler: Add DCHECK to verify that fifo ordering is set

Add DCHECK to ensure that FIFO ordering in set in resource scheduler
for each request before it is consumed. Note that FIFO ordering is
used to decide the order in which requests are dispatched to the
network.

This CL does not make any functional change.

Change-Id: Iabd7562c1b680c10d10c4890e8c42d04c379486d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1984902Reviewed-by: default avatarMichael Crouse <mcrouse@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728040}
parent 72cc55a5
......@@ -312,7 +312,11 @@ class ResourceScheduler::ScheduledResourceRequestImpl
net::URLRequest* url_request() { return request_; }
const net::URLRequest* url_request() const { return request_; }
bool is_async() const { return is_async_; }
uint32_t fifo_ordering() const { return fifo_ordering_; }
uint32_t fifo_ordering() const {
// Ensure that |fifo_ordering_| has been set before it's used.
DCHECK_LT(0u, fifo_ordering_);
return fifo_ordering_;
}
void set_fifo_ordering(uint32_t fifo_ordering) {
fifo_ordering_ = fifo_ordering;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment