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

Unified Diff: content/browser/plugin_loader_posix.cc

Issue 9297049: PluginLoaderPosix: Fix an off by one error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 8 years, 11 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 | content/browser/plugin_loader_posix_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_loader_posix.cc
diff --git a/content/browser/plugin_loader_posix.cc b/content/browser/plugin_loader_posix.cc
index 9701a7289afe51e198621441e1b98757635dcc51..aced125568258c6adb1da86d8e742b62cde7f37c 100644
--- a/content/browser/plugin_loader_posix.cc
+++ b/content/browser/plugin_loader_posix.cc
@@ -44,8 +44,13 @@ bool PluginLoaderPosix::OnMessageReceived(const IPC::Message& message) {
}
void PluginLoaderPosix::OnProcessCrashed(int exit_code) {
- canonical_list_.erase(canonical_list_.begin(),
- canonical_list_.begin() + next_load_index_ + 1);
+ if (next_load_index_ == canonical_list_.size()) {
Robert Sesek 2012/01/31 23:16:51 nit: Add a comment referencing this bug.
James Hawkins 2012/01/31 23:28:22 Done.
Robert Sesek 2012/02/01 00:19:10 FYI this isn't on the latest patch set if you inte
+ canonical_list_.clear();
+ } else {
+ canonical_list_.erase(canonical_list_.begin(),
+ canonical_list_.begin() + next_load_index_ + 1);
+ }
+
next_load_index_ = 0;
LoadPluginsInternal();
« no previous file with comments | « no previous file | content/browser/plugin_loader_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698