Bug 943982 - Build content/xul in unified mode; r=bzbarsky

This commit is contained in:
Ehsan Akhgari 2013-11-27 18:13:11 -05:00
parent 423fa36269
commit b354a123b3
4 changed files with 25 additions and 25 deletions

View File

@ -7,7 +7,7 @@
if CONFIG['MOZ_XUL']:
MSVC_ENABLE_PGO = True
SOURCES += [
UNIFIED_SOURCES += [
'nsXULContextMenuBuilder.cpp',
'nsXULElement.cpp',
'nsXULPopupListener.cpp',

View File

@ -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',

View File

@ -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()));

View File

@ -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(),