From 8941c86fdd18a1fd096cce86bec31a3b441091d6 Mon Sep 17 00:00:00 2001 From: Jed Davis Date: Mon, 12 May 2014 18:35:00 -0400 Subject: [PATCH] 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. --- dom/base/nsGlobalWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index d935ac1a910..59022a505df 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -1712,7 +1712,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGlobalWindow) if (tmp->mDoc && tmp->mDoc->GetDocumentURI()) { 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", uri.get()); cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name);