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

Side by Side Diff: content/browser/plugin_loader_posix.cc

Issue 9349002: Merge 120098 - PluginLoaderPosix: Fix the case where the utility process crashes after all plugin... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/plugin_loader_posix_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/plugin_loader_posix.h" 5 #include "content/browser/plugin_loader_posix.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 26 matching lines...) Expand all
37 bool handled = true; 37 bool handled = true;
38 IPC_BEGIN_MESSAGE_MAP(PluginLoaderPosix, message) 38 IPC_BEGIN_MESSAGE_MAP(PluginLoaderPosix, message)
39 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadedPlugin, OnPluginLoaded) 39 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadedPlugin, OnPluginLoaded)
40 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadPluginFailed, OnPluginLoadFailed) 40 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadPluginFailed, OnPluginLoadFailed)
41 IPC_MESSAGE_UNHANDLED(handled = false) 41 IPC_MESSAGE_UNHANDLED(handled = false)
42 IPC_END_MESSAGE_MAP() 42 IPC_END_MESSAGE_MAP()
43 return handled; 43 return handled;
44 } 44 }
45 45
46 void PluginLoaderPosix::OnProcessCrashed(int exit_code) { 46 void PluginLoaderPosix::OnProcessCrashed(int exit_code) {
47 canonical_list_.erase(canonical_list_.begin(), 47 if (next_load_index_ == canonical_list_.size()) {
48 canonical_list_.begin() + next_load_index_ + 1); 48 // How this case occurs is unknown. See crbug.com/111935.
49 canonical_list_.clear();
50 } else {
51 canonical_list_.erase(canonical_list_.begin(),
52 canonical_list_.begin() + next_load_index_ + 1);
53 }
54
49 next_load_index_ = 0; 55 next_load_index_ = 0;
50 56
51 LoadPluginsInternal(); 57 LoadPluginsInternal();
52 } 58 }
53 59
54 bool PluginLoaderPosix::Send(IPC::Message* message) { 60 bool PluginLoaderPosix::Send(IPC::Message* message) {
55 if (process_host_) 61 if (process_host_)
56 return process_host_->Send(message); 62 return process_host_->Send(message);
57 return false; 63 return false;
58 } 64 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 180
175 PluginLoaderPosix::PendingCallback::PendingCallback( 181 PluginLoaderPosix::PendingCallback::PendingCallback(
176 scoped_refptr<base::MessageLoopProxy> loop, 182 scoped_refptr<base::MessageLoopProxy> loop,
177 const content::PluginService::GetPluginsCallback& cb) 183 const content::PluginService::GetPluginsCallback& cb)
178 : target_loop(loop), 184 : target_loop(loop),
179 callback(cb) { 185 callback(cb) {
180 } 186 }
181 187
182 PluginLoaderPosix::PendingCallback::~PendingCallback() { 188 PluginLoaderPosix::PendingCallback::~PendingCallback() {
183 } 189 }
OLDNEW
« 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