Bug 767388 - Kill NS_DEBUG. r=bz.

--HG--
extra : rebase_source : d045208a26345712dbb4628c973c616cd9504f28
This commit is contained in:
Jonathan Watt 2012-06-25 20:59:42 +01:00
parent 4383c6a1a5
commit 970e60a384
119 changed files with 245 additions and 246 deletions

View File

@ -67,7 +67,7 @@
#include "nsNetUtil.h"
#include "nsEventStates.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#include "nsIDOMCharacterData.h"
#endif

View File

@ -120,7 +120,7 @@ nsContentSink::nsContentSink()
NS_ASSERTION(mInNotification == 0, "What?");
NS_ASSERTION(!mDeferredLayoutStart, "What?");
#ifdef NS_DEBUG
#ifdef DEBUG
if (!gContentSinkLogModuleInfo) {
gContentSinkLogModuleInfo = PR_NewLogModule("nscontentsink");
}
@ -925,7 +925,7 @@ nsContentSink::SelectDocAppCache(nsIApplicationCache *aLoadApplicationCache,
// The http manifest attribute URI is equal to the manifest URI of
// the cache the document was loaded from - associate the document with
// that cache and invoke the cache update process.
#ifdef NS_DEBUG
#ifdef DEBUG
nsCAutoString docURISpec, clientID;
mDocumentURI->GetAsciiSpec(docURISpec);
aLoadApplicationCache->GetClientID(clientID);
@ -979,7 +979,7 @@ nsContentSink::SelectDocAppCacheNoManifest(nsIApplicationCache *aLoadApplication
NS_ASSERTION(applicationCacheDocument,
"mDocument must implement nsIApplicationCacheContainer.");
#ifdef NS_DEBUG
#ifdef DEBUG
nsCAutoString docURISpec, clientID;
mDocumentURI->GetAsciiSpec(docURISpec);
aLoadApplicationCache->GetClientID(clientID);

View File

@ -52,7 +52,7 @@ class Loader;
}
}
#ifdef NS_DEBUG
#ifdef DEBUG
extern PRLogModuleInfo* gContentSinkLogModuleInfo;

View File

@ -85,7 +85,7 @@
using namespace mozilla;
using namespace mozilla::dom;
#ifdef NS_DEBUG
#ifdef DEBUG
static PRLogModuleInfo* gSinkLogModuleInfo;
#define SINK_TRACE_NODE(_bit, _msg, _tag, _sp, _obj) \
@ -188,7 +188,7 @@ protected:
already_AddRefed<nsGenericHTMLElement>
CreateContentObject(const nsIParserNode& aNode, nsHTMLTag aNodeType);
#ifdef NS_DEBUG
#ifdef DEBUG
void SinkTraceNode(PRUint32 aBit,
const char* aMsg,
const nsHTMLTag aTag,
@ -243,7 +243,7 @@ protected:
bool IsMonolithicContainer(nsHTMLTag aTag);
#ifdef NS_DEBUG
#ifdef DEBUG
void ForceReflow();
#endif
};
@ -313,7 +313,7 @@ private:
//----------------------------------------------------------------------
#ifdef NS_DEBUG
#ifdef DEBUG
void
HTMLContentSink::SinkTraceNode(PRUint32 aBit,
const char* aMsg,
@ -582,7 +582,7 @@ SinkContext::DidAddContent(nsIContent* aContent)
mStack[mStackPos - 1].mContent->GetChildCount()) {
nsIContent* parent = mStack[mStackPos - 1].mContent;
#ifdef NS_DEBUG
#ifdef DEBUG
// Tracing code
nsIParserService *parserService = nsContentUtils::GetParserService();
if (parserService) {
@ -757,7 +757,7 @@ SinkContext::CloseContainer(const nsHTMLTag aTag)
// notification
if (mStack[mStackPos].mNumFlushed < content->GetChildCount()) {
#ifdef NS_DEBUG
#ifdef DEBUG
{
// Tracing code
SINK_TRACE(gSinkLogModuleInfo, SINK_TRACE_REFLOW,
@ -1068,7 +1068,7 @@ SinkContext::FlushTags()
childCount = content->GetChildCount();
if (!flushed && (mStack[stackPos].mNumFlushed < childCount)) {
#ifdef NS_DEBUG
#ifdef DEBUG
{
// Tracing code
SINK_TRACE(gSinkLogModuleInfo, SINK_TRACE_REFLOW,
@ -1242,7 +1242,7 @@ HTMLContentSink::HTMLContentSink()
// Note: operator new zeros our memory
#ifdef NS_DEBUG
#ifdef DEBUG
if (!gSinkLogModuleInfo) {
gSinkLogModuleInfo = PR_NewLogModule("htmlcontentsink");
}
@ -1426,7 +1426,7 @@ HTMLContentSink::Init(nsIDocument* aDoc,
mCurrentContext->Begin(eHTMLTag_html, mRoot, 0, -1);
mContextStack.AppendElement(mCurrentContext);
#ifdef NS_DEBUG
#ifdef DEBUG
nsCAutoString spec;
(void)aURI->GetSpec(spec);
SINK_TRACE(gSinkLogModuleInfo, SINK_TRACE_CALLS,

View File

@ -1214,7 +1214,7 @@ nsXMLContentSink::HandleDoctypeDecl(const nsAString & aSubset,
nsRefPtr<nsCSSStyleSheet> sheet;
mCSSLoader->LoadSheetSync(uri, true, true, getter_AddRefs(sheet));
#ifdef NS_DEBUG
#ifdef DEBUG
nsCAutoString uriStr;
uri->GetSpec(uriStr);
printf("Loading catalog stylesheet: %s ... %s\n", uriStr.get(), sheet.get() ? "Done" : "Failed");

View File

@ -271,7 +271,7 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement,
while (updater) {
if (updater->mElement == aElement) {
#ifdef NS_DEBUG
#ifdef DEBUG
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsCAutoString eventsC, targetsC, aeventsC, atargetsC;
eventsC.AssignWithConversion(updater->mEvents);
@ -299,7 +299,7 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement,
link = &(updater->mNext);
updater = updater->mNext;
}
#ifdef NS_DEBUG
#ifdef DEBUG
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsCAutoString aeventsC, atargetsC;
CopyUTF16toUTF8(aEvents, aeventsC);
@ -334,7 +334,7 @@ nsXULCommandDispatcher::RemoveCommandUpdater(nsIDOMElement* aElement)
while (updater) {
if (updater->mElement == aElement) {
#ifdef NS_DEBUG
#ifdef DEBUG
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsCAutoString eventsC, targetsC;
eventsC.AssignWithConversion(updater->mEvents);
@ -400,7 +400,7 @@ nsXULCommandDispatcher::UpdateCommands(const nsAString& aEventName)
if (! document)
continue;
#ifdef NS_DEBUG
#ifdef DEBUG
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsCAutoString aeventnameC;
CopyUTF16toUTF8(aEventName, aeventnameC);

View File

@ -10575,7 +10575,7 @@ nsDocShell::SetHistoryEntry(nsCOMPtr<nsISHEntry> *aPtr, nsISHEntry *aEntry)
nsDocShell *rootDocShell = static_cast<nsDocShell*>
(rootIDocShell);
#ifdef NS_DEBUG
#ifdef DEBUG
nsresult rv =
#endif
SetChildHistoryEntry(oldRootEntry, rootDocShell,

View File

@ -613,7 +613,7 @@ static const char kDOMStringBundleURL[] =
(nsIClassInfo::MAIN_THREAD_ONLY | nsIClassInfo::DOM_OBJECT)
#ifdef NS_DEBUG
#ifdef DEBUG
#define NS_DEFINE_CLASSINFO_DATA_DEBUG(_class) \
eDOMClassInfo_##_class##_id,
#else
@ -4535,7 +4535,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMLockedFile)
DOM_CLASSINFO_MAP_END
#ifdef NS_DEBUG
#ifdef DEBUG
{
PRUint32 i = ArrayLength(sClassInfoData);
@ -5876,7 +5876,7 @@ DefineInterfaceConstants(JSContext *cx, JSObject *obj, const nsIID *aIID)
}
default:
{
#ifdef NS_DEBUG
#ifdef DEBUG
NS_ERROR("Non-numeric constant found in interface.");
#endif
continue;

View File

@ -71,7 +71,7 @@ struct nsDOMClassInfoData
PRUint32 mInterfacesBitmap;
bool mChromeOnly;
bool mDisabled;
#ifdef NS_DEBUG
#ifdef DEBUG
PRUint32 mDebugID;
#endif
};

View File

@ -257,7 +257,7 @@ static TimeStamp gLastRecordedRecentTimeouts;
PRInt32 gTimeoutCnt = 0;
#endif
#if !(defined(NS_DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
#if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
static bool gDOMWindowDumpEnabled = false;
#endif
@ -713,7 +713,7 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
gRefCnt++;
if (gRefCnt == 1) {
#if !(defined(NS_DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
#if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
Preferences::AddBoolVarCache(&gDOMWindowDumpEnabled,
"browser.dom.window.dump.enabled");
#endif
@ -4464,7 +4464,7 @@ nsGlobalWindow::GetFullScreen(bool* aFullScreen)
bool
nsGlobalWindow::DOMWindowDumpEnabled()
{
#if !(defined(NS_DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
#if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
// In optimized builds we check a pref that controls if we should
// enable output from dump() or not, in debug builds it's always
// enabled.
@ -8631,7 +8631,7 @@ nsGlobalWindow::OpenInternal(const nsAString& aUrl, const nsAString& aName,
aJSCallerContext, aReturn),
NS_ERROR_NOT_INITIALIZED);
#ifdef NS_DEBUG
#ifdef DEBUG
PRUint32 argc = 0;
if (argv)
argv->GetLength(&argc);

View File

@ -1676,7 +1676,7 @@ nsJSContext::JSObjectFromInterface(nsISupports* aTarget, JSObject* aScope, JSObj
nsresult rv = nsContentUtils::WrapNative(mContext, aScope, aTarget, &v);
NS_ENSURE_SUCCESS(rv, rv);
#ifdef NS_DEBUG
#ifdef DEBUG
nsCOMPtr<nsISupports> targetSupp = do_QueryInterface(aTarget);
nsCOMPtr<nsISupports> native =
nsContentUtils::XPConnect()->GetNativeOfWrapper(mContext,
@ -2216,7 +2216,7 @@ nsJSContext::ConvertSupportsTojsvals(nsISupports *aArgs,
if (rv == NS_ERROR_NO_INTERFACE) {
// something else - probably an event object or similar -
// just wrap it.
#ifdef NS_DEBUG
#ifdef DEBUG
// but first, check its not another nsISupportsPrimitive, as
// these are now deprecated for use with script contexts.
nsCOMPtr<nsISupportsPrimitive> prim(do_QueryInterface(arg));

View File

@ -66,7 +66,7 @@ mOwner(owner)
// construct the URL we'll use later in calls to GetURL()
NS_GetURLSpecFromFile(mTempFile, mFileURL);
#ifdef NS_DEBUG
#ifdef DEBUG
printf("File URL = %s\n", mFileURL.get());
#endif
}

View File

@ -1636,7 +1636,7 @@ nsresult nsPluginHost::GetPlugin(const char *aMimeType, nsNPAPIPlugin** aPlugin)
("nsPluginHost::GetPlugin Begin mime=%s, plugin=%s\n",
aMimeType, pluginTag->mFileName.get()));
#ifdef NS_DEBUG
#ifdef DEBUG
if (aMimeType && !pluginTag->mFileName.IsEmpty())
printf("For %s found plugin %s\n", aMimeType, pluginTag->mFileName.get());
#endif

View File

@ -219,7 +219,7 @@ void nsPluginNativeWindowGtk2::SetAllocation() {
nsresult nsPluginNativeWindowGtk2::CreateXtWindow() {
NS_ASSERTION(!mSocketWidget,"Already created a socket widget!");
#ifdef NS_DEBUG
#ifdef DEBUG
printf("About to create new xtbin of %i X %i from %p...\n",
width, height, (void*)window);
#endif
@ -235,11 +235,11 @@ nsresult nsPluginNativeWindowGtk2::CreateXtWindow() {
gtk_widget_set_size_request(mSocketWidget, width, height);
#ifdef NS_DEBUG
#ifdef DEBUG
printf("About to show xtbin(%p)...\n", (void*)mSocketWidget); fflush(NULL);
#endif
gtk_widget_show(mSocketWidget);
#ifdef NS_DEBUG
#ifdef DEBUG
printf("completed gtk_widget_show(%p)\n", (void*)mSocketWidget); fflush(NULL);
#endif

View File

@ -303,7 +303,7 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary)
pLibrary = *outLibrary;
#endif // MOZ_WIDGET_GTK2
#ifdef NS_DEBUG
#ifdef DEBUG
printf("LoadPlugin() %s returned %lx\n",
libSpec.value.pathname, (unsigned long)pLibrary);
#endif

View File

@ -24,7 +24,7 @@
#include "xpcpublic.h"
#include "nsJSEnvironment.h"
#include "nsDOMJSUtils.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#include "nspr.h" // PR_fprintf
@ -174,7 +174,7 @@ nsJSEventListener::HandleEvent(nsIDOMEvent* aEvent)
// mContext is the same context which event listener manager pushes
// to JS context stack.
#ifdef NS_DEBUG
#ifdef DEBUG
JSContext* cx = nsnull;
nsCOMPtr<nsIJSContextStack> stack =
do_GetService("@mozilla.org/js/xpc/ContextStack;1");

View File

@ -13,7 +13,7 @@
#include "mozilla/dom/Element.h"
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gNoisy = false;
#endif
@ -60,7 +60,7 @@ NS_IMETHODIMP CreateElementTxn::Init(nsEditor *aEditor,
NS_IMETHODIMP CreateElementTxn::DoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
char* nodename = ToNewCString(mTag);
@ -84,7 +84,7 @@ NS_IMETHODIMP CreateElementTxn::DoTransaction(void)
// Try to insert formatting whitespace for the new node:
mEditor->MarkNodeDirty(mNewNode);
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf(" newNode = %p\n", static_cast<void*>(mNewNode.get()));
@ -134,7 +134,7 @@ NS_IMETHODIMP CreateElementTxn::DoTransaction(void)
NS_IMETHODIMP CreateElementTxn::UndoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("Undo Create Element, mParent = %p, node = %p\n",
@ -152,7 +152,7 @@ NS_IMETHODIMP CreateElementTxn::UndoTransaction(void)
NS_IMETHODIMP CreateElementTxn::RedoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy) { printf("Redo Create Element\n"); }
#endif

View File

@ -8,11 +8,11 @@
#include "DeleteElementTxn.h"
#include "nsSelectionState.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#include "nsIDOMElement.h"
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gNoisy = false;
#endif
@ -67,7 +67,7 @@ NS_IMETHODIMP DeleteElementTxn::Init(nsIEditor *aEditor,
NS_IMETHODIMP DeleteElementTxn::DoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("%p Do Delete Element element = %p\n",
@ -80,7 +80,7 @@ NS_IMETHODIMP DeleteElementTxn::DoTransaction(void)
if (!mParent) { return NS_OK; } // this is a no-op, there's no parent to delete mElement from
#ifdef NS_DEBUG
#ifdef DEBUG
// begin debug output
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(mElement);
nsAutoString elementTag(NS_LITERAL_STRING("text node"));
@ -118,7 +118,7 @@ NS_IMETHODIMP DeleteElementTxn::DoTransaction(void)
NS_IMETHODIMP DeleteElementTxn::UndoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("%p Undo Delete Element element = %p, parent = %p\n",
@ -131,7 +131,7 @@ NS_IMETHODIMP DeleteElementTxn::UndoTransaction(void)
if (!mParent) { return NS_OK; } // this is a legal state, the txn is a no-op
if (!mElement) { return NS_ERROR_NULL_POINTER; }
#ifdef NS_DEBUG
#ifdef DEBUG
// begin debug output
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(mElement);
nsAutoString elementTag(NS_LITERAL_STRING("text node"));
@ -161,7 +161,7 @@ NS_IMETHODIMP DeleteElementTxn::UndoTransaction(void)
NS_IMETHODIMP DeleteElementTxn::RedoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("%p Redo Delete Element element = %p, parent = %p\n",

View File

@ -16,7 +16,7 @@
using namespace mozilla;
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gNoisy = false;
#endif
@ -110,7 +110,7 @@ NS_IMETHODIMP DeleteRangeTxn::Init(nsEditor *aEditor,
NS_IMETHODIMP DeleteRangeTxn::DoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy) { printf("Do Delete Range\n"); }
#endif
@ -171,7 +171,7 @@ NS_IMETHODIMP DeleteRangeTxn::DoTransaction(void)
NS_IMETHODIMP DeleteRangeTxn::UndoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy) { printf("Undo Delete Range\n"); }
#endif
@ -182,7 +182,7 @@ NS_IMETHODIMP DeleteRangeTxn::UndoTransaction(void)
NS_IMETHODIMP DeleteRangeTxn::RedoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy) { printf("Redo Delete Range\n"); }
#endif

View File

@ -9,7 +9,7 @@
#include "nsIDOMNodeList.h"
#include "nsReadableUtils.h"
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gNoisy = false;
#endif
@ -55,7 +55,7 @@ NS_IMETHODIMP InsertElementTxn::Init(nsIDOMNode *aNode,
NS_IMETHODIMP InsertElementTxn::DoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
nsCOMPtr<nsIContent>nodeAsContent = do_QueryInterface(mNode);
@ -116,7 +116,7 @@ NS_IMETHODIMP InsertElementTxn::DoTransaction(void)
NS_IMETHODIMP InsertElementTxn::UndoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("%p Undo Insert Element of %p into parent %p at offset %d\n",

View File

@ -8,7 +8,7 @@
#include "nsISelection.h"
#include "EditAggregateTxn.h"
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gNoisy = false;
#endif
@ -62,7 +62,7 @@ NS_IMETHODIMP InsertTextTxn::Init(nsIDOMCharacterData *aElement,
NS_IMETHODIMP InsertTextTxn::DoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("Do Insert Text element = %p\n",
@ -98,7 +98,7 @@ NS_IMETHODIMP InsertTextTxn::DoTransaction(void)
NS_IMETHODIMP InsertTextTxn::UndoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("Undo Insert Text element = %p\n",
@ -133,7 +133,7 @@ NS_IMETHODIMP InsertTextTxn::Merge(nsITransaction *aTransaction, bool *aDidMerge
otherInsTxn->GetData(otherData);
mStringToInsert += otherData;
*aDidMerge = true;
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("InsertTextTxn assimilated %p\n",

View File

@ -8,7 +8,7 @@
#include "nsIDOMNodeList.h"
#include "nsIDOMCharacterData.h"
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gNoisy = false;
#endif
@ -56,7 +56,7 @@ NS_IMETHODIMP JoinElementTxn::Init(nsEditor *aEditor,
// After DoTransaction() and RedoTransaction(), the left node is removed from the content tree and right node remains.
NS_IMETHODIMP JoinElementTxn::DoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("%p Do Join of %p and %p\n",
@ -108,7 +108,7 @@ NS_IMETHODIMP JoinElementTxn::DoTransaction(void)
// and re-inserted mLeft?
NS_IMETHODIMP JoinElementTxn::UndoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("%p Undo Join, right node = %p\n",

View File

@ -9,7 +9,7 @@
#include "nsISelection.h"
#include "nsIDOMCharacterData.h"
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gNoisy = false;
#endif
@ -52,7 +52,7 @@ NS_IMETHODIMP SplitElementTxn::Init(nsEditor *aEditor,
NS_IMETHODIMP SplitElementTxn::DoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("%p Do Split of node %p offset %d\n",
@ -72,7 +72,7 @@ NS_IMETHODIMP SplitElementTxn::DoTransaction(void)
NS_ENSURE_TRUE(mNewLeftNode, NS_ERROR_NULL_POINTER);
mEditor->MarkNodeDirty(mExistingRightNode);
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf(" created left node = %p\n",
@ -108,7 +108,7 @@ NS_IMETHODIMP SplitElementTxn::DoTransaction(void)
NS_IMETHODIMP SplitElementTxn::UndoTransaction(void)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy) {
printf("%p Undo Split of existing node %p and new node %p offset %d\n",
static_cast<void*>(this),
@ -125,7 +125,7 @@ NS_IMETHODIMP SplitElementTxn::UndoTransaction(void)
// this assumes Do inserted the new node in front of the prior existing node
nsresult result = mEditor->JoinNodesImpl(mExistingRightNode, mNewLeftNode, mParent, false);
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("** after join left child node %p into right node %p\n",
@ -156,7 +156,7 @@ NS_IMETHODIMP SplitElementTxn::RedoTransaction(void)
return NS_ERROR_NOT_INITIALIZED;
}
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy) {
printf("%p Redo Split of existing node %p and new node %p offset %d\n",
static_cast<void*>(this),
@ -174,7 +174,7 @@ NS_IMETHODIMP SplitElementTxn::RedoTransaction(void)
if (rightNodeAsText)
{
result = rightNodeAsText->DeleteData(0, mOffset);
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("** after delete of text in right text node %p offset %d\n",
@ -199,7 +199,7 @@ NS_IMETHODIMP SplitElementTxn::RedoTransaction(void)
if (NS_SUCCEEDED(result))
{
result = mNewLeftNode->AppendChild(child, getter_AddRefs(resultNode));
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("** move child node %p from right node %p to left node %p\n",
@ -215,7 +215,7 @@ NS_IMETHODIMP SplitElementTxn::RedoTransaction(void)
}
// second, re-insert the left node into the tree
result = mParent->InsertBefore(mNewLeftNode, mExistingRightNode, getter_AddRefs(resultNode));
#ifdef NS_DEBUG
#ifdef DEBUG
if (gNoisy)
{
printf("** reinsert left child node %p before right node %p\n",

View File

@ -6,7 +6,7 @@
#ifndef __TextEditorTest_h__
#define __TextEditorTest_h__
#ifdef NS_DEBUG
#ifdef DEBUG
#include "nsCOMPtr.h"
#include "nsIEditor.h"
@ -35,6 +35,6 @@ protected:
nsCOMPtr<nsIEditor> mEditor;
};
#endif /* NS_DEBUG */
#endif /* DEBUG */
#endif

View File

@ -80,7 +80,7 @@ NS_IMETHODIMP nsAppStartupNotifier::Observe(nsISupports *aSubject, const char *a
}
}
else {
#ifdef NS_DEBUG
#ifdef DEBUG
nsCAutoString warnStr("Cannot create startup observer : ");
warnStr += contractId.get();
NS_WARNING(warnStr.get());

View File

@ -909,7 +909,7 @@ NS_IMETHODIMP imgRequest::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctx
PRUint32 out;
inStr->ReadSegments(sniff_mimetype_callback, this, count, &out);
#ifdef NS_DEBUG
#ifdef DEBUG
/* NS_WARNING if the content type from the channel isn't the same if the sniffing */
#endif

View File

@ -343,7 +343,7 @@ nsresult nsTestUConv::DisplayCharsets()
printf("D");
decCount++;
}
#ifdef NS_DEBUG
#ifdef DEBUG
// show the "basic" decoder classes
if (dec) {
nsCOMPtr<nsIBasicDecoder> isBasic = do_QueryInterface(dec);
@ -364,7 +364,7 @@ nsresult nsTestUConv::DisplayCharsets()
encCount++;
}
#ifdef NS_DEBUG
#ifdef DEBUG
if (enc) {
nsCOMPtr<nsIBasicEncoder> isBasic = do_QueryInterface(enc);
if (isBasic) {

View File

@ -29,7 +29,7 @@ nsBasicDecoderSupport::~nsBasicDecoderSupport()
//----------------------------------------------------------------------
// Interface nsISupports [implementation]
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMPL_THREADSAFE_ISUPPORTS2(nsBasicDecoderSupport,
nsIUnicodeDecoder,
nsIBasicDecoder)
@ -333,7 +333,7 @@ nsBasicEncoder::~nsBasicEncoder()
NS_IMPL_ADDREF(nsBasicEncoder)
NS_IMPL_RELEASE(nsBasicEncoder)
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMPL_QUERY_INTERFACE2(nsBasicEncoder,
nsIUnicodeEncoder,
nsIBasicEncoder)

View File

@ -21,7 +21,7 @@ inline bool WillOverrun(PRUnichar* aDest, PRUnichar* aDestEnd, PRUint32 aLength)
}
#define CHECK_OVERRUN(dest, destEnd, length) (WillOverrun(dest, destEnd, length))
#ifdef NS_DEBUG
#ifdef DEBUG
// {7AFC9F0A-CFE1-44ea-A755-E3B86AB1226E}
#define NS_IBASICDECODER_IID \
{ 0x7afc9f0a, 0xcfe1, 0x44ea, { 0xa7, 0x55, 0xe3, 0xb8, 0x6a, 0xb1, 0x22, 0x6e } }
@ -65,7 +65,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIBasicEncoder, NS_IBASICENCODER_IID)
* @author Catalin Rotaru [CATA]
*/
class nsBasicDecoderSupport : public nsIUnicodeDecoder
#ifdef NS_DEBUG
#ifdef DEBUG
,public nsIBasicDecoder
#endif
{
@ -270,7 +270,7 @@ protected:
// Class nsBasicEncoder [declaration]
class nsBasicEncoder : public nsIUnicodeEncoder
#ifdef NS_DEBUG
#ifdef DEBUG
,public nsIBasicEncoder
#endif
{

View File

@ -100,7 +100,7 @@ public:
mData = mem;
#ifdef NS_DEBUG
#ifdef DEBUG
struct shmid_ds info;
if (shmctl(mHandle, IPC_STAT, &info) < 0)
return false;

View File

@ -95,12 +95,12 @@ enum Type {
TYPE_MATHML_MENCLOSE_NOTATION,
TYPE_MATHML_SELECTION_RECT,
TYPE_MATHML_SLASH,
#ifdef NS_DEBUG
#ifdef DEBUG
TYPE_MATHML_BOUNDING_METRICS,
TYPE_MATHML_CHAR_DEBUG,
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
TYPE_DEBUG_BORDER,
TYPE_DEBUG_IMAGE_MAP,
TYPE_DEBUG_PLACEHOLDER,

View File

@ -159,7 +159,7 @@ static const char sPrintOptionsContractID[] = "@mozilla.org/gfx/printset
using namespace mozilla;
#ifdef NS_DEBUG
#ifdef DEBUG
#undef NOISY_VIEWER
#else
@ -437,9 +437,9 @@ protected:
float mPrintPreviewZoom;
#endif // NS_PRINT_PREVIEW
#ifdef NS_DEBUG
#ifdef DEBUG
FILE* mDebugFile;
#endif // NS_DEBUG
#endif // DEBUG
#endif // NS_PRINTING
/* character set member data */
@ -522,7 +522,7 @@ void DocumentViewerImpl::PrepareToStartLoad()
#endif
}
#ifdef NS_DEBUG
#ifdef DEBUG
mDebugFile = nsnull;
#endif
@ -2603,7 +2603,7 @@ DocumentViewerImpl::Print(bool aSilent,
#ifdef NS_PRINTING
nsCOMPtr<nsIPrintSettings> printSettings;
#ifdef NS_DEBUG
#ifdef DEBUG
nsresult rv = NS_ERROR_FAILURE;
mDebugFile = aDebugFile;
@ -3622,7 +3622,7 @@ DocumentViewerImpl::Print(nsIPrintSettings* aPrintSettings,
float(mDeviceContext->AppUnitsPerCSSInch()) /
float(mDeviceContext->AppUnitsPerDevPixel()) /
mPageZoom,
#ifdef NS_DEBUG
#ifdef DEBUG
mDebugFile
#else
nsnull
@ -3689,7 +3689,7 @@ DocumentViewerImpl::PrintPreview(nsIPrintSettings* aPrintSettings,
float(mDeviceContext->AppUnitsPerCSSInch()) /
float(mDeviceContext->AppUnitsPerDevPixel()) /
mPageZoom,
#ifdef NS_DEBUG
#ifdef DEBUG
mDebugFile
#else
nsnull

View File

@ -32,7 +32,7 @@
#include "nsGkAtoms.h"
#include "nsCSSAnonBoxes.h"
#include "nsCSSPseudoElements.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#include "nsIStyleRule.h"
#endif
#include "nsILayoutHistoryState.h"
@ -517,7 +517,7 @@ nsFrameManager::NotifyDestroyingFrame(nsIFrame* aFrame)
}
}
#ifdef NS_DEBUG
#ifdef DEBUG
static void
DumpContext(nsIFrame* aFrame, nsStyleContext* aContext)
{

View File

@ -155,7 +155,7 @@ public:
nsIStatefulFrame::SpecialStateID aID =
nsIStatefulFrame::eNoID);
#ifdef NS_DEBUG
#ifdef DEBUG
/**
* DEBUG ONLY method to verify integrity of style tree versus frame tree
*/

View File

@ -1015,7 +1015,7 @@ public:
#endif
}
#ifdef NS_DEBUG
#ifdef DEBUG
nsIFrame* GetDrawEventTargetFrame() { return mDrawEventTargetFrame; }
#endif
@ -1324,7 +1324,7 @@ protected:
nsFrameManagerBase* mFrameManager;
nsWeakPtr mForwardingContainer;
#ifdef NS_DEBUG
#ifdef DEBUG
nsIFrame* mDrawEventTargetFrame;
// Ensure that every allocation from the PresArena is eventually freed.
PRUint32 mPresArenaAllocCount;

View File

@ -17,7 +17,7 @@
using namespace mozilla::layers;
#ifdef NS_DEBUG
#ifdef DEBUG
class nsLayoutDebugger : public nsILayoutDebugger {
public:
nsLayoutDebugger();

View File

@ -389,7 +389,7 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
}
}
#ifdef NS_DEBUG
#ifdef DEBUG
// Verify that the frame is actually in that child list or in the
// corresponding overflow list.
nsIFrame* parent = aChildFrame->GetParent();

View File

@ -229,7 +229,7 @@ struct RangePaintInfo {
// ----------------------------------------------------------------------
#ifdef NS_DEBUG
#ifdef DEBUG
// Set the environment variable GECKO_VERIFY_REFLOW_FLAGS to one or
// more of the following flags (comma separated) for handy debug
// output.
@ -511,7 +511,7 @@ bool PresShell::sDisableNonTestMouseEvents = false;
PRLogModuleInfo* PresShell::gLog;
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
static void
VerifyStyleTree(nsPresContext* aPresContext, nsFrameManager* aFrameManager)
{
@ -530,7 +530,7 @@ static bool gVerifyReflowEnabled;
bool
nsIPresShell::GetVerifyReflowEnable()
{
#ifdef NS_DEBUG
#ifdef DEBUG
static bool firstTime = true;
if (firstTime) {
firstTime = false;
@ -1143,7 +1143,7 @@ nsresult PresShell::ClearPreferenceStyleRules(void)
if (mStyleSet) {
// remove the sheet from the styleset:
// - note that we have to check for success by comparing the count before and after...
#ifdef NS_DEBUG
#ifdef DEBUG
PRInt32 numBefore = mStyleSet->SheetCount(nsStyleSet::eUserSheet);
NS_ASSERTION(numBefore > 0, "no user stylesheets in styleset, but we have one!");
#endif
@ -1593,7 +1593,7 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
nsCOMPtr<nsIPresShell> kungFuDeathGrip(this);
mDidInitialReflow = true;
#ifdef NS_DEBUG
#ifdef DEBUG
if (VERIFY_REFLOW_NOISY_RC & gVerifyReflowFlags) {
if (mDocument) {
nsIURI *uri = mDocument->GetDocumentURI();
@ -1946,7 +1946,7 @@ PresShell::NotifyDestroyingFrame(nsIFrame* aFrame)
mCurrentEventFrame = nsnull;
}
#ifdef NS_DEBUG
#ifdef DEBUG
if (aFrame == mDrawEventTargetFrame) {
mDrawEventTargetFrame = nsnull;
}
@ -6023,7 +6023,7 @@ PresShell::HandleEvent(nsIFrame *aFrame,
rv = HandleEventInternal(aEvent, aEventStatus);
}
#ifdef NS_DEBUG
#ifdef DEBUG
ShowEventTargetDebug();
#endif
PopCurrentEventInfo();
@ -6075,7 +6075,7 @@ PresShell::GetTouchEventTargetDocument()
}
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
void
PresShell::ShowEventTargetDebug()
{
@ -6139,7 +6139,7 @@ PresShell::HandlePositionedEvent(nsIFrame* aTargetFrame,
rv = HandleEventInternal(aEvent, aEventStatus);
}
#ifdef NS_DEBUG
#ifdef DEBUG
ShowEventTargetDebug();
#endif
PopCurrentEventInfo();
@ -7754,7 +7754,7 @@ nsIPresShell::RemoveRefreshObserverExternal(nsARefreshObserver* aObserver,
// Start of DEBUG only code
#ifdef NS_DEBUG
#ifdef DEBUG
#include "nsIURL.h"
#include "nsILinkHandler.h"

View File

@ -431,7 +431,7 @@ protected:
friend class nsPresShellEventCB;
bool mCaretEnabled;
#ifdef NS_DEBUG
#ifdef DEBUG
nsStyleSet* CloneStyleSet(nsStyleSet* aSet);
bool VerifyIncrementalReflow();
bool mInVerifyReflow;

View File

@ -371,7 +371,7 @@ Shutdown()
nsLayoutStatics::Release();
}
#ifdef NS_DEBUG
#ifdef DEBUG
nsresult NS_NewFrameUtil(nsIFrameUtil** aResult);
nsresult NS_NewLayoutDebugger(nsILayoutDebugger** aResult);
#endif

View File

@ -946,7 +946,7 @@ nsComboboxControlFrame::GetType() const
return nsGkAtoms::comboboxControlFrame;
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsComboboxControlFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -101,7 +101,7 @@ public:
return do_QueryFrame(mDropdownFrame);
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
virtual void DestroyFrom(nsIFrame* aDestructRoot);

View File

@ -555,7 +555,7 @@ nsFileControlFrame::IsLeaf() const
return true;
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsFileControlFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -43,7 +43,7 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -83,7 +83,7 @@ PRInt32 nsLegendFrame::GetAlign()
return intValue;
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsLegendFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -25,7 +25,7 @@ public:
virtual nsIAtom* GetType() const;
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -29,7 +29,7 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const {
return MakeFrameName(NS_LITERAL_STRING("Meter"), aResult);
}

View File

@ -34,7 +34,7 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const {
return MakeFrameName(NS_LITERAL_STRING("Progress"), aResult);
}

View File

@ -77,7 +77,7 @@ public:
virtual already_AddRefed<Accessible> CreateAccessible();
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const
{
aResult.AssignLiteral("nsTextControlFrame");

View File

@ -27,7 +27,7 @@ nsAbsoluteContainingBlock::SetInitialChildList(nsIFrame* aDelegatingFrame,
nsFrameList& aChildList)
{
NS_PRECONDITION(GetChildListID() == aListID, "unexpected child list name");
#ifdef NS_DEBUG
#ifdef DEBUG
nsFrame::VerifyDirtyBitSet(aChildList);
#endif
mAbsoluteFrames.SetFrames(aChildList);
@ -42,7 +42,7 @@ nsAbsoluteContainingBlock::AppendFrames(nsIFrame* aDelegatingFrame,
NS_ASSERTION(GetChildListID() == aListID, "unexpected child list");
// Append the frames to our list of absolutely positioned frames
#ifdef NS_DEBUG
#ifdef DEBUG
nsFrame::VerifyDirtyBitSet(aFrameList);
#endif
mAbsoluteFrames.AppendFrames(nsnull, aFrameList);
@ -66,7 +66,7 @@ nsAbsoluteContainingBlock::InsertFrames(nsIFrame* aDelegatingFrame,
NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == aDelegatingFrame,
"inserting after sibling frame with different parent");
#ifdef NS_DEBUG
#ifdef DEBUG
nsFrame::VerifyDirtyBitSet(aFrameList);
#endif
mAbsoluteFrames.InsertFrames(nsnull, aPrevFrame, aFrameList);

View File

@ -781,7 +781,7 @@ protected:
// Remove and return the pushed floats list.
nsFrameList* RemovePushedFloats();
#ifdef NS_DEBUG
#ifdef DEBUG
void VerifyLines(bool aFinalCheckOK);
void VerifyOverflowSituation();
PRInt32 GetDepth() const;

View File

@ -22,7 +22,7 @@
#include "nsCOMPtr.h"
#include "nsLayoutUtils.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#undef NOISY_MAX_ELEMENT_SIZE
#undef REALLY_NOISY_MAX_ELEMENT_SIZE
#undef NOISY_VERTICAL_MARGINS

View File

@ -63,7 +63,7 @@ nsBulletFrame::DestroyFrom(nsIFrame* aDestructRoot)
nsFrame::DestroyFrom(aDestructRoot);
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsBulletFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -67,7 +67,7 @@ public:
const nsDisplayListSet& aLists);
virtual nsIAtom* GetType() const;
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -116,7 +116,7 @@ nsCanvasFrame::AppendFrames(ChildListID aListID,
// Insert the new frames
NS_ASSERTION(aFrameList.FirstChild() == aFrameList.LastChild(),
"Only one principal child frame allowed");
#ifdef NS_DEBUG
#ifdef DEBUG
nsFrame::VerifyDirtyBitSet(aFrameList);
#endif
mFrames.AppendFrames(nsnull, aFrameList);

View File

@ -37,7 +37,7 @@
#include "nsCSSFrameConstructor.h"
#include "mozilla/dom/Element.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#undef NOISY
#else
#undef NOISY
@ -87,7 +87,7 @@ nsContainerFrame::SetInitialChildList(ChildListID aListID,
NS_NOTREACHED("unknown frame list");
result = NS_ERROR_INVALID_ARG;
} else {
#ifdef NS_DEBUG
#ifdef DEBUG
nsFrame::VerifyDirtyBitSet(aChildList);
#endif
mFrames.SetFrames(aChildList);
@ -1715,7 +1715,7 @@ nsOverflowContinuationTracker::Finish(nsIFrame* aChild)
/////////////////////////////////////////////////////////////////////////////
// Debugging
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsContainerFrame::List(FILE* out, PRInt32 aIndent) const
{

View File

@ -32,7 +32,7 @@ NS_QUERYFRAME_HEAD(nsFirstLetterFrame)
NS_QUERYFRAME_ENTRY(nsFirstLetterFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsFirstLetterFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -27,7 +27,7 @@ public:
nsIFrame* aPrevInFlow);
NS_IMETHOD SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
virtual nsIAtom* GetType() const;

View File

@ -140,7 +140,7 @@ static void RefreshContentFrames(nsPresContext* aPresContext, nsIContent * aStar
// Formerly the nsIFrameDebug interface
#ifdef NS_DEBUG
#ifdef DEBUG
static bool gShowFrameBorders = false;
void nsFrame::ShowFrameBorders(bool aEnable)
@ -1607,7 +1607,7 @@ BuildDisplayListWithOverflowClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFram
return aFrame->OverflowClip(aBuilder, set, aSet, aClipRect, aClipRadii);
}
#ifdef NS_DEBUG
#ifdef DEBUG
static void PaintDebugBorder(nsIFrame* aFrame, nsRenderingContext* aCtx,
const nsRect& aDirtyRect, nsPoint aPt) {
nsRect r(aPt, aFrame->GetSize());
@ -1873,7 +1873,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
// The element's outline items need to all come before any child outline
// items.
set.Outlines()->SortByContentOrder(aBuilder, GetContent());
#ifdef NS_DEBUG
#ifdef DEBUG
DisplayDebugBorders(aBuilder, this, set);
#endif
resultList.AppendToTop(set.Outlines());
@ -2101,7 +2101,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
rv = aBuilder->DisplayCaret(child, dirty, aLists.Content());
}
}
#ifdef NS_DEBUG
#ifdef DEBUG
DisplayDebugBorders(aBuilder, child, aLists);
#endif
return rv;
@ -2157,7 +2157,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
list.AppendToTop(pseudoStack.Content());
list.AppendToTop(pseudoStack.Outlines());
extraPositionedDescendants.AppendToTop(pseudoStack.PositionedDescendants());
#ifdef NS_DEBUG
#ifdef DEBUG
DisplayDebugBorders(aBuilder, child, aLists);
#endif
}
@ -5208,7 +5208,7 @@ nsIFrame::GetContainingBlock() const
return GetNearestBlockContainer(GetParent());
}
#ifdef NS_DEBUG
#ifdef DEBUG
PRInt32 nsFrame::ContentIndexInContainer(const nsIFrame* aFrame)
{
@ -5460,7 +5460,7 @@ nsIFrame::GetConstFrameSelection() const
return PresContext()->PresShell()->ConstFrameSelection();
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsFrame::DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
{
@ -8035,7 +8035,7 @@ nsFrame::GetBoxName(nsAutoString& aName)
}
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
static void
GetTagName(nsFrame* aFrame, nsIContent* aContent, PRIntn aResultSize,
char* aResult)

View File

@ -32,7 +32,7 @@
#define NS_FRAME_LOG_TEST(_lm,_bit) (PRIntn((_lm)->level) & (_bit))
#ifdef NS_DEBUG
#ifdef DEBUG
#define NS_FRAME_LOG(_bit,_args) \
PR_BEGIN_MACRO \
if (NS_FRAME_LOG_TEST(nsFrame::GetLogModuleInfo(),_bit)) { \
@ -44,7 +44,7 @@
#endif
// XXX Need to rework this so that logging is free when it's off
#ifdef NS_DEBUG
#ifdef DEBUG
#define NS_FRAME_TRACE_IN(_method) Trace(_method, true)
#define NS_FRAME_TRACE_OUT(_method) Trace(_method, false)
@ -390,7 +390,7 @@ public:
virtual const void* GetStyleDataExternal(nsStyleStructID aSID) const;
#ifdef NS_DEBUG
#ifdef DEBUG
/**
* Tracing method that writes a method enter/exit routine to the
* nspr log using the nsIFrame log module. The tracing is only
@ -629,7 +629,7 @@ private:
virtual nsILineIterator* GetLineIterator();
#ifdef NS_DEBUG
#ifdef DEBUG
public:
// Formerly the nsIFrameDebug interface

View File

@ -13,7 +13,7 @@
#include "plstr.h"
#ifdef NS_DEBUG
#ifdef DEBUG
class nsFrameUtil : public nsIFrameUtil {
public:
nsFrameUtil();

View File

@ -930,7 +930,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
////////////////////////////////////////////////////////////////////////////////
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLScrollFrame::GetFrameName(nsAString& aResult) const
{
@ -1249,7 +1249,7 @@ nsXULScrollFrame::GetMaxSize(nsBoxLayoutState& aState)
return maxSize;
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsXULScrollFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -525,7 +525,7 @@ public:
*/
virtual nsIAtom* GetType() const;
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
@ -778,7 +778,7 @@ public:
return nsBoxFrame::IsFrameOfType(aFlags);
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -26,7 +26,7 @@
#include "nsBidiUtils.h"
#include "nsFontInflationData.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#undef NOISY_VERTICAL_ALIGN
#else
#undef NOISY_VERTICAL_ALIGN

View File

@ -2992,7 +2992,7 @@ private:
bool SetOverflowAreas(const nsOverflowAreas& aOverflowAreas);
nsPoint GetOffsetToCrossDoc(const nsIFrame* aOther, const PRInt32 aAPD) const;
#ifdef NS_DEBUG
#ifdef DEBUG
public:
// Formerly nsIFrameDebug
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const = 0;

View File

@ -1171,7 +1171,7 @@ static void PaintAltFeedback(nsIFrame* aFrame, nsRenderingContext* aCtx,
aPt);
}
#ifdef NS_DEBUG
#ifdef DEBUG
static void PaintDebugImageMap(nsIFrame* aFrame, nsRenderingContext* aCtx,
const nsRect& aDirtyRect, nsPoint aPt) {
nsImageFrame* f = static_cast<nsImageFrame*>(aFrame);

View File

@ -632,7 +632,7 @@ class nsLineList_iterator {
typedef nsLineLink link_type;
#ifdef NS_DEBUG
#ifdef DEBUG
nsLineList_iterator() { memset(&mCurrent, 0xcd, sizeof(mCurrent)); }
#else
// Auto generated default constructor OK.
@ -791,7 +791,7 @@ class nsLineList_reverse_iterator {
typedef nsLineLink link_type;
#ifdef NS_DEBUG
#ifdef DEBUG
nsLineList_reverse_iterator() { memset(&mCurrent, 0xcd, sizeof(mCurrent)); }
#else
// Auto generated default constructor OK.

View File

@ -48,7 +48,7 @@ public:
*/
virtual nsIAtom* GetType() const;
#ifdef NS_DEBUG
#ifdef DEBUG
// Debugging
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -34,7 +34,7 @@ public:
*/
virtual nsIAtom* GetType() const;
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
@ -112,7 +112,7 @@ class nsPageBreakFrame : public nsLeafFrame
virtual nsIAtom* GetType() const;
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -94,7 +94,7 @@ public:
*/
virtual nsIAtom* GetType() const;
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -75,7 +75,7 @@
#include "sampler.h"
#ifdef NS_DEBUG
#ifdef DEBUG
#undef NOISY_BLINK
#undef NOISY_REFLOW
#undef NOISY_TRIM

View File

@ -49,7 +49,7 @@ ViewportFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList)
{
// See which child list to add the frames to
#ifdef NS_DEBUG
#ifdef DEBUG
nsFrame::VerifyDirtyBitSet(aChildList);
#endif
return nsContainerFrame::SetInitialChildList(aListID, aChildList);

View File

@ -228,7 +228,7 @@ nsGlyphTable::ElementAt(nsPresContext* aPresContext, nsMathMLChar* aChar, PRUint
// Load glyph properties if this is the first time we have been here
if (mState == NS_TABLE_STATE_EMPTY) {
nsresult rv = LoadProperties(mFontName[0], mGlyphProperties);
#ifdef NS_DEBUG
#ifdef DEBUG
nsCAutoString uriStr;
uriStr.AssignLiteral("resource://gre/res/fonts/mathfont");
LossyAppendUTF16toASCII(mFontName[0], uriStr);
@ -1906,7 +1906,7 @@ private:
bool mIsSelected;
};
#ifdef NS_DEBUG
#ifdef DEBUG
class nsDisplayMathMLCharDebug : public nsDisplayItem {
public:
nsDisplayMathMLCharDebug(nsDisplayListBuilder* aBuilder,
@ -1984,7 +1984,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
//else
// our container frame will take care of painting its background
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
// for visual debug
rv = aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayMathMLCharDebug(aBuilder, aForFrame, mRect));

View File

@ -520,7 +520,7 @@ nsMathMLContainerFrame::FinalizeReflow(nsRenderingContext& aRenderingContext,
}
Stretch(aRenderingContext, NS_STRETCH_DIRECTION_DEFAULT, defaultSize,
aDesiredSize);
#ifdef NS_DEBUG
#ifdef DEBUG
{
// The Place() call above didn't request FinishReflowChild(),
// so let's check that we eventually did through Stretch().
@ -639,7 +639,7 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DISPLAY_CHILD_INLINE);
NS_ENSURE_SUCCESS(rv, rv);
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
// for visual debug
// ----------------
// if you want to see your bounding box, make sure to properly fill

View File

@ -110,7 +110,7 @@ nsMathMLFrame::InheritAutomaticData(nsIFrame* aParent)
mPresentationData.flags |= NS_MATHML_RTL;
}
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
mPresentationData.flags |= NS_MATHML_SHOW_BOUNDING_METRICS;
#endif
@ -390,7 +390,7 @@ nsCSSMapping {
const char* cssProperty;
};
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
class nsDisplayMathMLBoundingMetrics : public nsDisplayItem {
public:
nsDisplayMathMLBoundingMetrics(nsDisplayListBuilder* aBuilder,

View File

@ -351,7 +351,7 @@ public:
nscoord& aAxisHeight);
protected:
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
nsresult DisplayBoundingMetrics(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsPoint& aPt,
const nsBoundingMetrics& aMetrics,

View File

@ -187,7 +187,7 @@ SetOperator(OperatorData* aOperatorData,
nsStringKey key(value);
gOperatorTable->Put(&key, aOperatorData);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_LossyConvertUTF16toASCII str(aAttributes);
#endif
// Loop over the space-delimited list of attributes to get the name:value pairs

View File

@ -295,7 +295,7 @@ nsMathMLmactionFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
NS_ENSURE_SUCCESS(rv, rv);
}
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
// visual debug
rv = DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
#endif

View File

@ -106,7 +106,7 @@ nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
rv = mMathMLChar.Display(aBuilder, this, aLists, 0, isSelected ? &selectedRect : nsnull);
NS_ENSURE_SUCCESS(rv, rv);
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
// for visual debug
rv = DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
#endif

View File

@ -174,7 +174,7 @@ nsMathMLmpaddedFrame::ParseAttribute(nsString& aString,
// floatValue = 1, to cater for cases such as width="height", but that wouldn't
// be in line with the spec which requires an explicit number
if (number.IsEmpty()) {
#ifdef NS_DEBUG
#ifdef DEBUG
printf("mpadded: attribute with bad numeric value: %s\n",
NS_LossyConvertUTF16toASCII(aString).get());
#endif
@ -249,7 +249,7 @@ nsMathMLmpaddedFrame::ParseAttribute(nsString& aString,
}
#ifdef NS_DEBUG
#ifdef DEBUG
printf("mpadded: attribute with bad numeric value: %s\n",
NS_LossyConvertUTF16toASCII(aString).get());
#endif

View File

@ -104,7 +104,7 @@ nsMathMLmrootFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
rv = DisplayBar(aBuilder, this, mBarRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
// for visual debug
nsRect rect;
mSqrChar.GetRect(rect);

View File

@ -129,7 +129,7 @@ GetValueAt(nsIFrame* aTableOrRowFrame,
: valueList->mArray[count-1];
}
#ifdef NS_DEBUG
#ifdef DEBUG
static bool
IsTable(PRUint8 aDisplay)
{

View File

@ -138,7 +138,7 @@ using namespace mozilla::dom;
#ifdef PR_LOGGING
#ifdef NS_DEBUG
#ifdef DEBUG
// PR_LOGGING is force to always be on (even in release builds)
// but we only want some of it on,
//#define EXTENDED_DEBUG_PRINTING
@ -549,7 +549,7 @@ nsPrintEngine::DoCommonPrint(bool aIsPrintPreview,
nsScriptSuppressor scriptSuppressor(this);
if (!aIsPrintPreview) {
#ifdef NS_DEBUG
#ifdef DEBUG
mPrt->mDebugFilePtr = mDebugFile;
#endif
@ -2222,7 +2222,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO)
// mPrt->mDebugFilePtr this is onlu non-null when compiled for debugging
if (nsnull != mPrt->mDebugFilePtr) {
#ifdef NS_DEBUG
#ifdef DEBUG
// output the regression test
nsIFrame* root = poPresShell->FrameManager()->GetRootFrame();
root->DumpRegressionData(poPresContext, mPrt->mDebugFilePtr, 0);

View File

@ -698,7 +698,7 @@ nsTableCellMap::GetNumCellsOriginatingInCol(PRInt32 aColIndex) const
}
}
#ifdef NS_DEBUG
#ifdef DEBUG
void
nsTableCellMap::Dump(char* aString) const
{
@ -2526,7 +2526,7 @@ void nsCellMap::ExpandZeroColSpans(nsTableCellMap& aMap)
}
}
}
#ifdef NS_DEBUG
#ifdef DEBUG
void nsCellMap::Dump(bool aIsBorderCollapse) const
{
printf("\n ***** START GROUP CELL MAP DUMP ***** %p\n", (void*)this);

View File

@ -224,7 +224,7 @@ public:
bool aIsBottomRight = false);
/** dump a representation of the cell map to stdout for debugging */
#ifdef NS_DEBUG
#ifdef DEBUG
void Dump(char* aString = nsnull) const;
#endif
@ -436,7 +436,7 @@ public:
typedef nsTArray<CellData*> CellDataArray;
/** dump a representation of the cell map to stdout for debugging */
#ifdef NS_DEBUG
#ifdef DEBUG
void Dump(bool aIsBorderCollapse) const;
#endif

View File

@ -889,7 +889,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsPresContext* aPresContext,
InvalidateFrameSubtree();
}
#ifdef NS_DEBUG
#ifdef DEBUG
DebugCheckChildSize(firstKid, kidSize, availSize);
#endif

View File

@ -129,7 +129,7 @@ nsTableCaptionFrame::CreateAccessible()
}
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsTableCaptionFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -31,7 +31,7 @@ public:
virtual already_AddRefed<Accessible> CreateAccessible();
#endif
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -27,7 +27,7 @@ class nsGridRowGroupFrame : public nsBoxFrame
public:
NS_DECL_FRAMEARENA_HELPERS
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const
{
return MakeFrameName(NS_LITERAL_STRING("nsGridRowGroup"), aResult);

View File

@ -31,7 +31,7 @@ public:
friend nsIFrame* NS_NewGridRowLeafFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const
{
return MakeFrameName(NS_LITERAL_STRING("nsGridRowLeaf"), aResult);

View File

@ -46,7 +46,7 @@ public:
virtual nsIAtom* GetType() const;
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const
{
return MakeFrameName(NS_LITERAL_STRING("Deck"), aResult);

View File

@ -140,7 +140,7 @@ nsProgressMeterFrame::AttributeChanged(PRInt32 aNameSpaceID,
return NS_OK;
}
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsProgressMeterFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -32,7 +32,7 @@ public:
nsIAtom* aAttribute,
PRInt32 aModType);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif

View File

@ -24,7 +24,7 @@ public:
friend nsIFrame* NS_NewStackFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const
{
return MakeFrameName(NS_LITERAL_STRING("Stack"), aResult);

View File

@ -108,7 +108,7 @@ nsXULLabelFrame::GetType() const
/////////////////////////////////////////////////////////////////////////////
// Diagnostics
#ifdef NS_DEBUG
#ifdef DEBUG
NS_IMETHODIMP
nsXULLabelFrame::GetFrameName(nsAString& aResult) const
{

View File

@ -456,7 +456,7 @@ void nsDTDContext::Push(nsCParserNode* aNode,
nsEntryStack* aStyleStack,
bool aRefCntNode) {
if(aNode) {
#ifdef NS_DEBUG
#ifdef DEBUG
eHTMLTags theTag = (eHTMLTags)aNode->GetNodeType();
int size = mStack.mCount;
if (size < eMaxTags)
@ -468,7 +468,7 @@ void nsDTDContext::Push(nsCParserNode* aNode,
void nsDTDContext::PushTag(eHTMLTags aTag)
{
#ifdef NS_DEBUG
#ifdef DEBUG
if (mStack.mCount < eMaxTags) {
mXTags[mStack.mCount] = aTag;
}
@ -482,7 +482,7 @@ nsDTDContext::PopEntry()
{
PRInt32 theSize = mStack.mCount;
if(0<theSize) {
#ifdef NS_DEBUG
#ifdef DEBUG
if (theSize <= eMaxTags)
mXTags[theSize-1]=eHTMLTag_unknown;
#endif
@ -494,7 +494,7 @@ nsDTDContext::PopEntry()
void nsDTDContext::PushEntry(nsTagEntry* aEntry,
bool aRefCntNode)
{
#ifdef NS_DEBUG
#ifdef DEBUG
int size=mStack.mCount;
if(size< eMaxTags && aEntry)
mXTags[size]=aEntry->mTag;
@ -514,7 +514,7 @@ nsDTDContext::MoveEntries(nsDTDContext& aDest,
if (aCount > 0 && mStack.mCount >= aCount) {
while (aCount) {
aDest.PushEntry(&mStack.mEntries[--mStack.mCount], false);
#ifdef NS_DEBUG
#ifdef DEBUG
if (mStack.mCount < eMaxTags) {
mXTags[mStack.mCount] = eHTMLTag_unknown;
}
@ -535,7 +535,7 @@ nsCParserNode* nsDTDContext::Pop(nsEntryStack *&aChildStyleStack) {
if(0<theSize) {
#ifdef NS_DEBUG
#ifdef DEBUG
if ((theSize>0) && (theSize <= eMaxTags))
mXTags[theSize-1]=eHTMLTag_unknown;
#endif
@ -774,7 +774,7 @@ nsTokenAllocator::nsTokenAllocator() {
mArenaPool.Init("TokenPool", kTokenBuckets, kNumTokenBuckets, kInitialTokenPoolSize);
#ifdef NS_DEBUG
#ifdef DEBUG
int i=0;
for(i=0;i<eToken_last-1;++i) {
mTotals[i]=0;
@ -819,7 +819,7 @@ CToken* nsTokenAllocator::CreateTokenOfType(eHTMLTokenTypes aType,eHTMLTags aTag
CToken* result=0;
#ifdef NS_DEBUG
#ifdef DEBUG
mTotals[aType-1]++;
#endif
switch(aType){
@ -856,7 +856,7 @@ CToken* nsTokenAllocator::CreateTokenOfType(eHTMLTokenTypes aType,eHTMLTags aTag
CToken* result=0;
#ifdef NS_DEBUG
#ifdef DEBUG
mTotals[aType-1]++;
#endif
switch(aType){

View File

@ -226,7 +226,7 @@ public:
protected:
nsFixedSizeAllocator mArenaPool;
#ifdef NS_DEBUG
#ifdef DEBUG
int mTotals[eToken_last-1];
#endif
};
@ -314,7 +314,7 @@ public:
nsTokenAllocator *mTokenAllocator;
nsNodeAllocator *mNodeAllocator;
#ifdef NS_DEBUG
#ifdef DEBUG
enum { eMaxTags = MAX_REFLOW_DEPTH };
eHTMLTags mXTags[eMaxTags];
#endif

View File

@ -1374,7 +1374,7 @@ const nsHTMLElement gHTMLElements[] = {
}
};
#ifdef NS_DEBUG
#ifdef DEBUG
void CheckElementTable() {
for (eHTMLTags t = eHTMLTag_unknown; t <= eHTMLTag_userdefined; t = eHTMLTags(t + 1)) {
NS_ASSERTION(gHTMLElements[t].mTagID == t, "gHTMLElements entries does match tag list.");

View File

@ -60,7 +60,7 @@ static const int kAllTags = 0xffffff;
//*********************************************************************************************
#ifdef NS_DEBUG
#ifdef DEBUG
extern void CheckElementTable();
#endif

View File

@ -206,7 +206,7 @@ nsHTMLEntities::UnicodeToEntity(PRInt32 aUnicode)
return entry->node->mStr;
}
#ifdef NS_DEBUG
#ifdef DEBUG
#include <stdio.h>
class nsTestEntityTable {

Some files were not shown because too many files have changed in this diff Show More