Bug 1435618: Don't leak a reference to the gfx info. r=kats
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 04 Feb 2018 17:40:40 +0100
changeset 457387 fed46d84d30dcd667bbae2c491142d8904fa0056
parent 457386 b3319e229c7deb6cebe79580f5ab959472d6dc51
child 457388 7c090dc7f0187e5fbbeadb8f7b5dd89d2b6477fb
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1435618
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1435618: Don't leak a reference to the gfx info. r=kats GetGfxInfo returns an already_AddRefed, you can't just forget about its return value. MozReview-Commit-ID: Ia6pyJN9njf
gfx/ipc/GPUParent.cpp
--- a/gfx/ipc/GPUParent.cpp
+++ b/gfx/ipc/GPUParent.cpp
@@ -187,17 +187,19 @@ GPUParent::RecvInit(nsTArray<GfxPrefSett
   }
 
 #if defined(XP_WIN)
   if (gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
     DeviceManagerDx::Get()->CreateCompositorDevices();
   }
   if (gfxVars::UseWebRender()) {
     // Ensure to initialize GfxInfo
-    services::GetGfxInfo();
+    nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
+    Unused << gfxInfo;
+
     Factory::EnsureDWriteFactory();
   }
 #endif
 
 #if defined(MOZ_WIDGET_GTK)
   char* display_name = PR_GetEnv("DISPLAY");
   if (display_name) {
     int argc = 3;