Bug 1009289 - Fix printf type mixup in nsGlobalWindow CC logging. r=mccr8

mWindowID is uint64_t; PR_snprintf's interpretation of %ld is int32_t.
Currently this results in a crash on ARM, and probably fails to print
the window URI on 32-bit x86.  Additionally, on ARM, this was probably
printing garbage instead of the window ID since it was added in 2012.
This commit is contained in:
Jed Davis 2014-05-12 18:35:00 -04:00
parent 1c835df31a
commit 8941c86fdd

View File

@ -1712,7 +1712,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGlobalWindow)
if (tmp->mDoc && tmp->mDoc->GetDocumentURI()) { if (tmp->mDoc && tmp->mDoc->GetDocumentURI()) {
tmp->mDoc->GetDocumentURI()->GetSpec(uri); tmp->mDoc->GetDocumentURI()->GetSpec(uri);
} }
PR_snprintf(name, sizeof(name), "nsGlobalWindow #%ld %s %s", PR_snprintf(name, sizeof(name), "nsGlobalWindow #%llu %s %s",
tmp->mWindowID, tmp->IsInnerWindow() ? "inner" : "outer", tmp->mWindowID, tmp->IsInnerWindow() ? "inner" : "outer",
uri.get()); uri.get());
cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name); cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name);