Bug 882616 - Fix build warnings in docshell/base; r=bz

This commit is contained in:
Ms2ger
2013-06-23 09:15:05 +02:00
parent dd4a6f07d4
commit 6f6c0983a6
3 changed files with 14 additions and 8 deletions

View File

@@ -37,21 +37,25 @@ public:
LoadContext(const IPC::SerializedLoadContext& aToCopy, LoadContext(const IPC::SerializedLoadContext& aToCopy,
nsIDOMElement* aTopFrameElement, nsIDOMElement* aTopFrameElement,
uint32_t aAppId, bool aInBrowser) uint32_t aAppId, bool aInBrowser)
: mIsNotNull(aToCopy.mIsNotNull) : mTopFrameElement(do_GetWeakReference(aTopFrameElement))
, mAppId(aAppId)
, mIsContent(aToCopy.mIsContent) , mIsContent(aToCopy.mIsContent)
, mUsePrivateBrowsing(aToCopy.mUsePrivateBrowsing) , mUsePrivateBrowsing(aToCopy.mUsePrivateBrowsing)
, mIsInBrowserElement(aInBrowser) , mIsInBrowserElement(aInBrowser)
, mAppId(aAppId) #ifdef DEBUG
, mTopFrameElement(do_GetWeakReference(aTopFrameElement)) , mIsNotNull(aToCopy.mIsNotNull)
#endif
{} {}
private: private:
bool mIsNotNull; nsWeakPtr mTopFrameElement;
uint32_t mAppId;
bool mIsContent; bool mIsContent;
bool mUsePrivateBrowsing; bool mUsePrivateBrowsing;
bool mIsInBrowserElement; bool mIsInBrowserElement;
uint32_t mAppId; #ifdef DEBUG
nsWeakPtr mTopFrameElement; bool mIsNotNull;
#endif
}; };
} // namespace mozilla } // namespace mozilla

View File

@@ -10,6 +10,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
FAIL_ON_WARNINGS := 1
LIBRARY_NAME = basedocshell_s LIBRARY_NAME = basedocshell_s
MSVC_ENABLE_PGO := 1 MSVC_ENABLE_PGO := 1
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1

View File

@@ -10,6 +10,7 @@
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "mozilla/AutoRestore.h" #include "mozilla/AutoRestore.h"
#include "mozilla/Casting.h"
#include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/Element.h" #include "mozilla/dom/Element.h"
#include "mozilla/dom/TabChild.h" #include "mozilla/dom/TabChild.h"
@@ -809,7 +810,7 @@ nsDocShell::nsDocShell():
++gNumberOfDocShells; ++gNumberOfDocShells;
if (!PR_GetEnv("MOZ_QUIET")) { if (!PR_GetEnv("MOZ_QUIET")) {
printf("++DOCSHELL %p == %ld [id = %llu]\n", (void*) this, printf("++DOCSHELL %p == %ld [id = %llu]\n", (void*) this,
gNumberOfDocShells, mHistoryID); gNumberOfDocShells, SafeCast<unsigned long long>(mHistoryID));
} }
#endif #endif
} }
@@ -838,7 +839,7 @@ nsDocShell::~nsDocShell()
--gNumberOfDocShells; --gNumberOfDocShells;
if (!PR_GetEnv("MOZ_QUIET")) { if (!PR_GetEnv("MOZ_QUIET")) {
printf("--DOCSHELL %p == %ld [id = %llu]\n", (void*) this, printf("--DOCSHELL %p == %ld [id = %llu]\n", (void*) this,
gNumberOfDocShells, mHistoryID); gNumberOfDocShells, SafeCast<unsigned long long>(mHistoryID));
} }
#endif #endif
} }