Bug 1157663 - Init mMap in the constructor to avoid half initialized structures. r=nical
authorBaptiste Emmanuel <baptiste.em@gmail.com>
Tue, 19 May 2015 17:14:45 +0200
changeset 244942 26b9e4567122f3d2a8d164f04571f308a9c83463
parent 244941 36d1a8d3936a3885fba2953c7761782d3dd9c4ef
child 244943 63eafce0059fde20d46e6d728ad58edf91a0e380
push id60064
push usernsilva@mozilla.com
push dateThu, 21 May 2015 13:16:58 +0000
treeherdermozilla-inbound@26b9e4567122 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1157663
milestone41.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 1157663 - Init mMap in the constructor to avoid half initialized structures. r=nical
gfx/layers/composite/TextRenderer.h
--- a/gfx/layers/composite/TextRenderer.h
+++ b/gfx/layers/composite/TextRenderer.h
@@ -18,17 +18,17 @@ class Compositor;
 class TextRenderer
 {
   ~TextRenderer();
 
 public:
   NS_INLINE_DECL_REFCOUNTING(TextRenderer)
 
   explicit TextRenderer(Compositor *aCompositor)
-    : mCompositor(aCompositor)
+    : mCompositor(aCompositor), mMap({nullptr, 0})
   {
   }
 
   void RenderText(const std::string& aText, const gfx::IntPoint& aOrigin,
                   const gfx::Matrix4x4& aTransform, uint32_t aTextSize,
                   uint32_t aTargetPixelWidth);
 
   gfx::DataSourceSurface::MappedSurface& GetSurfaceMap() { return mMap; }