| Index: content/browser/android/content_view_statics.cc
|
| ===================================================================
|
| --- content/browser/android/content_view_statics.cc (revision 258675)
|
| +++ content/browser/android/content_view_statics.cc (working copy)
|
| @@ -44,14 +44,14 @@
|
| base::ProcessHandle handle,
|
| base::TerminationStatus status,
|
| int exit_code) OVERRIDE {
|
| - std::vector<int>::iterator pos = std::find(suspended_processes_.begin(),
|
| - suspended_processes_.end(),
|
| - host->GetID());
|
| - DCHECK_NE(pos, suspended_processes_.end());
|
| - host->RemoveObserver(this);
|
| - suspended_processes_.erase(pos);
|
| + StopWatching(host);
|
| }
|
|
|
| + virtual void RenderProcessHostDestroyed(
|
| + content::RenderProcessHost* host) OVERRIDE {
|
| + StopWatching(host);
|
| + }
|
| +
|
| // Suspends timers in all current render processes.
|
| void SuspendWebKitSharedTimers() {
|
| DCHECK(suspended_processes_.empty());
|
| @@ -82,6 +82,15 @@
|
| }
|
|
|
| private:
|
| + void StopWatching(content::RenderProcessHost* host) {
|
| + std::vector<int>::iterator pos = std::find(suspended_processes_.begin(),
|
| + suspended_processes_.end(),
|
| + host->GetID());
|
| + DCHECK_NE(pos, suspended_processes_.end());
|
| + host->RemoveObserver(this);
|
| + suspended_processes_.erase(pos);
|
| + }
|
| +
|
| std::vector<int /* RenderProcessHost id */> suspended_processes_;
|
| };
|
|
|
|
|