diff options
Diffstat (limited to 'chrome/worker/worker_thread.cc')
-rw-r--r-- | chrome/worker/worker_thread.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/worker/worker_thread.cc b/chrome/worker/worker_thread.cc index ac8a1c7..0591902 100644 --- a/chrome/worker/worker_thread.cc +++ b/chrome/worker/worker_thread.cc @@ -62,3 +62,22 @@ void WorkerThread::OnCreateWorker(const GURL& url, else new WebWorkerStub(url, route_id); } + +// The browser process is likely dead. Terminate all workers. +void WorkerThread::OnChannelError() { + set_on_channel_error_called(true); + + for (WorkerStubsList::iterator it = worker_stubs_.begin(); + it != worker_stubs_.end(); ++it) { + (*it)->OnChannelError(); + } +} + +void WorkerThread::RemoveWorkerStub(WebWorkerStubBase* stub) { + worker_stubs_.erase(stub); +} + +void WorkerThread::AddWorkerStub(WebWorkerStubBase* stub) { + worker_stubs_.insert(stub); +} + |