| Index: ui/compositor/test/context_factories_for_test.cc
|
| diff --git a/ui/compositor/test/context_factories_for_test.cc b/ui/compositor/test/context_factories_for_test.cc
|
| index 78aac8d3fafbfa9db15535e212e1c157c883d871..174f34160cb093c5a16f126fb26613c2fa9797dd 100644
|
| --- a/ui/compositor/test/context_factories_for_test.cc
|
| +++ b/ui/compositor/test/context_factories_for_test.cc
|
| @@ -15,7 +15,7 @@
|
| namespace {
|
|
|
| static cc::SurfaceManager* g_surface_manager = nullptr;
|
| -static ui::ContextFactory* g_implicit_factory = NULL;
|
| +static ui::InProcessContextFactory* g_implicit_factory = NULL;
|
| static gl::DisableNullDrawGLBindings* g_disable_null_draw = NULL;
|
|
|
| } // namespace
|
| @@ -39,8 +39,11 @@ ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output) {
|
| }
|
|
|
| void TerminateContextFactoryForTests() {
|
| - delete g_implicit_factory;
|
| - g_implicit_factory = NULL;
|
| + if (g_implicit_factory) {
|
| + g_implicit_factory->SendOnLostResources();
|
| + delete g_implicit_factory;
|
| + g_implicit_factory = NULL;
|
| + }
|
| delete g_surface_manager;
|
| g_surface_manager = nullptr;
|
| delete g_disable_null_draw;
|
|
|