Bug 587289: Unload D3D10_1.dll at the right place. r=joe a=blocking-beta4+
authorBas Schouten <bschouten@mozilla.com>
Sat, 14 Aug 2010 10:18:05 +0200
changeset 50596 656d99ca089c4d05ed24f391d69dc4622a2d3f1d
parent 50595 5a8ef7a3fe86f0b898eb87c108652c4d5a9a805e
child 50597 f2f752f72f6d52a2f14baee8794d1570a949ac64
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe, blocking-beta4
bugs587289
milestone2.0b4pre
first release with
nightly linux32
656d99ca089c / 4.0b4pre / 20100814030121 / files
nightly linux64
656d99ca089c / 4.0b4pre / 20100814030707 / files
nightly mac
656d99ca089c / 4.0b4pre / 20100814030708 / files
nightly win32
656d99ca089c / 4.0b4pre / 20100814040443 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 587289: Unload D3D10_1.dll at the right place. r=joe a=blocking-beta4+
gfx/cairo/cairo/src/cairo-d2d-surface.cpp
--- a/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
+++ b/gfx/cairo/cairo/src/cairo-d2d-surface.cpp
@@ -326,19 +326,20 @@ cairo_d2d_create_device()
 
 int
 cairo_release_device(cairo_device_t *device)
 {
     int newrefcnt = --device->refcount;
     if (!newrefcnt) {
 	// Call the correct destructor
 	cairo_d2d_device_t *d2d_device = reinterpret_cast<cairo_d2d_device_t*>(device);
-	FreeLibrary(d2d_device->mD3D10_1);
+        HMODULE d3d10_1 = d2d_device->mD3D10_1;
 	delete d2d_device;
 	_cairo_d2d_release_factory();
+        FreeLibrary(d3d10_1);
     }
     return newrefcnt;
 }
 
 int
 cairo_addref_device(cairo_device_t *device)
 {
     return ++device->refcount;