Closed Bug 117399 Opened 23 years ago Closed 23 years ago

UMR of mModCount in nsEditor::IncrementModificationCount

Categories

(SeaMonkey :: Composer, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.8

People

(Reporter: jrgmorrison, Assigned: Brade)

References

Details

Attachments

(1 file)

Purify reports a UMR here, in nsEditor.cpp:

    NS_IMETHODIMP nsEditor::IncrementModificationCount(PRInt32 inNumMods)
    {
      PRUint32 oldModCount = mModCount;

      mModCount += inNumMods;

      if ((oldModCount == 0 && mModCount != 0)
       || (oldModCount != 0 && mModCount == 0))
        NotifyDocumentListeners(eDocumentStateChanged);
      return NS_OK;
    }

inNumMods is 1, but mModCount is 0xdeadbeef. Just need to initialize in 
the constructor, I suppose. (Note: it doesn't report the UMR for every 
call to IncrementModificationCount, only for (I guess) the initial call).
strange... I must have lost the initialization when preparing my patch.
Status: NEW → ASSIGNED
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: --- → mozilla0.9.8
*** Bug 114578 has been marked as a duplicate of this bug. ***
Comment on attachment 63815 [details] [diff] [review]
initialization in constructor

r=glazman
Attachment #63815 - Flags: review+
fix checked in (sr=kin after changing order to not cause warning on Linux)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
I can verify that this is fixed, at least from my testcast in bug 114578, on 
Windows 2000 under Purify.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: