Fix for bug 182067. r=harishd, sr=jst, a=asa. Fixes the crash/hang on Linux when a data: url with a null data segment is typed into the url bar.

This commit is contained in:
nisheeth%netscape.com 2003-01-31 00:58:41 +00:00
Родитель 8415cc2ba2
Коммит ef087b5585
2 изменённых файлов: 24 добавлений и 0 удалений

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

@ -138,6 +138,12 @@ nsScanner::nsScanner(nsString& aFilename,PRBool aCreateStream, const nsString& a
MOZ_COUNT_CTOR(nsScanner);
mSlidingBuffer = nsnull;
// XXX This is a big hack. We want to initialize the iterators in the
// constructor. So, we temporarily use the mFileName string for this
// purpose. This fixes bug 182067.
mFilename.BeginReading(mCurrentPosition);
mMarkPosition = mCurrentPosition;
mEndPosition = mCurrentPosition;
mIncremental=PR_TRUE;
mCountRemaining = 0;
mTotalRead=0;
@ -166,6 +172,12 @@ nsScanner::nsScanner(const nsAString& aFilename,nsInputStream& aStream,const nsS
MOZ_COUNT_CTOR(nsScanner);
mSlidingBuffer = nsnull;
// XXX This is a big hack. We want to initialize the iterators in the
// constructor. So, we temporarily use the mFileName string for this
// purpose. This fixes bug 182067.
mFilename.BeginReading(mCurrentPosition);
mMarkPosition = mCurrentPosition;
mEndPosition = mCurrentPosition;
mIncremental=PR_FALSE;
mCountRemaining = 0;
mTotalRead=0;

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

@ -138,6 +138,12 @@ nsScanner::nsScanner(nsString& aFilename,PRBool aCreateStream, const nsString& a
MOZ_COUNT_CTOR(nsScanner);
mSlidingBuffer = nsnull;
// XXX This is a big hack. We want to initialize the iterators in the
// constructor. So, we temporarily use the mFileName string for this
// purpose. This fixes bug 182067.
mFilename.BeginReading(mCurrentPosition);
mMarkPosition = mCurrentPosition;
mEndPosition = mCurrentPosition;
mIncremental=PR_TRUE;
mCountRemaining = 0;
mTotalRead=0;
@ -166,6 +172,12 @@ nsScanner::nsScanner(const nsAString& aFilename,nsInputStream& aStream,const nsS
MOZ_COUNT_CTOR(nsScanner);
mSlidingBuffer = nsnull;
// XXX This is a big hack. We want to initialize the iterators in the
// constructor. So, we temporarily use the mFileName string for this
// purpose. This fixes bug 182067.
mFilename.BeginReading(mCurrentPosition);
mMarkPosition = mCurrentPosition;
mEndPosition = mCurrentPosition;
mIncremental=PR_FALSE;
mCountRemaining = 0;
mTotalRead=0;