From 4fcf99ad8281898fdd3e7cdca51bbadf18dbaf64 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Wed, 27 Nov 2013 18:13:11 -0500 Subject: [PATCH] Bug 943982 - Build content/xul in unified mode; r=bzbarsky --- content/xul/content/src/moz.build | 2 +- content/xul/document/src/moz.build | 4 ++-- .../document/src/nsXULCommandDispatcher.cpp | 22 +++++++++---------- content/xul/document/src/nsXULContentSink.cpp | 22 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/content/xul/content/src/moz.build b/content/xul/content/src/moz.build index f1717d75c78..71467e7762b 100644 --- a/content/xul/content/src/moz.build +++ b/content/xul/content/src/moz.build @@ -7,7 +7,7 @@ if CONFIG['MOZ_XUL']: MSVC_ENABLE_PGO = True - SOURCES += [ + UNIFIED_SOURCES += [ 'nsXULContextMenuBuilder.cpp', 'nsXULElement.cpp', 'nsXULPopupListener.cpp', diff --git a/content/xul/document/src/moz.build b/content/xul/document/src/moz.build index 4c1945575ea..0b877f4b9ec 100644 --- a/content/xul/document/src/moz.build +++ b/content/xul/document/src/moz.build @@ -4,12 +4,12 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'nsXULControllers.cpp', ] if CONFIG['MOZ_XUL']: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsXULCommandDispatcher.cpp', 'nsXULContentSink.cpp', 'nsXULPrototypeCache.cpp', diff --git a/content/xul/document/src/nsXULCommandDispatcher.cpp b/content/xul/document/src/nsXULCommandDispatcher.cpp index 9354370de2c..845ebed998f 100644 --- a/content/xul/document/src/nsXULCommandDispatcher.cpp +++ b/content/xul/document/src/nsXULCommandDispatcher.cpp @@ -38,7 +38,7 @@ using namespace mozilla; #ifdef PR_LOGGING -static PRLogModuleInfo* gLog; +static PRLogModuleInfo* gCommandLog; #endif //////////////////////////////////////////////////////////////////////// @@ -48,8 +48,8 @@ nsXULCommandDispatcher::nsXULCommandDispatcher(nsIDocument* aDocument) { #ifdef PR_LOGGING - if (! gLog) - gLog = PR_NewLogModule("nsXULCommandDispatcher"); + if (! gCommandLog) + gCommandLog = PR_NewLogModule("nsXULCommandDispatcher"); #endif } @@ -274,13 +274,13 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement, if (updater->mElement == aElement) { #ifdef DEBUG - if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) { + if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) { nsAutoCString eventsC, targetsC, aeventsC, atargetsC; eventsC.AssignWithConversion(updater->mEvents); targetsC.AssignWithConversion(updater->mTargets); CopyUTF16toUTF8(aEvents, aeventsC); CopyUTF16toUTF8(aTargets, atargetsC); - PR_LOG(gLog, PR_LOG_NOTICE, + PR_LOG(gCommandLog, PR_LOG_NOTICE, ("xulcmd[%p] replace %p(events=%s targets=%s) with (events=%s targets=%s)", this, aElement, eventsC.get(), @@ -302,12 +302,12 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement, updater = updater->mNext; } #ifdef DEBUG - if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) { + if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) { nsAutoCString aeventsC, atargetsC; CopyUTF16toUTF8(aEvents, aeventsC); CopyUTF16toUTF8(aTargets, atargetsC); - PR_LOG(gLog, PR_LOG_NOTICE, + PR_LOG(gCommandLog, PR_LOG_NOTICE, ("xulcmd[%p] add %p(events=%s targets=%s)", this, aElement, aeventsC.get(), @@ -337,11 +337,11 @@ nsXULCommandDispatcher::RemoveCommandUpdater(nsIDOMElement* aElement) while (updater) { if (updater->mElement == aElement) { #ifdef DEBUG - if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) { + if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) { nsAutoCString eventsC, targetsC; eventsC.AssignWithConversion(updater->mEvents); targetsC.AssignWithConversion(updater->mTargets); - PR_LOG(gLog, PR_LOG_NOTICE, + PR_LOG(gCommandLog, PR_LOG_NOTICE, ("xulcmd[%p] remove %p(events=%s targets=%s)", this, aElement, eventsC.get(), @@ -403,10 +403,10 @@ nsXULCommandDispatcher::UpdateCommands(const nsAString& aEventName) continue; #ifdef DEBUG - if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) { + if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) { nsAutoCString aeventnameC; CopyUTF16toUTF8(aEventName, aeventnameC); - PR_LOG(gLog, PR_LOG_NOTICE, + PR_LOG(gCommandLog, PR_LOG_NOTICE, ("xulcmd[%p] update %p event=%s", this, content, aeventnameC.get())); diff --git a/content/xul/document/src/nsXULContentSink.cpp b/content/xul/document/src/nsXULContentSink.cpp index 83fe0dccb55..adca134ff41 100644 --- a/content/xul/document/src/nsXULContentSink.cpp +++ b/content/xul/document/src/nsXULContentSink.cpp @@ -58,7 +58,7 @@ #include "nsContentTypeParser.h" #ifdef PR_LOGGING -static PRLogModuleInfo* gLog; +static PRLogModuleInfo* gContentSinkLog; #endif //---------------------------------------------------------------------- @@ -169,8 +169,8 @@ XULContentSinkImpl::XULContentSinkImpl() { #ifdef PR_LOGGING - if (! gLog) - gLog = PR_NewLogModule("nsXULContentSink"); + if (! gContentSinkLog) + gContentSinkLog = PR_NewLogModule("nsXULContentSink"); #endif } @@ -496,7 +496,7 @@ XULContentSinkImpl::HandleStartElement(const PRUnichar *aName, case eInEpilog: case eInScript: - PR_LOG(gLog, PR_LOG_WARNING, + PR_LOG(gContentSinkLog, PR_LOG_WARNING, ("xul: warning: unexpected tags in epilog at line %d", aLineNumber)); rv = NS_ERROR_UNEXPECTED; // XXX @@ -759,7 +759,7 @@ XULContentSinkImpl::OpenRoot(const PRUnichar** aAttributes, if (aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XHTML) || aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XUL)) { - PR_LOG(gLog, PR_LOG_ERROR, + PR_LOG(gContentSinkLog, PR_LOG_ERROR, ("xul: script tag not allowed as root content element")); return NS_ERROR_UNEXPECTED; @@ -771,10 +771,10 @@ XULContentSinkImpl::OpenRoot(const PRUnichar** aAttributes, if (NS_FAILED(rv)) { #ifdef PR_LOGGING - if (PR_LOG_TEST(gLog, PR_LOG_ERROR)) { + if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) { nsAutoString anodeC; aNodeInfo->GetName(anodeC); - PR_LOG(gLog, PR_LOG_ERROR, + PR_LOG(gContentSinkLog, PR_LOG_ERROR, ("xul: unable to create element '%s' at line %d", NS_ConvertUTF16toUTF8(anodeC).get(), -1)); // XXX pass in line number @@ -814,10 +814,10 @@ XULContentSinkImpl::OpenTag(const PRUnichar** aAttributes, if (NS_FAILED(rv)) { #ifdef PR_LOGGING - if (PR_LOG_TEST(gLog, PR_LOG_ERROR)) { + if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) { nsAutoString anodeC; aNodeInfo->GetName(anodeC); - PR_LOG(gLog, PR_LOG_ERROR, + PR_LOG(gContentSinkLog, PR_LOG_ERROR, ("xul: unable to create element '%s' at line %d", NS_ConvertUTF16toUTF8(anodeC).get(), aLineNumber)); @@ -1034,7 +1034,7 @@ XULContentSinkImpl::AddAttributes(const PRUnichar** aAttributes, NS_ENSURE_SUCCESS(rv, rv); #ifdef PR_LOGGING - if (PR_LOG_TEST(gLog, PR_LOG_DEBUG)) { + if (PR_LOG_TEST(gContentSinkLog, PR_LOG_DEBUG)) { nsAutoString extraWhiteSpace; int32_t cnt = mContextStack.Depth(); while (--cnt >= 0) @@ -1042,7 +1042,7 @@ XULContentSinkImpl::AddAttributes(const PRUnichar** aAttributes, nsAutoString qnameC,valueC; qnameC.Assign(aAttributes[0]); valueC.Assign(aAttributes[1]); - PR_LOG(gLog, PR_LOG_DEBUG, + PR_LOG(gContentSinkLog, PR_LOG_DEBUG, ("xul: %.5d. %s %s=%s", -1, // XXX pass in line number NS_ConvertUTF16toUTF8(extraWhiteSpace).get(),