21723. a=chofmann, r=warren. earlier this week segment size and max size parameters were exposed to higher level consumers of necko apis. this change warns a user if they try to create a pipe w/ zero len segs and max sizes. pipes are useless without sizes

This commit is contained in:
valeski%netscape.com 1999-12-14 22:08:40 +00:00
Родитель 2f303433fa
Коммит 7eda757e29
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -792,6 +792,8 @@ NS_NewPipe(nsIBufferInputStream* *inStrResult,
PRUint32 maxSize) PRUint32 maxSize)
{ {
nsresult rv; nsresult rv;
NS_ASSERTION(segmentSize > 0, "need to supply segmentSize for buffer");
NS_ASSERTION(maxSize > 0, "need to supply maxSize for buffer");
const nsCID* cid = &kAllocatorCID; const nsCID* cid = &kAllocatorCID;
#ifdef PAGE_MANAGER #ifdef PAGE_MANAGER
// Take the page manager out altogether because some unices don't // Take the page manager out altogether because some unices don't