Last Comment Bug 699780 - Redundant call to Seek() in nsStorageStream::GetOutputStream()
: Redundant call to Seek() in nsStorageStream::GetOutputStream()
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla10
Assigned To: Bjarne (:bjarne)
: Nathan Froyd [:froydnj]
Depends on:
  Show dependency treegraph
Reported: 2011-11-04 07:09 PDT by Bjarne (:bjarne)
Modified: 2011-11-08 07:07 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Proposed fix (1.12 KB, patch)
2011-11-07 01:08 PST, Bjarne (:bjarne)
benjamin: review+
Details | Diff | Splinter Review
Proposed fix w/ proper metainfo (1.24 KB, patch)
2011-11-07 13:19 PST, Bjarne (:bjarne)
no flags Details | Diff | Splinter Review

Description User image Bjarne (:bjarne) 2011-11-04 07:09:54 PDT
There is an unconditional second call to Seek() after a possible call to ReallocLastSegment(). Looks like the second seek is only needed if realloc was done?
Comment 1 User image Bjarne (:bjarne) 2011-11-07 01:08:26 PST
Created attachment 572403 [details] [diff] [review]
Proposed fix

Looks like base pointer changed only on positive return from ReallocLastSegment(). Maybe we should add this to the doc for ReallocLastSegment() as well...?
Comment 2 User image Ed Morley [:emorley] 2011-11-07 13:13:10 PST
Please could you tweak your hgrc to automatically add author info (guide here: + add a commit message when attaching patches, since it makes pushing half a dozen checkin-neededs a lot easier. Thanks :-)
Comment 3 User image Bjarne (:bjarne) 2011-11-07 13:19:32 PST
Created attachment 572589 [details] [diff] [review]
Proposed fix w/ proper metainfo

Sorry - added here...
Comment 5 User image Ed Morley [:emorley] 2011-11-08 07:07:25 PST

Note You need to log in before you can comment on or make changes to this bug.