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

Unified Diff: chrome/browser/conflicts/module_database_win.cc

Issue 2714873002: Fix 2 issues that were hitting dchecks when enabling ModuleDatabase (Closed)
Patch Set: Created 3 years, 10 months 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
« no previous file with comments | « no previous file | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/conflicts/module_database_win.cc
diff --git a/chrome/browser/conflicts/module_database_win.cc b/chrome/browser/conflicts/module_database_win.cc
index c5a090f3a2680e31ca6180a35690e5780baf4431..e6b828cf4d87d5948f9ed2243030b4f887b9de0a 100644
--- a/chrome/browser/conflicts/module_database_win.cc
+++ b/chrome/browser/conflicts/module_database_win.cc
@@ -226,7 +226,8 @@ void ModuleDatabase::RemoveLoadAddressById(
// This handles the special case of removing the max element in O(1), as
// FindLoadAddressIndexById processes the elements in reverse order.
size_t i = FindLoadAddressIndexById(module_id, *load_addresses);
- RemoveLoadAddressByIndex(i, load_addresses);
+ if (i != kInvalidIndex)
+ RemoveLoadAddressByIndex(i, load_addresses);
}
// static
« no previous file with comments | « no previous file | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698