Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: content/browser/loader/resource_scheduler.cc

Issue 22243002: GTTF: Enable glibcxx debug mode for Debug builds by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_scheduler.cc
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index d24e484816c0152f3685345bc30c2c1fb0e87c4b..4ae240e6fe3207c2bc0096024a61674d62e5e580 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -374,7 +374,10 @@ void ResourceScheduler::LoadAnyStartablePendingRequests(Client* client) {
StartRequest(request, client);
// StartRequest can modify the pending list, so we (re)start evaluation
- // from the currently highest priority request.
+ // from the currently highest priority request. Avoid copying a singular
+ // iterator, which would trigger undefined behavior.
+ if (client->pending_requests.GetNextHighestIterator().is_null())
+ break;
request_iter = client->pending_requests.GetNextHighestIterator();
} else if (query_result == DO_NOT_START_REQUEST_AND_KEEP_SEARCHING) {
++request_iter;
« no previous file with comments | « chrome/common/extensions/extension_set.cc ('k') | content/public/browser/browser_child_process_host_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698