add debug insertion to detect unexpected linefeeds (checkin for Akkana); bug #54090

git-svn-id: svn://10.0.0.236/trunk@94371 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brade%netscape.com
2001-05-09 13:01:48 +00:00
parent 61376036dc
commit f5302c09bb
2 changed files with 14 additions and 0 deletions

View File

@@ -184,6 +184,13 @@ nsInternetCiter::Rewrap(const nsAReadableString& aInString,
PRBool aRespectNewlines,
nsAWritableString& aOutString)
{
// There shouldn't be returns in this string, only dom newlines.
// Check to make sure:
#ifdef DEBUG
PRInt32 cr = aInString.FindChar(PRUnichar('\r'));
NS_ASSERTION((cr < 0), "Rewrap: CR in string gotten from DOM!\n");
#endif /* DEBUG */
nsCOMPtr<nsILineBreaker> lineBreaker;
nsILineBreakerFactory *lf;
nsresult rv = NS_OK;

View File

@@ -184,6 +184,13 @@ nsInternetCiter::Rewrap(const nsAReadableString& aInString,
PRBool aRespectNewlines,
nsAWritableString& aOutString)
{
// There shouldn't be returns in this string, only dom newlines.
// Check to make sure:
#ifdef DEBUG
PRInt32 cr = aInString.FindChar(PRUnichar('\r'));
NS_ASSERTION((cr < 0), "Rewrap: CR in string gotten from DOM!\n");
#endif /* DEBUG */
nsCOMPtr<nsILineBreaker> lineBreaker;
nsILineBreakerFactory *lf;
nsresult rv = NS_OK;