Bug 558557: Use a RefPtr here so that sourceBitmap creation references will be released. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Sun, 11 Apr 2010 01:56:25 +0200
changeset 40663 06e711cd0324e71fe86c15a9075058bb4d0d6244
parent 40662 1a6aac2558e4c05dc6d48b30a42af3c40fe3e8ec
child 40664 1fb768ca019e3cd80a09877cff4e693e5025108c
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)
reviewersjrmuizel
bugs558557
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 558557: Use a RefPtr here so that sourceBitmap creation references will be released. r=jrmuizel
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
@@ -774,17 +774,17 @@ RefPtr<ID2D1Brush>
 	    }
 	} else if (pattern->extend == CAIRO_EXTEND_REPEAT) {
 	    extendMode = D2D1_EXTEND_MODE_WRAP;
 	} else if (pattern->extend == CAIRO_EXTEND_REFLECT) {
 	    extendMode = D2D1_EXTEND_MODE_MIRROR;
 	} else {
 	    extendMode = D2D1_EXTEND_MODE_CLAMP;
 	}
-	ID2D1Bitmap *sourceBitmap;
+	RefPtr<ID2D1Bitmap> sourceBitmap;
 	bool tiled = false;
 	unsigned int xoffset = 0;
 	unsigned int yoffset = 0;
 	unsigned int width;
 	unsigned int height;
 	*remaining_runs = 0;
 	if (surfacePattern->surface->type == CAIRO_SURFACE_TYPE_D2D) {
 	    /**