зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2f303433fa
Коммит
7eda757e29
|
@ -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
|
||||||
|
|
Загрузка…
Ссылка в новой задаче