diff --git a/mozilla/string/src/nsSharedBufferList.cpp b/mozilla/string/src/nsSharedBufferList.cpp index 23278c95a3c..84342e07535 100755 --- a/mozilla/string/src/nsSharedBufferList.cpp +++ b/mozilla/string/src/nsSharedBufferList.cpp @@ -144,3 +144,30 @@ nsSharedBufferList::UnlinkBuffer( Buffer* aBufferToUnlink ) return aBufferToUnlink; } + + +#if 0 +template +void +nsChunkList::CutTrailingData( PRUint32 aLengthToCut ) + { + Chunk* chunk = mLastChunk; + while ( chunk && aLengthToCut ) + { + Chunk* prev_chunk = chunk->mPrev; + if ( aLengthToCut < chunk->mDataLength ) + { + chunk->mDataLength -= aLengthToCut; + aLengthToCut = 0; + } + else + { + RemoveChunk(chunk); + aLengthToCut -= chunk->mDataLength; + operator delete(chunk); + } + + chunk = prev_chunk; + } + } +#endif diff --git a/mozilla/xpcom/ds/nsSharedBufferList.cpp b/mozilla/xpcom/ds/nsSharedBufferList.cpp index 23278c95a3c..84342e07535 100755 --- a/mozilla/xpcom/ds/nsSharedBufferList.cpp +++ b/mozilla/xpcom/ds/nsSharedBufferList.cpp @@ -144,3 +144,30 @@ nsSharedBufferList::UnlinkBuffer( Buffer* aBufferToUnlink ) return aBufferToUnlink; } + + +#if 0 +template +void +nsChunkList::CutTrailingData( PRUint32 aLengthToCut ) + { + Chunk* chunk = mLastChunk; + while ( chunk && aLengthToCut ) + { + Chunk* prev_chunk = chunk->mPrev; + if ( aLengthToCut < chunk->mDataLength ) + { + chunk->mDataLength -= aLengthToCut; + aLengthToCut = 0; + } + else + { + RemoveChunk(chunk); + aLengthToCut -= chunk->mDataLength; + operator delete(chunk); + } + + chunk = prev_chunk; + } + } +#endif diff --git a/mozilla/xpcom/string/src/nsSharedBufferList.cpp b/mozilla/xpcom/string/src/nsSharedBufferList.cpp index 23278c95a3c..84342e07535 100755 --- a/mozilla/xpcom/string/src/nsSharedBufferList.cpp +++ b/mozilla/xpcom/string/src/nsSharedBufferList.cpp @@ -144,3 +144,30 @@ nsSharedBufferList::UnlinkBuffer( Buffer* aBufferToUnlink ) return aBufferToUnlink; } + + +#if 0 +template +void +nsChunkList::CutTrailingData( PRUint32 aLengthToCut ) + { + Chunk* chunk = mLastChunk; + while ( chunk && aLengthToCut ) + { + Chunk* prev_chunk = chunk->mPrev; + if ( aLengthToCut < chunk->mDataLength ) + { + chunk->mDataLength -= aLengthToCut; + aLengthToCut = 0; + } + else + { + RemoveChunk(chunk); + aLengthToCut -= chunk->mDataLength; + operator delete(chunk); + } + + chunk = prev_chunk; + } + } +#endif