| Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
|
| diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
|
| index 885720299b89a543e849f4a0ac1c76b6a73806ca..2fe59c5d67c0e525c6c5012c04a7e30b11c2a1ae 100644
|
| --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
|
| +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
|
| @@ -199,8 +199,6 @@ class WebGraphicsContext3DCommandBufferImpl
|
|
|
| gfx::GpuPreference gpu_preference_;
|
|
|
| - base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
|
| -
|
| scoped_ptr<CommandBufferProxyImpl> command_buffer_;
|
| scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
|
| scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
|
| @@ -209,6 +207,11 @@ class WebGraphicsContext3DCommandBufferImpl
|
| Error last_error_;
|
| SharedMemoryLimits mem_limits_;
|
| scoped_refptr<ShareGroup> share_group_;
|
| +
|
| + // Member variables should appear before the WeakPtrFactory, to ensure
|
| + // that any WeakPtrs to Controller are invalidated before its members
|
| + // variable's destructors are executed, rendering them invalid.
|
| + base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
|
| };
|
|
|
| } // namespace content
|
|
|