| Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| index 345ad2a4f423957b4e60b9751365084ef4b0a464..edc79849be8198d31addc3b18ee311b125a85cb8 100644
|
| --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| @@ -212,8 +212,13 @@ void BrowserGpuChannelHostFactory::Initialize(bool establish_gpu_channel) {
|
|
|
| void BrowserGpuChannelHostFactory::Terminate() {
|
| DCHECK(instance_);
|
| - delete instance_;
|
| +
|
| + // Reset the |instance_| first so we don't receive any more Gpu Channel
|
| + // initialization requests as we run the existing callbacks.
|
| + BrowserGpuChannelHostFactory* current_instance = instance_;
|
| instance_ = NULL;
|
| +
|
| + delete current_instance;
|
| }
|
|
|
| BrowserGpuChannelHostFactory::BrowserGpuChannelHostFactory()
|
|
|