Bug 539720. Initialize cachedNewlineOffset. r=bz
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 02 Feb 2010 12:17:17 +1300
changeset 37804 942c8eb0b368e7ff43a44f67705c2c90dbb5cd3c
parent 37803 0fec65bf4b56cd90e27b4d44c3d6ea8a5d112541
child 37805 170943fba62dcf727c97b3370c6e4ad9d353db53
push id11444
push userrocallahan@mozilla.com
push dateMon, 01 Feb 2010 23:39:44 +0000
treeherdermozilla-central@5c6c40887584 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs539720
milestone1.9.3a1pre
Bug 539720. Initialize cachedNewlineOffset. r=bz
layout/generic/nsTextFrameThebes.cpp
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -6121,17 +6121,17 @@ nsTextFrame::Reflow(nsPresContext*      
   // whitespace, restricting to first-letter, and restricting preformatted text
   // to nearest newline
   PRInt32 length = maxContentLength;
   PRInt32 offset = GetContentOffset();
 
   // Restrict preformatted text to the nearest newline
   PRInt32 newLineOffset = -1; // this will be -1 or a content offset
   // Pointer to the nsGkAtoms::newline set on this frame's element
-  NewlineProperty* cachedNewlineOffset;
+  NewlineProperty* cachedNewlineOffset = nsnull;
   if (textStyle->NewlineIsSignificant()) {
     cachedNewlineOffset =
       static_cast<NewlineProperty*>(mContent->GetProperty(nsGkAtoms::newline));
     if (cachedNewlineOffset && cachedNewlineOffset->mStartOffset <= offset &&
         (cachedNewlineOffset->mNewlineOffset == -1 ||
          cachedNewlineOffset->mNewlineOffset >= offset)) {
       newLineOffset = cachedNewlineOffset->mNewlineOffset;
     } else {