Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
URLLoader: Remove unnecessary null checks, and an is_pending() check.
A URLLoader creates a URLRequest on construction, and destroys it on destruction. It can never have a null URLRequest. This wasn't always the case, but is now. As for the is_pending() check: A URLRequest can only be canceled in two places, and can't complete successfully when there's a pending callback. The cancel calls are in places that only happen in response to different pending callbacks, and only one pending callback can be outstanding at a time, so the is_pending() check isn't needed. This is the only invocation if URLRequest::is_pending() in production, so it can now be made test only, or removed (The underlying value is still used in DCHECKs, so we can't just remove it, unless we want to lose those). Bug: 934009 Change-Id: Iec5eb4467a5cda1a8afc12f204086bbfc00ab7b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814884 Reviewed-by: Eric Roman <eroman@chromium.org> Commit-Queue: Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#698494}
- Loading branch information