Bug 1901127 - Remove dead debug and perf testing code. r=darktrojan

Differential Revision: https://phabricator.services.mozilla.com/D212856

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sean Burke 2024-06-07 22:13:58 +00:00
Родитель 9a50afd431
Коммит 84457db292
30 изменённых файлов: 14 добавлений и 563 удалений

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

@ -326,10 +326,6 @@ nsresult nsMsgBiffManager::PerformBiff() {
SetNextBiffTime(current, currentTime);
AddBiffEntry(current);
}
#ifdef DEBUG_David_Bienvenu
else
printf("dest account performing biff\n");
#endif
} else
// since we're in biff order, there's no reason to keep checking
break;

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

@ -165,13 +165,6 @@ nsMsgContentPolicy::ShouldLoad(nsIURI* aContentLocation, nsILoadInfo* aLoadInfo,
NS_ENSURE_ARG_POINTER(aContentLocation);
#ifdef DEBUG_MsgContentPolicy
fprintf(stderr, "aContentType: %d\naContentLocation = %s\n", aContentType,
aContentLocation->GetSpecOrDefault().get());
fprintf(stderr, "aRequestingContext is %s\n",
aRequestingContext ? "not null" : "null");
#endif
#ifndef MOZ_THUNDERBIRD
// Go find out if we are dealing with mailnews. Anything else
// isn't our concern and we accept content.
@ -226,11 +219,6 @@ nsMsgContentPolicy::ShouldLoad(nsIURI* aContentLocation, nsILoadInfo* aLoadInfo,
// failure code is ACCEPT.
if (!aRequestingLocation) return NS_ERROR_INVALID_POINTER;
#ifdef DEBUG_MsgContentPolicy
fprintf(stderr, "aRequestingLocation = %s\n",
aRequestingLocation->GetSpecOrDefault().get());
#endif
// If the requesting location is safe, accept the content location request.
if (IsSafeRequestingLocation(aRequestingLocation)) return rv;
@ -329,11 +317,6 @@ nsMsgContentPolicy::ShouldLoad(nsIURI* aContentLocation, nsILoadInfo* aLoadInfo,
return NS_OK;
}
#ifdef DEBUG_MsgContentPolicy
fprintf(stderr, "originatorLocation = %s\n",
originatorLocation->GetSpecOrDefault().get());
#endif
// Don't load remote content for encrypted messages.
nsCOMPtr<nsIEncryptedSMIMEURIsService> encryptedURIService = do_GetService(
"@mozilla.org/messenger-smime/smime-encrypted-uris-service;1", &rv);

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

@ -592,11 +592,6 @@ nsresult nsMsgDBFolder::GetFolderCacheElemFromFile(
NS_ENSURE_ARG_POINTER(file);
NS_ENSURE_ARG_POINTER(cacheElement);
nsCOMPtr<nsIMsgFolderCache> folderCache;
#ifdef DEBUG_bienvenu1
bool exists;
NS_ASSERTION(NS_SUCCEEDED(fileSpec->Exists(&exists)) && exists,
"whoops, file doesn't exist, mac will break");
#endif
nsCOMPtr<nsIMsgAccountManager> accountMgr =
do_GetService("@mozilla.org/messenger/account-manager;1", &result);
if (NS_SUCCEEDED(result)) {
@ -644,13 +639,6 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo(bool force) {
if (folderInfo) {
if (!mInitializedFromCache) {
folderInfo->GetFlags((int32_t*)&mFlags);
#ifdef DEBUG_bienvenu1
nsString name;
GetName(name);
NS_ASSERTION(Compare(name, kLocalizedTrashName) ||
(mFlags & nsMsgFolderFlags::Trash),
"lost trash flag");
#endif
mInitializedFromCache = true;
}
@ -1144,11 +1132,6 @@ NS_IMETHODIMP nsMsgDBFolder::ReadFromFolderCacheElem(
element->GetCachedInt64("expungedBytes", &mExpungedBytes);
element->GetCachedInt64("folderSize", &mFolderSize);
#ifdef DEBUG_bienvenu1
nsCString uri;
GetURI(uri);
printf("read total %ld for %s\n", mNumTotalMessages, uri.get());
#endif
return rv;
}
@ -1190,11 +1173,6 @@ NS_IMETHODIMP nsMsgDBFolder::WriteToFolderCache(nsIMsgFolderCache* folderCache,
nsCOMPtr<nsIMsgFolderCacheElement> cacheElement;
nsCOMPtr<nsIFile> dbPath;
rv = GetFolderCacheKey(getter_AddRefs(dbPath));
#ifdef DEBUG_bienvenu1
bool exists;
NS_ASSERTION(NS_SUCCEEDED(dbPath->Exists(&exists)) && exists,
"file spec we're adding to cache should exist");
#endif
if (NS_SUCCEEDED(rv) && dbPath) {
nsCString persistentPath;
rv = dbPath->GetPersistentDescriptor(persistentPath);
@ -1227,11 +1205,6 @@ NS_IMETHODIMP nsMsgDBFolder::WriteToFolderCacheElem(
element->SetCachedInt64("expungedBytes", mExpungedBytes);
element->SetCachedInt64("folderSize", mFolderSize);
#ifdef DEBUG_bienvenu1
nsCString uri;
GetURI(uri);
printf("writing total %ld for %s\n", mNumTotalMessages, uri.get());
#endif
return rv;
}
@ -3921,13 +3894,6 @@ NS_IMETHODIMP nsMsgDBFolder::OnFlagChange(uint32_t flag) {
nsCOMPtr<nsIDBFolderInfo> folderInfo;
rv = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && folderInfo) {
#ifdef DEBUG_bienvenu1
nsString name;
rv = GetName(name);
NS_ASSERTION(Compare(name, kLocalizedTrashName) ||
(mFlags & nsMsgFolderFlags::Trash),
"lost trash flag");
#endif
folderInfo->SetFlags((int32_t)mFlags);
if (db) db->Commit(nsMsgDBCommitType::kLargeCommit);

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

@ -5098,11 +5098,6 @@ nsMsgViewIndex nsMsgDBView::GetInsertIndex(nsIMsgDBHdr* msgHdr) {
nsresult nsMsgDBView::AddHdr(nsIMsgDBHdr* msgHdr, nsMsgViewIndex* resultIndex) {
uint32_t flags = 0;
#ifdef DEBUG_bienvenu
NS_ASSERTION(m_keys.Length() == m_flags.Length() &&
(int)m_keys.Length() == m_levels.Length(),
"view arrays out of sync!");
#endif
if (resultIndex) *resultIndex = nsMsgViewIndex_None;
@ -5550,126 +5545,13 @@ nsMsgViewIndex nsMsgDBView::GetThreadRootIndex(nsIMsgDBHdr* msgHdr) {
if (resultHdr != msgHdr) {
NS_WARNING("didn't find hdr");
highIndex = FindHdr(msgHdr);
#ifdef DEBUG_David_Bienvenu
if (highIndex != nsMsgViewIndex_None) {
NS_WARNING("but find hdr did");
printf("level of found hdr = %d\n", m_levels[highIndex]);
ValidateSort();
}
#endif
return highIndex;
}
return msgHdr == resultHdr ? highIndex : nsMsgViewIndex_None;
}
#ifdef DEBUG_David_Bienvenu
void nsMsgDBView::InitEntryInfoForIndex(nsMsgViewIndex i, IdKey& EntryInfo) {
nsresult rv;
uint16_t maxLen;
eFieldType fieldType;
// Get the custom column handler for the primary sort and pass it first
// to GetFieldTypeAndLenForSort to get the fieldType and then either
// GetCollationKey or GetLongField.
nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandler();
// The following may leave fieldType undefined.
rv = GetFieldTypeAndLenForSort(m_sortType, &maxLen, &fieldType, colHandler);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to obtain fieldType");
nsCOMPtr<nsIMsgDBHdr> msgHdr;
GetMsgHdrForViewIndex(i, getter_AddRefs(msgHdr));
msgHdr->GetMessageKey(&EntryInfo.id);
msgHdr->GetFolder(&EntryInfo.folder);
EntryInfo.folder->Release();
nsCOMPtr<nsIMsgDatabase> hdrDB;
EntryInfo.folder->GetMsgDatabase(getter_AddRefs(hdrDB));
switch (fieldType) {
case kCollationKey:
rv = GetCollationKey(msgHdr, m_sortType, EntryInfo.key, colHandler);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to create collation key");
break;
case kU32:
if (m_sortType == nsMsgViewSortType::byId)
EntryInfo.dword = EntryInfo.id;
else
GetLongField(msgHdr, m_sortType, &EntryInfo.dword, colHandler);
break;
default:
NS_ERROR("invalid field type");
}
}
void nsMsgDBView::ValidateSort() {
IdKey EntryInfo1, EntryInfo2;
nsCOMPtr<nsIMsgDBHdr> hdr1, hdr2;
uint16_t maxLen;
eFieldType fieldType;
// Get the custom column handler for the primary sort and pass it first
// to GetFieldTypeAndLenForSort to get the fieldType and then either
// GetCollationKey or GetLongField.
nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandler();
// It is not entirely clear what we should do since,
// if fieldType is not available, there is no way to know
// how to compare the field to check for sorting.
// So we bomb out here. It is OK since this is debug code
// inside #ifdef DEBUG_David_Bienvenu
nsresult rv =
GetFieldTypeAndLenForSort(m_sortType, &maxLen, &fieldType, colHandler);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to obtain fieldType");
viewSortInfo comparisonContext;
comparisonContext.view = this;
comparisonContext.isSecondarySort = false;
comparisonContext.ascendingSort =
(m_sortOrder == nsMsgViewSortOrder::ascending);
nsCOMPtr<nsIMsgDatabase> db;
GetDBForViewIndex(0, getter_AddRefs(db));
// This is only for comparing collation keys - it could be any db.
comparisonContext.db = db.get();
for (nsMsgViewIndex i = 0; i < m_keys.Length();) {
// Ignore non threads.
if (m_levels[i]) {
i++;
continue;
}
// Find next header.
nsMsgViewIndex j = i + 1;
while (j < m_keys.Length() && m_levels[j]) j++;
if (j == m_keys.Length()) break;
InitEntryInfoForIndex(i, EntryInfo1);
InitEntryInfoForIndex(j, EntryInfo2);
const void *pValue1 = &EntryInfo1, *pValue2 = &EntryInfo2;
int retStatus = 0;
if (fieldType == kCollationKey)
retStatus = FnSortIdKey(&pValue1, &pValue2, &comparisonContext);
else if (fieldType == kU32)
retStatus = FnSortIdUint32(&pValue1, &pValue2, &comparisonContext);
if (retStatus &&
(retStatus < 0) == (m_sortOrder == nsMsgViewSortOrder::ascending)) {
NS_ERROR("view not sorted correctly");
break;
}
// j is the new i.
i = j;
}
}
#endif
nsresult nsMsgDBView::ListUnreadIdsInThread(
nsIMsgThread* threadHdr, nsMsgViewIndex startOfThreadViewIndex,
uint32_t* pNumListed) {
@ -6084,10 +5966,6 @@ bool nsMsgDBView::AdjustReadFlag(nsIMsgDBHdr* msgHdr, uint32_t* msgFlags) {
msgHdr->GetMessageKey(&msgKey);
m_db->IsRead(msgKey, &isRead);
// Just make sure flag is right in db.
#ifdef DEBUG_David_Bienvenu
NS_ASSERTION(isRead == ((*msgFlags & nsMsgMessageFlags::Read) != 0),
"msgFlags out of sync");
#endif
if (isRead)
*msgFlags |= nsMsgMessageFlags::Read;
else

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

@ -517,11 +517,6 @@ class nsMsgDBView : public nsIMsgDBView,
bool CustomColumnsInSortAndNotRegistered();
void EnsureCustomColumnsValid();
#ifdef DEBUG_David_Bienvenu
void InitEntryInfoForIndex(nsMsgViewIndex i, IdKey& EntryInfo);
void ValidateSort();
#endif
protected:
static nsresult InitDisplayFormats();

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

@ -12,10 +12,6 @@
#include "nsTArray.h"
#include <ctype.h>
#if defined(DEBUG_seth_) || defined(DEBUG_sspitzer_)
# define DEBUG_MSGKEYSET 1
#endif
/* A compressed encoding for sets of article. This is usually for lines from
the newsrc, which have article lists like
@ -182,10 +178,6 @@ nsMsgKeySet* nsMsgKeySet::Create(/*MSG_NewsHost* host*/) {
}
nsMsgKeySet* nsMsgKeySet::Create(const char* value /* , MSG_NewsHost* host */) {
#ifdef DEBUG_MSGKEYSET
printf("create from %s\n", value);
#endif
nsMsgKeySet* set = new nsMsgKeySet(value /* , host */);
if (set && set->m_data == NULL) {
delete set;
@ -581,10 +573,6 @@ int nsMsgKeySet::Add(int32_t number) {
int32_t* tail;
int32_t* end;
#ifdef DEBUG_MSGKEYSET
printf("add %d\n", number);
#endif
size = m_length;
head = m_data;
tail = head;
@ -673,9 +661,6 @@ int nsMsgKeySet::Remove(int32_t number) {
int32_t* head;
int32_t* tail;
int32_t* end;
#ifdef DEBUG_MSGKEYSET
printf("remove %d\n", number);
#endif
size = m_length;
head = m_data;

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

@ -315,10 +315,6 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetMsgWindow(nsIMsgWindow** aMsgWindow) {
}
NS_IMETHODIMP nsMsgMailNewsUrl::SetMsgWindow(nsIMsgWindow* aMsgWindow) {
#ifdef DEBUG_David_Bienvenu
NS_ASSERTION(aMsgWindow || !m_msgWindowWeak,
"someone crunching non-null msg window");
#endif
m_msgWindowWeak = do_GetWeakReference(aMsgWindow);
return NS_OK;
}

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

@ -713,9 +713,6 @@ nsresult nsMsgProtocol::DoGSSAPIStep1(const nsACString& service,
const char* username,
nsCString& response) {
nsresult rv;
#ifdef DEBUG_BenB
printf("GSSAPI step 1 for service %s, username %s\n", service, username);
#endif
// if this fails, then it means that we cannot do GSSAPI SASL.
m_authModule = nsIAuthModule::CreateInstance("sasl-gssapi");
@ -735,17 +732,11 @@ nsresult nsMsgProtocol::DoGSSAPIStep1(const nsACString& service,
free(outBuf);
}
#ifdef DEBUG_BenB
printf("GSSAPI step 1 succeeded\n");
#endif
return rv;
}
nsresult nsMsgProtocol::DoGSSAPIStep2(nsCString& commandResponse,
nsCString& response) {
#ifdef DEBUG_BenB
printf("GSSAPI step 2\n");
#endif
nsresult rv;
void *inBuf, *outBuf;
uint32_t inBufLen, outBufLen;
@ -793,10 +784,6 @@ nsresult nsMsgProtocol::DoGSSAPIStep2(nsCString& commandResponse,
response.Adopt((char*)moz_xmemdup("", 1));
}
#ifdef DEBUG_BenB
printf(NS_SUCCEEDED(rv) ? "GSSAPI step 2 succeeded\n"
: "GSSAPI step 2 failed\n");
#endif
return rv;
}

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

@ -87,12 +87,6 @@ interface nsIMsgComposeService : nsISupports {
*/
readonly attribute nsIMsgIdentity defaultIdentity;
/* This function is use for debugging purpose only and may go away at anytime without warning */
void TimeStamp(in string label, in boolean resetTime);
/* This attribute is use for debugging purposes for determining whether to PR_LOG or not */
readonly attribute boolean logComposePerformance;
[noscript] boolean determineComposeHTML(in nsIMsgIdentity aIdentity, in MSG_ComposeFormat aFormat);
/**

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

@ -778,13 +778,6 @@ nsMsgCompose::ConvertAndLoadComposeWindow(nsString& aPrefix, nsString& aBuf,
htmlEditor->EnableUndo(true);
SetBodyModified(false);
#ifdef MSGCOMP_TRACE_PERFORMANCE
nsCOMPtr<nsIMsgComposeService> composeService(
do_GetService("@mozilla.org/messengercompose;1"));
composeService->TimeStamp(
"Finished inserting data into the editor. The window is finally ready!",
false);
#endif
return NS_OK;
}
@ -2491,24 +2484,10 @@ QuotingOutputStreamListener::OnStopRequest(nsIRequest* request,
}
}
#ifdef MSGCOMP_TRACE_PERFORMANCE
nsCOMPtr<nsIMsgComposeService> composeService(
do_GetService("@mozilla.org/messengercompose;1"));
composeService->TimeStamp(
"Done with MIME. Now we're updating the UI elements", false);
#endif
if (mQuoteOriginal)
compose->NotifyStateListeners(
nsIMsgComposeNotificationType::ComposeFieldsReady, NS_OK);
#ifdef MSGCOMP_TRACE_PERFORMANCE
composeService->TimeStamp(
"Addressing widget, window title and focus are now set, time to insert "
"the body",
false);
#endif
if (!mHeadersOnly) mMsgBody.AppendLiteral("</html>");
// Now we have an HTML representation of the quoted message.

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

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsMsgComposeService.h"
#include "nsIMsgMessageService.h"
#include "nsIMsgSend.h"
#include "nsIMsgIdentity.h"
#include "nsISmtpUrl.h"
@ -41,13 +42,6 @@
#include "nsSmtpUrl.h"
#include "mozilla/NullPrincipal.h"
#ifdef MSGCOMP_TRACE_PERFORMANCE
# include "mozilla/Logging.h"
# include "nsIMsgHdr.h"
# include "nsIMsgMessageService.h"
# include "nsMsgUtils.h"
#endif
#include "nsICommandLine.h"
#include "nsMsgUtils.h"
#include "nsIPrincipal.h"
@ -79,33 +73,10 @@ using namespace mozilla::dom;
#define USER_CURRENT_PLAINTEXTDOMAINLIST_PREF_NAME "plaintext_domains"
#define DOMAIN_DELIMITER ','
#ifdef MSGCOMP_TRACE_PERFORMANCE
static mozilla::LazyLogModule MsgComposeLogModule("MsgCompose");
static uint32_t GetMessageSizeFromURI(const nsACString& originalMsgURI) {
uint32_t msgSize = 0;
if (!originalMsgURI.IsEmpty()) {
nsCOMPtr<nsIMsgDBHdr> originalMsgHdr;
GetMsgDBHdrFromURI(originalMsgURI, getter_AddRefs(originalMsgHdr));
if (originalMsgHdr) originalMsgHdr->GetMessageSize(&msgSize);
}
return msgSize;
}
#endif
nsMsgComposeService::nsMsgComposeService() {
// Defaulting the value of mLogComposePerformance to FALSE to prevent logging.
mLogComposePerformance = false;
#ifdef MSGCOMP_TRACE_PERFORMANCE
mStartTime = PR_IntervalNow();
mPreviousTime = mStartTime;
#endif
}
nsMsgComposeService::nsMsgComposeService() = default;
NS_IMPL_ISUPPORTS(nsMsgComposeService, nsIMsgComposeService,
ICOMMANDLINEHANDLER, nsISupportsWeakReference)
nsICommandLineHandler, nsISupportsWeakReference)
nsMsgComposeService::~nsMsgComposeService() { mOpenComposeWindows.Clear(); }
@ -125,14 +96,7 @@ nsresult nsMsgComposeService::Init() {
return rv;
}
void nsMsgComposeService::Reset() {
mOpenComposeWindows.Clear();
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefs)
prefs->GetBoolPref("mailnews.logComposePerformance",
&mLogComposePerformance);
}
void nsMsgComposeService::Reset() { mOpenComposeWindows.Clear(); }
// Function to open a message compose window and pass an nsIMsgComposeParams
// parameter to it.
@ -140,11 +104,6 @@ NS_IMETHODIMP
nsMsgComposeService::OpenComposeWindowWithParams(const char* chrome,
nsIMsgComposeParams* params) {
NS_ENSURE_ARG_POINTER(params);
#ifdef MSGCOMP_TRACE_PERFORMANCE
if (mLogComposePerformance) {
TimeStamp("Start opening the window", true);
}
#endif
nsresult rv;
@ -271,8 +230,7 @@ nsMsgComposeService::GetOrigWindowSelection(MSG_ComposeType type,
// words
const char16_t* end;
for (end = unicodeStr + endWordPos; mozilla::intl::NS_IsSpace(*end);
end++)
;
end++);
if (!*end) return NS_ERROR_ABORT;
}
}
@ -431,18 +389,6 @@ nsMsgComposeService::OpenComposeWindow(
pMsgComposeParams->SetComposeFields(pMsgCompFields);
if (mLogComposePerformance) {
#ifdef MSGCOMP_TRACE_PERFORMANCE
// ducarroz, properly fix this in the case of new message (not a reply)
if (type != nsIMsgCompType::NewsPost) {
char buff[256];
sprintf(buff, "Start opening the window, message size = %d",
GetMessageSizeFromURI(originalMsgURI));
TimeStamp(buff, true);
}
#endif
} // end if(mLogComposePerformance)
rv = OpenComposeWindowWithParams(
PromiseFlatCString(msgComposeWindowURL).get(), pMsgComposeParams);
}
@ -537,8 +483,8 @@ NS_IMETHODIMP nsMsgComposeService::GetParamsForMailto(
return NS_OK;
}
} // if we created msg compose params....
} // if we had a mailto url
} // if we had a url...
} // if we had a mailto url
} // if we had a url...
// if we got here we must have encountered an error
*aParams = nullptr;
@ -589,43 +535,6 @@ nsMsgComposeService::GetDefaultIdentity(nsIMsgIdentity** _retval) {
return defaultAccount ? defaultAccount->GetDefaultIdentity(_retval) : NS_OK;
}
/* readonly attribute boolean logComposePerformance; */
NS_IMETHODIMP nsMsgComposeService::GetLogComposePerformance(
bool* aLogComposePerformance) {
*aLogComposePerformance = mLogComposePerformance;
return NS_OK;
}
NS_IMETHODIMP nsMsgComposeService::TimeStamp(const char* label,
bool resetTime) {
if (!mLogComposePerformance) return NS_OK;
#ifdef MSGCOMP_TRACE_PERFORMANCE
PRIntervalTime now;
if (resetTime) {
MOZ_LOG(MsgComposeLogModule, mozilla::LogLevel::Info,
("\n[process]: [totalTime][deltaTime]\n--------------------\n"));
mStartTime = PR_IntervalNow();
mPreviousTime = mStartTime;
now = mStartTime;
} else
now = PR_IntervalNow();
PRIntervalTime totalTime = PR_IntervalToMilliseconds(now - mStartTime);
PRIntervalTime deltaTime = PR_IntervalToMilliseconds(now - mPreviousTime);
MOZ_LOG(MsgComposeLogModule, mozilla::LogLevel::Info,
("[%3.2f][%3.2f] - %s\n", ((double)totalTime / 1000.0) + 0.005,
((double)deltaTime / 1000.0) + 0.005, label));
mPreviousTime = now;
#endif
return NS_OK;
}
class nsMsgTemplateReplyHelper final : public nsIStreamListener,
public nsIUrlListener {
public:

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

@ -3,8 +3,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define MSGCOMP_TRACE_PERFORMANCE 1
#include "nsIMsgComposeService.h"
#include "nsCOMPtr.h"
#include "nsWeakReference.h"
@ -14,10 +12,8 @@
#include "nsICommandLineHandler.h"
#define ICOMMANDLINEHANDLER nsICommandLineHandler
class nsMsgComposeService : public nsIMsgComposeService,
public ICOMMANDLINEHANDLER,
public nsICommandLineHandler,
public nsSupportsWeakReference {
public:
nsMsgComposeService();
@ -33,7 +29,6 @@ class nsMsgComposeService : public nsIMsgComposeService,
private:
virtual ~nsMsgComposeService();
bool mLogComposePerformance;
nsresult LoadDraftOrTemplate(
const nsACString& aMsgURI, nsMimeOutputType aOutType,
@ -58,9 +53,4 @@ class nsMsgComposeService : public nsIMsgComposeService,
nsresult GetOrigWindowSelection(MSG_ComposeType type,
mozilla::dom::Selection* selection,
nsACString& aSelHTML);
#ifdef MSGCOMP_TRACE_PERFORMANCE
PRIntervalTime mStartTime;
PRIntervalTime mPreviousTime;
#endif
};

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

@ -338,9 +338,6 @@ NS_IMETHODIMP nsDBFolderInfo::ChangeNumUnreadMessages(int32_t delta) {
m_numUnreadMessages += delta;
// m_numUnreadMessages can never be set to negative.
if (m_numUnreadMessages < 0) {
#ifdef DEBUG_bienvenu1
NS_ASSERTION(false, "Hardcoded assertion");
#endif
m_numUnreadMessages = 0;
}
return SetUint32PropertyWithToken(m_numUnreadMessagesColumnToken,
@ -351,9 +348,6 @@ NS_IMETHODIMP nsDBFolderInfo::ChangeNumMessages(int32_t delta) {
m_numMessages += delta;
// m_numMessages can never be set to negative.
if (m_numMessages < 0) {
#ifdef DEBUG_bienvenu
NS_ASSERTION(false, "num messages can't be < 0");
#endif
m_numMessages = 0;
}
return SetUint32PropertyWithToken(m_numMessagesColumnToken, m_numMessages);

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

@ -139,18 +139,10 @@ NS_IMETHODIMP nsMsgHdr::GetFlags(uint32_t* result) {
*result = m_mdb->GetStatusFlags(this, m_flags);
else
*result = m_flags;
#ifdef DEBUG_bienvenu
NS_ASSERTION(!(*result & (nsMsgMessageFlags::Elided)),
"shouldn't be set in db");
#endif
return NS_OK;
}
NS_IMETHODIMP nsMsgHdr::SetFlags(uint32_t flags) {
#ifdef DEBUG_bienvenu
NS_ASSERTION(!(flags & (nsMsgMessageFlags::Elided)),
"shouldn't set this flag on db");
#endif
m_initedValues |= FLAGS_INITED;
m_flags = flags;
// don't write out nsMsgMessageFlags::New to MDB.

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

@ -25,10 +25,7 @@ nsMsgThread::nsMsgThread(nsMsgDatabase* db, nsIMdbTable* table) {
db->m_threads.AppendElement(this);
else
NS_ERROR("no db for thread");
#ifdef DEBUG_David_Bienvenu
if (m_mdbDB->m_threads.Length() > 5)
printf("more than five outstanding threads\n");
#endif
if (table && db) {
table->GetMetaRow(db->GetEnv(), nullptr, nullptr,
getter_AddRefs(m_metaRow));
@ -331,9 +328,6 @@ NS_IMETHODIMP nsMsgThread::AddChild(nsIMsgDBHdr* child, nsIMsgDBHdr* inReplyTo,
if (announcer)
announcer->NotifyParentChangedAll(msgKey, oldThreadParent,
newHdrKey, nullptr);
#ifdef DEBUG_bienvenu1
if (newHdrKey != m_threadKey) printf("adding second level child\n");
#endif
}
// Calculate a position for this child in date order
else if (!hdrMoved && childIndex > 0 && moveIndex == 0) {
@ -386,12 +380,6 @@ NS_IMETHODIMP nsMsgThread::AddChild(nsIMsgDBHdr* child, nsIMsgDBHdr* inReplyTo,
m_mdbTable->MoveRow(m_mdbDB->GetEnv(), hdrRow, -1, moveIndex, &outPos);
}
#ifdef DEBUG_David_Bienvenu
nsMsgKey msgHdrThreadKey;
child->GetThreadId(&msgHdrThreadKey);
NS_ASSERTION(msgHdrThreadKey == m_threadKey,
"adding msg to thread it doesn't belong to");
#endif
return rv;
}
@ -654,25 +642,6 @@ nsMsgThreadEnumerator::nsMsgThreadEnumerator(nsMsgThread* thread,
NS_ASSERTION(false, "couldn't get child from thread");
}
}
#ifdef DEBUG_bienvenu1
nsCOMPtr<nsIMsgDBHdr> child;
for (uint32_t childIndex = 0; childIndex < numChildren; childIndex++) {
rv = mThread->GetChildHdrAt(childIndex, getter_AddRefs(child));
if (NS_SUCCEEDED(rv) && child) {
nsMsgKey threadParent;
nsMsgKey msgKey;
// we're only doing one level of threading, so check if caller is
// asking for children of the first message in the thread or not.
// if not, we will tell him there are no children.
child->GetMessageKey(&msgKey);
child->GetThreadParent(&threadParent);
printf("index = %ld key = %ld parent = %lx\n", childIndex, msgKey,
threadParent);
}
}
#endif
}
int32_t nsMsgThreadEnumerator::MsgKeyFirstChildIndex(nsMsgKey inMsgKey) {
@ -706,9 +675,7 @@ int32_t nsMsgThreadEnumerator::MsgKeyFirstChildIndex(nsMsgKey inMsgKey) {
}
}
}
#ifdef DEBUG_bienvenu1
printf("first child index of %ld = %ld\n", inMsgKey, firstChildIndex);
#endif
return firstChildIndex;
}
@ -779,12 +746,6 @@ nsresult nsMsgThreadEnumerator::Prefetch() {
mNeedToPrefetch = false;
mFoundChildren = true;
#ifdef DEBUG_bienvenu1
nsMsgKey debugMsgKey;
mResultHdr->GetMessageKey(&debugMsgKey);
printf("next for %ld = %ld\n", mThreadParentKey, debugMsgKey);
#endif
return rv;
}
@ -853,9 +814,7 @@ NS_IMETHODIMP nsMsgThread::GetRootHdr(nsIMsgDBHdr** result) {
// release any unwanted result before continuing.
NS_RELEASE(*result);
}
#ifdef DEBUG_David_Bienvenu
printf("need to reset thread root key\n");
#endif
nsMsgKey threadParentKey = nsMsgKey_None;
uint32_t numChildren = 0;
GetNumChildren(&numChildren);
@ -929,9 +888,6 @@ nsresult nsMsgThread::ChangeUnreadChildCount(int32_t delta) {
m_metaRow, m_mdbDB->m_threadUnreadChildrenColumnToken, childCount);
childCount += delta;
if ((int32_t)childCount < 0) {
#ifdef DEBUG_bienvenu1
NS_ASSERTION(false, "negative unread child count");
#endif
childCount = 0;
}
rv = m_mdbDB->UInt32ToRowCellColumn(

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

@ -13,10 +13,6 @@
#include "nsCOMPtr.h"
#include "prlog.h"
#if defined(DEBUG_sspitzer_) || defined(DEBUG_seth_)
# define DEBUG_NEWS_DATABASE 1
#endif
nsNewsDatabase::nsNewsDatabase() { m_readSet = nullptr; }
nsNewsDatabase::~nsNewsDatabase() {}
@ -162,19 +158,11 @@ bool nsNewsDatabase::SetHdrReadFlag(nsIMsgDBHdr* msgHdr, bool bRead) {
if (!m_readSet) return false;
if (!bRead) {
#ifdef DEBUG_NEWS_DATABASE
printf("remove %d from the set\n", messageKey);
#endif
m_readSet->Remove(messageKey);
rv = NotifyReadChanged(nullptr);
if (NS_FAILED(rv)) return false;
} else {
#ifdef DEBUG_NEWS_DATABASE
printf("add %d to the set\n", messageKey);
#endif
if (m_readSet->Add(messageKey) < 0) return false;
rv = NotifyReadChanged(nullptr);

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

@ -68,12 +68,6 @@ using namespace mozilla::mailnews;
// String bundle for mdn. Class static.
#define MDN_STRINGBUNDLE_URL "chrome://messenger/locale/msgmdn.properties"
#if defined(DEBUG_jefft)
# define DEBUG_MDN(s) printf("%s\n", s)
#else
# define DEBUG_MDN(s)
#endif
// machine parsible string; should not be localized
char DispositionTypes[7][16] = {
"displayed", "dispatched", "processed", "deleted", "denied", "failed", ""};
@ -96,8 +90,6 @@ nsMsgMdnGenerator::~nsMsgMdnGenerator() {}
nsresult nsMsgMdnGenerator::FormatStringFromName(const char* aName,
const nsString& aString,
nsAString& aResultString) {
DEBUG_MDN("nsMsgMdnGenerator::FormatStringFromName");
nsCOMPtr<nsIStringBundleService> bundleService =
mozilla::components::StringBundle::Service();
NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
@ -115,8 +107,6 @@ nsresult nsMsgMdnGenerator::FormatStringFromName(const char* aName,
nsresult nsMsgMdnGenerator::GetStringFromName(const char* aName,
nsAString& aResultString) {
DEBUG_MDN("nsMsgMdnGenerator::GetStringFromName");
nsCOMPtr<nsIStringBundleService> bundleService =
mozilla::components::StringBundle::Service();
NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
@ -133,8 +123,6 @@ nsresult nsMsgMdnGenerator::GetStringFromName(const char* aName,
nsresult nsMsgMdnGenerator::StoreMDNSentFlag(nsIMsgFolder* folder,
nsMsgKey key) {
DEBUG_MDN("nsMsgMdnGenerator::StoreMDNSentFlag");
nsCOMPtr<nsIMsgDatabase> msgDB;
nsresult rv = folder->GetMsgDatabase(getter_AddRefs(msgDB));
NS_ENSURE_SUCCESS(rv, rv);
@ -150,8 +138,6 @@ nsresult nsMsgMdnGenerator::StoreMDNSentFlag(nsIMsgFolder* folder,
nsresult nsMsgMdnGenerator::ClearMDNNeededFlag(nsIMsgFolder* folder,
nsMsgKey key) {
DEBUG_MDN("nsMsgMdnGenerator::ClearMDNNeededFlag");
nsCOMPtr<nsIMsgDatabase> msgDB;
nsresult rv = folder->GetMsgDatabase(getter_AddRefs(msgDB));
NS_ENSURE_SUCCESS(rv, rv);
@ -159,7 +145,6 @@ nsresult nsMsgMdnGenerator::ClearMDNNeededFlag(nsIMsgFolder* folder,
}
bool nsMsgMdnGenerator::ProcessSendMode() {
DEBUG_MDN("nsMsgMdnGenerator::ProcessSendMode");
int32_t miscState = 0;
if (m_identity) {
@ -258,7 +243,6 @@ bool nsMsgMdnGenerator::MailAddrMatch(const char* addr1, const char* addr2) {
// Comparing two email addresses returns true if matched; local/account
// part comparison is case sensitive; domain part comparison is case
// insensitive
DEBUG_MDN("nsMsgMdnGenerator::MailAddrMatch");
bool isMatched = true;
const char *atSign1 = nullptr, *atSign2 = nullptr;
const char *lt = nullptr, *local1 = nullptr, *local2 = nullptr;
@ -290,7 +274,6 @@ bool nsMsgMdnGenerator::MailAddrMatch(const char* addr1, const char* addr2) {
}
bool nsMsgMdnGenerator::NotInToOrCc() {
DEBUG_MDN("nsMsgMdnGenerator::NotInToOrCc");
nsCString reply_to;
nsCString to;
nsCString cc;
@ -315,7 +298,6 @@ bool nsMsgMdnGenerator::NotInToOrCc() {
}
bool nsMsgMdnGenerator::ValidateReturnPath() {
DEBUG_MDN("nsMsgMdnGenerator::ValidateReturnPath");
// ValidateReturnPath applies to Automatic Send Mode only. If we were not
// in auto send mode we simply by passing the check
if (!m_autoSend) return m_reallySendMdn;
@ -331,7 +313,6 @@ bool nsMsgMdnGenerator::ValidateReturnPath() {
}
nsresult nsMsgMdnGenerator::CreateMdnMsg() {
DEBUG_MDN("nsMsgMdnGenerator::CreateMdnMsg");
nsresult rv;
nsCOMPtr<nsIFile> tmpFile;
@ -366,7 +347,6 @@ nsresult nsMsgMdnGenerator::CreateMdnMsg() {
}
nsresult nsMsgMdnGenerator::CreateFirstPart() {
DEBUG_MDN("nsMsgMdnGenerator::CreateFirstPart");
char *convbuf = nullptr, *tmpBuffer = nullptr;
char* parm = nullptr;
nsString firstPart1;
@ -558,7 +538,6 @@ report-type=disposition-notification;\r\n\tboundary=\"%s\"" CRLF CRLF,
}
nsresult nsMsgMdnGenerator::CreateSecondPart() {
DEBUG_MDN("nsMsgMdnGenerator::CreateSecondPart");
char* tmpBuffer = nullptr;
char* convbuf = nullptr;
nsresult rv = NS_OK;
@ -669,7 +648,6 @@ nsresult nsMsgMdnGenerator::CreateSecondPart() {
}
nsresult nsMsgMdnGenerator::CreateThirdPart() {
DEBUG_MDN("nsMsgMdnGenerator::CreateThirdPart");
char* tmpBuffer = nullptr;
nsresult rv = NS_OK;
@ -701,7 +679,6 @@ nsresult nsMsgMdnGenerator::CreateThirdPart() {
}
nsresult nsMsgMdnGenerator::OutputAllHeaders() {
DEBUG_MDN("nsMsgMdnGenerator::OutputAllHeaders");
nsCString all_headers;
int32_t all_headers_size = 0;
nsresult rv = NS_OK;
@ -769,7 +746,6 @@ nsresult nsMsgMdnGenerator::OutputAllHeaders() {
}
nsresult nsMsgMdnGenerator::SendMdnMsg() {
DEBUG_MDN("nsMsgMdnGenerator::SendMdnMsg");
nsresult rv;
nsCOMPtr<nsIMsgOutgoingServerService> outgoingServerService = do_GetService(
"@mozilla.org/messengercompose/outgoingserverservice;1", &rv);
@ -802,7 +778,6 @@ nsresult nsMsgMdnGenerator::WriteString(const char* str) {
}
nsresult nsMsgMdnGenerator::InitAndProcess(bool* needToAskUser) {
DEBUG_MDN("nsMsgMdnGenerator::InitAndProcess");
nsresult rv = m_folder->GetServer(getter_AddRefs(m_server));
nsCOMPtr<nsIMsgAccountManager> accountManager =
do_GetService("@mozilla.org/messenger/account-manager;1", &rv);
@ -913,7 +888,6 @@ NS_IMETHODIMP nsMsgMdnGenerator::Process(EDisposeType type,
nsIMsgFolder* folder, nsMsgKey key,
nsIMimeHeaders* headers,
bool autoAction, bool* _retval) {
DEBUG_MDN("nsMsgMdnGenerator::Process");
NS_ENSURE_ARG_POINTER(folder);
NS_ENSURE_ARG_POINTER(headers);
NS_ENSURE_ARG_POINTER(aWindow);
@ -931,13 +905,11 @@ NS_IMETHODIMP nsMsgMdnGenerator::Process(EDisposeType type,
}
NS_IMETHODIMP nsMsgMdnGenerator::UserAgreed() {
DEBUG_MDN("nsMsgMdnGenerator::UserAgreed");
(void)NoteMDNRequestHandled();
return CreateMdnMsg();
}
NS_IMETHODIMP nsMsgMdnGenerator::UserDeclined() {
DEBUG_MDN("nsMsgMdnGenerator::UserDeclined");
return NoteMDNRequestHandled();
}
@ -954,7 +926,6 @@ nsresult nsMsgMdnGenerator::NoteMDNRequestHandled() {
}
NS_IMETHODIMP nsMsgMdnGenerator::OnStartRequest(nsIRequest* req) {
DEBUG_MDN("nsMsgMdnGenerator::OnStartRequest");
return NS_OK;
}
@ -962,7 +933,6 @@ NS_IMETHODIMP nsMsgMdnGenerator::OnStopRequest(nsIRequest* req,
nsresult aExitCode) {
nsresult rv;
DEBUG_MDN("nsMsgMdnGenerator::OnStopRequest");
if (m_file) m_file->Remove(false);
if (NS_SUCCEEDED(aExitCode)) return NS_OK;

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

@ -21,13 +21,7 @@ nsIMAPHostInfo::nsIMAPHostInfo(const char* serverKey,
fNextHost = NULL;
fCapabilityFlags = kCapabilityUndefined;
fHierarchyDelimiters = NULL;
#ifdef DEBUG_bienvenu1
fHaveWeEverDiscoveredFolders =
true; // try this, see what bad happens - we'll need to
// figure out a way to make new accounts have it be false
#else
fHaveWeEverDiscoveredFolders = false; // try this, see what bad happens
#endif
fHaveWeEverDiscoveredFolders = false;
fDiscoveryForHostInProgress = false;
fCanonicalOnlineSubDir = NULL;
fNamespaceList = nsImapNamespaceList::CreatensImapNamespaceList();

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

@ -667,29 +667,6 @@ nsresult nsImapIncomingServer::GetImapConnection(
if (!badConnection) {
badConnection = NS_FAILED(connection->CanHandleUrl(
aImapUrl, &canRunUrlImmediately, &canRunButBusy));
#ifdef DEBUG_bienvenu
nsAutoCString curSelectedFolderName;
if (connection)
connection->GetSelectedMailboxName(
getter_Copies(curSelectedFolderName));
// check that no other connection is in the same selected state.
if (!curSelectedFolderName.IsEmpty()) {
for (uint32_t j = 0; j < cnt; j++) {
if (j != i) {
nsCOMPtr<nsIImapProtocol> otherConnection =
do_QueryElementAt(m_connectionCache, j);
if (otherConnection) {
nsAutoCString otherSelectedFolderName;
otherConnection->GetSelectedMailboxName(
getter_Copies(otherSelectedFolderName));
NS_ASSERTION(
!curSelectedFolderName.Equals(otherSelectedFolderName),
"two connections selected on same folder");
}
}
}
}
#endif // DEBUG_bienvenu
}
if (badConnection) {
connection = nullptr;

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

@ -3753,11 +3753,6 @@ nsresult nsImapMailFolder::GetFolderOwnerUserName(nsACString& userName) {
nsImapNamespace* nsImapMailFolder::GetNamespaceForFolder() {
if (!m_namespace) {
#ifdef DEBUG_bienvenu
// Make sure this isn't causing us to open the database
NS_ASSERTION(m_hierarchyDelimiter != kOnlineHierarchySeparatorUnknown,
"haven't set hierarchy delimiter");
#endif
nsCString serverKey;
nsCString onlineName;
GetServerKey(serverKey);
@ -3779,9 +3774,6 @@ nsImapNamespace* nsImapMailFolder::GetNamespaceForFolder() {
}
void nsImapMailFolder::SetNamespaceForFolder(nsImapNamespace* ns) {
#ifdef DEBUG_bienvenu
NS_ASSERTION(ns, "null namespace");
#endif
m_namespace = ns;
}
@ -4916,9 +4908,6 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI* aUrl, nsresult aExitCode) {
bool folderOpen = false;
if (mailUrl) mailUrl->GetMsgWindow(getter_AddRefs(msgWindow));
if (session) session->IsFolderOpenInWindow(this, &folderOpen);
#ifdef DEBUG_bienvenu
printf("stop running url %s\n", aUrl->GetSpecOrDefault().get());
#endif
if (imapUrl) {
DisplayStatusMsg(imapUrl, EmptyString());
@ -7819,12 +7808,6 @@ NS_IMETHODIMP nsImapMailFolder::GetIsNamespace(bool* aResult) {
NS_ENSURE_ARG_POINTER(aResult);
nsresult rv = NS_OK;
if (!m_namespace) {
#ifdef DEBUG_bienvenu
// Make sure this isn't causing us to open the database
NS_ASSERTION(m_hierarchyDelimiter != kOnlineHierarchySeparatorUnknown,
"hierarchy delimiter not set");
#endif
nsCString onlineName, serverKey;
GetServerKey(serverKey);
GetOnlineName(onlineName);

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

@ -933,9 +933,6 @@ nsImapOfflineSync::ProcessNextOperation() {
}
}
// if we get here, then I *think* we're done. Not sure, though.
#ifdef DEBUG_bienvenu
printf("done with offline imap sync\n");
#endif
nsCOMPtr<nsIUrlListener> saveListener = m_listener;
m_listener = nullptr;

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

@ -1481,9 +1481,6 @@ nsImapProtocol::PseudoInterruptMsgLoad(nsIMsgFolder* aImapFolder,
}
}
PR_CExitMonitor(this);
#ifdef DEBUG_bienvenu
printf("interrupt msg load : %s\n", (*interrupted) ? "TRUE" : "FALSE");
#endif
return NS_OK;
}
@ -1592,10 +1589,7 @@ void nsImapProtocol::ImapThreadMainLoop() {
}
}
if (!GetServerStateParser().Connected()) break;
#ifdef DEBUG_bienvenu
else
printf("ready to run but no url and not idle\n");
#endif
// This can happen if the UI thread closes cached connections in the
// OnStopRunningUrl notification.
if (m_threadShouldDie) TellThreadToDie();
@ -2385,9 +2379,6 @@ NS_IMETHODIMP nsImapProtocol::LoadImapUrl(nsIURI* aURL,
nsISupports* aConsumer) {
nsresult rv = NS_ERROR_FAILURE;
if (aURL) {
#ifdef DEBUG_bienvenu
printf("loading url %s\n", aURL->GetSpecOrDefault().get());
#endif
// We might be able to fulfill the request locally (e.g. fetching a message
// which is already stored offline).
if (TryToRunUrlLocally(aURL, aConsumer)) return NS_OK;
@ -8957,9 +8948,6 @@ NS_IMETHODIMP nsImapMockChannel::GetURI(nsIURI** aURI) {
NS_IMETHODIMP nsImapMockChannel::SetURI(nsIURI* aURI) {
m_url = aURI;
#ifdef DEBUG_bienvenu
if (!aURI) printf("Clearing URI\n");
#endif
if (m_url) {
// if we don't have a progress event sink yet, get it from the url for
// now...

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

@ -500,9 +500,6 @@ nsresult nsImapService::FetchMimePartInternal(nsIImapUrl* aImapUrl,
// docshell or stream listener passed into us in this method but i'm not
// sure yet... I'm going to use an assert for now to figure out if this
// is ever getting called
#if defined(DEBUG_mscott) || defined(DEBUG_bienvenu)
NS_ERROR("oops...someone still is reaching this part of the code");
#endif
rv = GetImapConnectionAndLoadUrl(aImapUrl, aDisplayConsumer, aURL);
}
}
@ -873,9 +870,6 @@ nsresult nsImapService::GetMessageFromUrl(
// docshell or stream listener passed into us in this method but i'm not
// sure yet... I'm going to use an assert for now to figure out if this is
// ever getting called
#if defined(DEBUG_mscott) || defined(DEBUG_bienvenu)
NS_ERROR("oops...someone still is reaching this part of the code");
#endif
rv = GetImapConnectionAndLoadUrl(aImapUrl, aDisplayConsumer, aURL);
}
}

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

@ -10,8 +10,6 @@
// SpaceHit() function: whether spacebar advances to next unread message.
pref("mail.advance_on_spacebar", true);
pref("mailnews.logComposePerformance", false);
pref("mail.wrap_long_lines", true);
// Show attachments of supported types rendered directly in the message body view.

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

@ -363,11 +363,6 @@ nsMimeBaseEmitter::Write(const nsACString& buf, uint32_t* amountWritten) {
nsresult rv = NS_OK;
uint32_t needToWrite;
#ifdef DEBUG_BenB
// If you want to see libmime output...
printf("%s", buf);
#endif
MOZ_LOG(gMimeEmitterLogModule, mozilla::LogLevel::Info,
("%s", PromiseFlatCString(buf).get()));
//

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

@ -78,15 +78,6 @@ void MimeHeaders_free(MimeHeaders* hdrs) {
hdrs->obuffer_fp = 0;
hdrs->obuffer_size = 0;
#ifdef DEBUG__
{
int i, size = sizeof(*hdrs);
uint32_t* array = (uint32_t*)hdrs;
for (i = 0; i < (size / sizeof(*array)); i++)
array[i] = (uint32_t)0xDEADBEEF;
}
#endif /* DEBUG */
PR_Free(hdrs);
}

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

@ -244,17 +244,7 @@ MimeObject* mime_new(MimeObjectClass* clazz, MimeHeaders* hdrs,
}
void mime_free(MimeObject* object) {
#ifdef DEBUG__
int i, size = object->clazz->instance_size;
uint32_t* array = (uint32_t*)object;
#endif /* DEBUG */
object->clazz->finalize(object);
#ifdef DEBUG__
for (i = 0; i < (size / sizeof(*array)); i++) array[i] = (uint32_t)0xDEADBEEF;
#endif /* DEBUG */
PR_Free(object);
}

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

@ -765,14 +765,6 @@ nsresult nsStreamConverter::OnDataAvailable(nsIRequest* request,
// called only once, at the beginning of a URL load.
//
nsresult nsStreamConverter::OnStartRequest(nsIRequest* request) {
#ifdef DEBUG_rhp
printf("nsStreamConverter::OnStartRequest()\n");
#endif
#ifdef DEBUG_mscott
mConvertContentTime = PR_IntervalNow();
#endif
// here's a little bit of hackery....
// since the mime converter is now between the channel
// and the

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

@ -86,9 +86,6 @@ class nsStreamConverter : public nsIStreamConverter,
nsCString mFromType;
nsCString mToType;
#ifdef DEBUG_mscott
PRTime mConvertContentTime;
#endif
nsIRequest* mPendingRequest; // used when we need to delay to fire
// onStartRequest
};

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

@ -200,9 +200,6 @@ NS_IMETHODIMP DownloadNewsArticlesToOfflineStore::OnStopRunningUrl(
nsIURI* url, nsresult exitCode) {
m_status = exitCode;
if (m_newsHeader != nullptr) {
#ifdef DEBUG_bienvenu
// XP_Trace("finished retrieving %ld\n", m_newsHeader->GetMessageKey());
#endif
if (m_newsDB) {
nsMsgKey msgKey;
m_newsHeader->GetMessageKey(&msgKey);