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 244975 26b9e4567122f3d2a8d164f04571f308a9c83463
parent 244974 36d1a8d3936a3885fba2953c7761782d3dd9c4ef
child 244976 63eafce0059fde20d46e6d728ad58edf91a0e380
push id28794
push userkwierso@gmail.com
push dateThu, 21 May 2015 22:37:26 +0000
treeherdermozilla-central@3e737d30f842 [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; }