Closed Bug 8277 Opened 26 years ago Closed 26 years ago

Two asserts in session history on startup

Categories

(SeaMonkey :: UI Design, defect, P1)

All
Mac System 8.5
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sfraser_bugs, Assigned: radha)

Details

nsSessionHistory::nsSessionHistory() causes an assert because the following initializer: mHistoryEntries = (nsVoidArray)0; is just bogus. mHistoryEntries is an nsVoidArray, not nsVoidArray*. And you *must* init an mHistoryEntries with >0 entries, otherwise is asserts (which is what happens now).
There's more. Lots of place fail to return nsresults. Warning : return value expected nsSessionHistory.cpp line 366 } Warning : return value expected nsSessionHistory.cpp line 886 return; Warning : return value expected nsSessionHistory.cpp line 942 return; Warning : return value expected nsSessionHistory.cpp line 1268 } Warning : return value expected nsSessionHistory.cpp line 1336 } Warning : return value expected nsSessionHistory.cpp line 1346 }
Status: NEW → ASSIGNED
Target Milestone: M7
Shall look into it.
nsHistoryEntry also does the same bad (nsVoidArray)0 thing. I'm going to check in some fixes for this tonight, unless someone stops me.
Fixes checked in. I just commented out both lines that looked like: something = (nsVoidArray)0;
I checked in the fixes for the "Warning : return value expected" radha, please review what I did.
Priority: P3 → P1
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
marking fixed.
Status: RESOLVED → VERIFIED
marking verififed based on developer input
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.