--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -8,17 +8,16 @@
#include <algorithm>
#include <stdarg.h>
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/Preferences.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "mozilla/UseCounter.h"
#include "AccessCheck.h"
#include "jsfriendapi.h"
#include "nsContentCreatorFunctions.h"
#include "nsContentUtils.h"
#include "nsGlobalWindow.h"
@@ -2737,17 +2736,17 @@ ConvertJSValueToByteString(JSContext* cx
if (foundBadChar) {
MOZ_ASSERT(badCharIndex < length);
MOZ_ASSERT(badChar > 255);
// The largest unsigned 64 bit number (18,446,744,073,709,551,615) has
// 20 digits, plus one more for the null terminator.
char index[21];
static_assert(sizeof(size_t) <= 8, "index array too small");
- SprintfLiteral(index, "%" PRIuSIZE, badCharIndex);
+ SprintfLiteral(index, "%zu", badCharIndex);
// A char16_t is 16 bits long. The biggest unsigned 16 bit
// number (65,535) has 5 digits, plus one more for the null
// terminator.
char badCharArray[6];
static_assert(sizeof(char16_t) <= 2, "badCharArray too small");
SprintfLiteral(badCharArray, "%d", badChar);
ThrowErrorMessage(cx, MSG_INVALID_BYTESTRING, index, badCharArray);
return false;
--- a/dom/canvas/WebGL2ContextMRTs.cpp
+++ b/dom/canvas/WebGL2ContextMRTs.cpp
@@ -2,17 +2,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "WebGL2Context.h"
#include "GLContext.h"
#include "WebGLFramebuffer.h"
-#include "mozilla/SizePrintfMacros.h"
namespace mozilla {
bool
WebGL2Context::ValidateClearBuffer(const char* funcName, GLenum buffer, GLint drawBuffer,
size_t availElemCount, GLuint elemOffset,
GLenum funcType)
{
@@ -51,17 +50,17 @@ WebGL2Context::ValidateClearBuffer(const
if (drawBuffer < 0 || drawBuffer > maxDrawBuffer) {
ErrorInvalidValue("%s: Invalid drawbuffer %d. This buffer only supports"
" `drawbuffer` values between 0 and %u.",
funcName, drawBuffer, maxDrawBuffer);
return false;
}
if (availElemCount < requiredElements) {
- ErrorInvalidValue("%s: Not enough elements. Require %" PRIuSIZE ". Given %" PRIuSIZE ".",
+ ErrorInvalidValue("%s: Not enough elements. Require %zu. Given %zu.",
funcName, requiredElements, availElemCount);
return false;
}
////
MakeContextCurrent();
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -27,17 +27,16 @@
#include "mozilla/dom/HTMLVideoElement.h"
#include "mozilla/dom/ImageData.h"
#include "mozilla/dom/WebGLContextEvent.h"
#include "mozilla/EnumeratedArrayCycleCollection.h"
#include "mozilla/Preferences.h"
#include "mozilla/ProcessPriorityManager.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/Services.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "nsContentUtils.h"
#include "nsDisplayList.h"
#include "nsError.h"
#include "nsIClassInfoImpl.h"
#include "nsIConsoleService.h"
#include "nsIDOMEvent.h"
#include "nsIGfxInfo.h"
@@ -1206,22 +1205,22 @@ WebGLContext::LoseOldestWebGLContextIfLi
if (contexts[i]->mLastUseIndex < oldestIndexThisPrincipal) {
oldestIndexThisPrincipal = contexts[i]->mLastUseIndex;
oldestContextThisPrincipal = contexts[i];
}
}
}
if (numContextsThisPrincipal > kMaxWebGLContextsPerPrincipal) {
- GenerateWarning("Exceeded %" PRIuSIZE " live WebGL contexts for this principal, losing the "
+ GenerateWarning("Exceeded %zu live WebGL contexts for this principal, losing the "
"least recently used one.", kMaxWebGLContextsPerPrincipal);
MOZ_ASSERT(oldestContextThisPrincipal); // if we reach this point, this can't be null
const_cast<WebGLContext*>(oldestContextThisPrincipal)->LoseContext();
} else if (numContexts > kMaxWebGLContexts) {
- GenerateWarning("Exceeded %" PRIuSIZE " live WebGL contexts, losing the least "
+ GenerateWarning("Exceeded %zu live WebGL contexts, losing the least "
"recently used one.", kMaxWebGLContexts);
MOZ_ASSERT(oldestContext); // if we reach this point, this can't be null
const_cast<WebGLContext*>(oldestContext)->LoseContext();
}
}
UniquePtr<uint8_t[]>
WebGLContext::GetImageBuffer(int32_t* out_format)
--- a/dom/canvas/WebGLProgram.cpp
+++ b/dom/canvas/WebGLProgram.cpp
@@ -5,17 +5,16 @@
#include "WebGLProgram.h"
#include "GLContext.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "mozilla/RefPtr.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsPrintfCString.h"
#include "WebGLActiveInfo.h"
#include "WebGLContext.h"
#include "WebGLShader.h"
#include "WebGLTransformFeedback.h"
#include "WebGLUniformLocation.h"
#include "WebGLValidateStrings.h"
@@ -595,17 +594,17 @@ WebGLProgram::GetActiveAttrib(GLuint ind
if (!mMostRecentLinkInfo) {
RefPtr<WebGLActiveInfo> ret = WebGLActiveInfo::CreateInvalid(mContext);
return ret.forget();
}
const auto& attribs = mMostRecentLinkInfo->attribs;
if (index >= attribs.size()) {
- mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%" PRIuSIZE ").",
+ mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%zu).",
index, "ACTIVE_ATTRIBS", attribs.size());
return nullptr;
}
RefPtr<WebGLActiveInfo> ret = attribs[index].mActiveInfo;
return ret.forget();
}
@@ -616,17 +615,17 @@ WebGLProgram::GetActiveUniform(GLuint in
// According to the spec, this can return null.
RefPtr<WebGLActiveInfo> ret = WebGLActiveInfo::CreateInvalid(mContext);
return ret.forget();
}
const auto& uniforms = mMostRecentLinkInfo->uniforms;
if (index >= uniforms.size()) {
- mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%" PRIuSIZE ").",
+ mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%zu).",
index, "ACTIVE_UNIFORMS", uniforms.size());
return nullptr;
}
RefPtr<WebGLActiveInfo> ret = uniforms[index]->mActiveInfo;
return ret.forget();
}
--- a/dom/canvas/WebGLShader.cpp
+++ b/dom/canvas/WebGLShader.cpp
@@ -4,17 +4,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "WebGLShader.h"
#include "angle/ShaderLang.h"
#include "GLContext.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsPrintfCString.h"
#include "nsString.h"
#include "prenv.h"
#include "WebGLContext.h"
#include "WebGLObjectModel.h"
#include "WebGLShaderValidator.h"
#include "WebGLValidateStrings.h"
--- a/dom/canvas/WebGLTextureUpload.cpp
+++ b/dom/canvas/WebGLTextureUpload.cpp
@@ -12,17 +12,16 @@
#include "GLBlitHelper.h"
#include "GLContext.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/dom/HTMLVideoElement.h"
#include "mozilla/dom/ImageBitmap.h"
#include "mozilla/dom/ImageData.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Scoped.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "ScopedGLHelpers.h"
#include "TexUnpackBlob.h"
#include "WebGLBuffer.h"
#include "WebGLContext.h"
#include "WebGLContextUtils.h"
#include "WebGLFramebuffer.h"
#include "WebGLTexelConversions.h"
@@ -688,17 +687,17 @@ ValidateCompressedTexUnpack(WebGLContext
if (!bytesNeeded.isValid()) {
webgl->ErrorOutOfMemory("%s: Overflow while computing the needed buffer size.",
funcName);
return false;
}
if (dataSize != bytesNeeded.value()) {
webgl->ErrorInvalidValue("%s: Provided buffer's size must match expected size."
- " (needs %u, has %" PRIuSIZE ")",
+ " (needs %u, has %zu)",
funcName, bytesNeeded.value(), dataSize);
return false;
}
return true;
}
static bool
--- a/dom/canvas/WebGLUniformLocation.cpp
+++ b/dom/canvas/WebGLUniformLocation.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "WebGLUniformLocation.h"
#include "GLContext.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "WebGLActiveInfo.h"
#include "WebGLContext.h"
#include "WebGLProgram.h"
namespace mozilla {
@@ -148,34 +147,34 @@ WebGLUniformLocation::ValidateArrayLengt
const char* funcName) const
{
MOZ_ASSERT(mLinkInfo);
if (setterArraySize == 0 ||
setterArraySize % setterElemSize)
{
mContext->ErrorInvalidValue("%s: Expected an array of length a multiple of %d,"
- " got an array of length %" PRIuSIZE ".",
+ " got an array of length %zu.",
funcName, setterElemSize, setterArraySize);
return false;
}
/* GLES 2.0.25, Section 2.10, p38
* When loading `N` elements starting at an arbitrary position `k` in a uniform
* declared as an array, elements `k` through `k + N - 1` in the array will be
* replaced with the new values. Values for any array element that exceeds the
* highest array element index used, as reported by `GetActiveUniform`, will be
* ignored by GL.
*/
if (!mInfo->mActiveInfo->mIsArray &&
setterArraySize != setterElemSize)
{
mContext->ErrorInvalidOperation("%s: Expected an array of length exactly %d"
" (since this uniform is not an array uniform),"
- " got an array of length %" PRIuSIZE ".",
+ " got an array of length %zu.",
funcName, setterElemSize, setterArraySize);
return false;
}
return true;
}
JS::Value
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -10,17 +10,16 @@
#include "mozilla/Attributes.h"
#include "mozilla/EditorBase.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/EventStates.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TextComposition.h"
#include "mozilla/TextEvents.h"
#include "mozilla/Unused.h"
#include "mozilla/dom/HTMLFormElement.h"
#include "mozilla/dom/TabParent.h"
#include "HTMLInputElement.h"
#include "IMEContentObserver.h"
@@ -181,17 +180,17 @@ IMEStateManager::Init()
InputContext::ORIGIN_CONTENT;
}
// static
void
IMEStateManager::Shutdown()
{
MOZ_LOG(sISMLog, LogLevel::Info,
- ("Shutdown(), sTextCompositions=0x%p, sTextCompositions->Length()=%" PRIuSIZE,
+ ("Shutdown(), sTextCompositions=0x%p, sTextCompositions->Length()=%zu",
sTextCompositions, sTextCompositions ? sTextCompositions->Length() : 0));
MOZ_ASSERT(!sTextCompositions || !sTextCompositions->Length());
delete sTextCompositions;
sTextCompositions = nullptr;
}
// static
@@ -286,17 +285,17 @@ IMEStateManager::OnDestroyPresContext(ns
// First, if there is a composition in the aPresContext, clean up it.
if (sTextCompositions) {
TextCompositionArray::index_type i =
sTextCompositions->IndexOf(aPresContext);
if (i != TextCompositionArray::NoIndex) {
MOZ_LOG(sISMLog, LogLevel::Debug,
(" OnDestroyPresContext(), "
- "removing TextComposition instance from the array (index=%" PRIuSIZE ")", i));
+ "removing TextComposition instance from the array (index=%zu)", i));
// there should be only one composition per presContext object.
sTextCompositions->ElementAt(i)->Destroy();
sTextCompositions->RemoveElementAt(i);
if (sTextCompositions->IndexOf(aPresContext) !=
TextCompositionArray::NoIndex) {
MOZ_LOG(sISMLog, LogLevel::Error,
(" OnDestroyPresContext(), FAILED to remove "
"TextComposition instance from the array"));
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -7,17 +7,16 @@
#include "mozilla/dom/TextTrackManager.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "mozilla/dom/HTMLTrackElement.h"
#include "mozilla/dom/HTMLVideoElement.h"
#include "mozilla/dom/TextTrack.h"
#include "mozilla/dom/TextTrackCue.h"
#include "mozilla/dom/Event.h"
#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "nsComponentManagerUtils.h"
#include "nsGlobalWindow.h"
#include "nsVariant.h"
#include "nsVideoFrame.h"
#include "nsIFrame.h"
#include "nsTArrayHelpers.h"
#include "nsIWebVTTParserWrapper.h"
@@ -280,17 +279,17 @@ TextTrackManager::UpdateCueDisplay()
return;
}
nsTArray<RefPtr<TextTrackCue> > showingCues;
mTextTracks->GetShowingCues(showingCues);
if (showingCues.Length() > 0) {
WEBVTT_LOG("UpdateCueDisplay ProcessCues");
- WEBVTT_LOGV("UpdateCueDisplay showingCues.Length() %" PRIuSIZE, showingCues.Length());
+ WEBVTT_LOGV("UpdateCueDisplay showingCues.Length() %zu", showingCues.Length());
RefPtr<nsVariantCC> jsCues = new nsVariantCC();
jsCues->SetAsArray(nsIDataType::VTYPE_INTERFACE,
&NS_GET_IID(nsIDOMEventTarget),
showingCues.Length(),
static_cast<void*>(showingCues.Elements()));
nsPIDOMWindowInner* window = mMediaElement->OwnerDoc()->GetInnerWindow();
if (window) {
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -24,17 +24,16 @@
#include "mozilla/Casting.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/ErrorNames.h"
#include "mozilla/LazyIdleThread.h"
#include "mozilla/Maybe.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/SnappyCompressOutputStream.h"
#include "mozilla/SnappyUncompressInputStream.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/storage.h"
#include "mozilla/Unused.h"
#include "mozilla/UniquePtrExtensions.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/File.h"
--- a/dom/media/ADTSDemuxer.cpp
+++ b/dom/media/ADTSDemuxer.cpp
@@ -3,17 +3,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "ADTSDemuxer.h"
#include "TimeUnits.h"
#include "VideoUtils.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/UniquePtr.h"
#include <inttypes.h>
extern mozilla::LazyLogModule gMediaDemuxerLog;
#define ADTSLOG(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Debug, ("ADTSDemuxer " msg, ##__VA_ARGS__))
#define ADTSLOGV(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Verbose, ("ADTSDemuxer " msg, ##__VA_ARGS__))
@@ -529,17 +528,17 @@ ADTSTrackDemuxer::GetSamples(int32_t aNu
while (aNumSamples--) {
RefPtr<MediaRawData> frame(GetNextFrame(FindNextFrame()));
if (!frame)
break;
frames->mSamples.AppendElement(frame);
}
- ADTSLOGV("GetSamples() End mSamples.Size()=%" PRIuSIZE " aNumSamples=%d mOffset=%" PRIu64
+ ADTSLOGV("GetSamples() End mSamples.Size()=%zu aNumSamples=%d mOffset=%" PRIu64
" mNumParsedFrames=%" PRIu64 " mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64
" mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
frames->mSamples.Length(), aNumSamples, mOffset, mNumParsedFrames,
mFrameIndex, mTotalFrameLen, mSamplesPerFrame, mSamplesPerSecond,
mChannels);
@@ -684,17 +683,17 @@ ADTSTrackDemuxer::FindNextFrame(bool fin
if (frameHeaderOffset + advance <= frameHeaderOffset) {
break;
}
frameHeaderOffset += advance;
}
if (!foundFrame || !mParser->CurrentFrame().Length()) {
- ADTSLOG("FindNext() Exit foundFrame=%d mParser->CurrentFrame().Length()=%" PRIuSIZE " ",
+ ADTSLOG("FindNext() Exit foundFrame=%d mParser->CurrentFrame().Length()=%zu ",
foundFrame, mParser->CurrentFrame().Length());
mParser->Reset();
return mParser->CurrentFrame();
}
ADTSLOGV("FindNext() End mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " frameHeaderOffset=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d"
@@ -722,18 +721,18 @@ ADTSTrackDemuxer::SkipNextFrame(const ad
mSamplesPerFrame, mSamplesPerSecond, mChannels);
return true;
}
already_AddRefed<MediaRawData>
ADTSTrackDemuxer::GetNextFrame(const adts::Frame& aFrame)
{
- ADTSLOG("GetNext() Begin({mOffset=%" PRId64 " HeaderSize()=%" PRIuSIZE
- " Length()=%" PRIuSIZE "})",
+ ADTSLOG("GetNext() Begin({mOffset=%" PRId64 " HeaderSize()=%zu"
+ " Length()=%zu})",
aFrame.Offset(), aFrame.Header().HeaderSize(), aFrame.PayloadLength());
if (!aFrame.IsValid())
return nullptr;
const int64_t offset = aFrame.PayloadOffset();
const uint32_t length = aFrame.PayloadLength();
RefPtr<MediaRawData> frame = new MediaRawData();
@@ -742,17 +741,17 @@ ADTSTrackDemuxer::GetNextFrame(const adt
UniquePtr<MediaRawDataWriter> frameWriter(frame->CreateWriter());
if (!frameWriter->SetSize(length)) {
ADTSLOG("GetNext() Exit failed to allocated media buffer");
return nullptr;
}
const uint32_t read = Read(frameWriter->Data(), offset, length);
if (read != length) {
- ADTSLOG("GetNext() Exit read=%u frame->Size()=%" PRIuSIZE, read, frame->Size());
+ ADTSLOG("GetNext() Exit read=%u frame->Size()=%zu", read, frame->Size());
return nullptr;
}
UpdateState(aFrame);
frame->mTime = Duration(mFrameIndex - 1);
frame->mDuration = Duration(1);
frame->mTimecode = frame->mTime;
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -22,17 +22,16 @@
#include "mediasink/VideoSink.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/IndexSequence.h"
#include "mozilla/Logging.h"
#include "mozilla/mozalloc.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Preferences.h"
#include "mozilla/SharedThreadPool.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "mozilla/TaskQueue.h"
#include "mozilla/Tuple.h"
#include "nsComponentManagerUtils.h"
#include "nsContentUtils.h"
#include "nsIEventTarget.h"
#include "nsITimer.h"
@@ -3272,17 +3271,17 @@ void MediaDecoderStateMachine::StopMedia
void
MediaDecoderStateMachine::RequestAudioData()
{
MOZ_ASSERT(OnTaskQueue());
MOZ_ASSERT(IsAudioDecoding());
MOZ_ASSERT(!IsRequestingAudioData());
MOZ_ASSERT(!IsWaitingAudioData());
- LOGV("Queueing audio task - queued=%" PRIuSIZE ", decoder-queued=%" PRIuSIZE,
+ LOGV("Queueing audio task - queued=%zu, decoder-queued=%zu",
AudioQueue().GetSize(), mReader->SizeOfAudioQueueInFrames());
RefPtr<MediaDecoderStateMachine> self = this;
mReader->RequestAudioData()->Then(
OwnerThread(), __func__,
[this, self] (RefPtr<AudioData> aAudio) {
MOZ_ASSERT(aAudio);
mAudioDataRequest.Complete();
@@ -3315,17 +3314,17 @@ MediaDecoderStateMachine::RequestAudioDa
void
MediaDecoderStateMachine::RequestVideoData(const media::TimeUnit& aCurrentTime)
{
MOZ_ASSERT(OnTaskQueue());
MOZ_ASSERT(IsVideoDecoding());
MOZ_ASSERT(!IsRequestingVideoData());
MOZ_ASSERT(!IsWaitingVideoData());
- LOGV("Queueing video task - queued=%" PRIuSIZE ", decoder-queued=%" PRIoSIZE
+ LOGV("Queueing video task - queued=%zu, decoder-queued=%zo"
", stime=%" PRId64,
VideoQueue().GetSize(), mReader->SizeOfVideoQueueInFrames(),
aCurrentTime.ToMicroseconds());
TimeStamp videoDecodeStartTime = TimeStamp::Now();
RefPtr<MediaDecoderStateMachine> self = this;
mReader->RequestVideoData(aCurrentTime)->Then(
OwnerThread(), __func__,
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -14,17 +14,16 @@
#include "MediaResource.h"
#include "VideoFrameContainer.h"
#include "VideoUtils.h"
#include "mozilla/AbstractThread.h"
#include "mozilla/CDMProxy.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/Preferences.h"
#include "mozilla/SharedThreadPool.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/SyncRunnable.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Unused.h"
#include "nsContentUtils.h"
#include "nsPrintfCString.h"
#include "nsSize.h"
#include <algorithm>
@@ -1597,17 +1596,17 @@ MediaFormatReader::DoDemuxVideo()
&MediaFormatReader::OnVideoDemuxFailed)
->Track(mVideo.mDemuxRequest);
}
void
MediaFormatReader::OnVideoDemuxCompleted(
RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples)
{
- LOGV("%" PRIuSIZE " video samples demuxed (sid:%d)",
+ LOGV("%zu video samples demuxed (sid:%d)",
aSamples->mSamples.Length(),
aSamples->mSamples[0]->mTrackInfo
? aSamples->mSamples[0]->mTrackInfo->GetID()
: 0);
mVideo.mDemuxRequest.Complete();
mVideo.mQueuedSamples.AppendElements(aSamples->mSamples);
ScheduleUpdate(TrackInfo::kVideoTrack);
}
@@ -1674,17 +1673,17 @@ MediaFormatReader::DoDemuxAudio()
&MediaFormatReader::OnAudioDemuxFailed)
->Track(mAudio.mDemuxRequest);
}
void
MediaFormatReader::OnAudioDemuxCompleted(
RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples)
{
- LOGV("%" PRIuSIZE " audio samples demuxed (sid:%d)",
+ LOGV("%zu audio samples demuxed (sid:%d)",
aSamples->mSamples.Length(),
aSamples->mSamples[0]->mTrackInfo
? aSamples->mSamples[0]->mTrackInfo->GetID()
: 0);
mAudio.mDemuxRequest.Complete();
mAudio.mQueuedSamples.AppendElements(aSamples->mSamples);
ScheduleUpdate(TrackInfo::kAudioTrack);
}
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1,16 +1,15 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "MediaStreamGraphImpl.h"
#include "mozilla/MathAlgorithms.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "AudioSegment.h"
#include "VideoSegment.h"
#include "nsContentUtils.h"
#include "nsIObserver.h"
#include "nsPrintfCString.h"
#include "nsServiceManagerUtils.h"
@@ -112,22 +111,22 @@ MediaStreamGraphImpl::AddStreamGraphThre
if (aStream->IsSuspended()) {
mSuspendedStreams.AppendElement(aStream);
LOG(LogLevel::Debug,
("Adding media stream %p to the graph, in the suspended stream array",
aStream));
} else {
mStreams.AppendElement(aStream);
LOG(LogLevel::Debug,
- ("Adding media stream %p to graph %p, count %" PRIuSIZE,
+ ("Adding media stream %p to graph %p, count %zu",
aStream,
this,
mStreams.Length()));
LOG(LogLevel::Debug,
- ("Adding media stream %p to graph %p, count %" PRIuSIZE,
+ ("Adding media stream %p to graph %p, count %zu",
aStream,
this,
mStreams.Length()));
}
SetStreamOrderDirty();
}
@@ -151,22 +150,22 @@ MediaStreamGraphImpl::RemoveStreamGraphT
if (aStream->IsSuspended()) {
mSuspendedStreams.RemoveElement(aStream);
} else {
mStreams.RemoveElement(aStream);
}
LOG(LogLevel::Debug,
- ("Removed media stream %p from graph %p, count %" PRIuSIZE,
+ ("Removed media stream %p from graph %p, count %zu",
aStream,
this,
mStreams.Length()));
LOG(LogLevel::Debug,
- ("Removed media stream %p from graph %p, count %" PRIuSIZE,
+ ("Removed media stream %p from graph %p, count %zu",
aStream,
this,
mStreams.Length()));
NS_RELEASE(aStream); // probably destroying it
}
void
@@ -3903,17 +3902,17 @@ MediaStreamGraphImpl::SuspendOrResumeStr
if (aAudioContextOperation == AudioContextOperation::Resume) {
DecrementSuspendCount(stream);
} else {
IncrementSuspendCount(stream);
}
}
LOG(LogLevel::Debug,
("Moving streams between suspended and running"
- "state: mStreams: %" PRIuSIZE ", mSuspendedStreams: %" PRIuSIZE,
+ "state: mStreams: %zu, mSuspendedStreams: %zu",
mStreams.Length(),
mSuspendedStreams.Length()));
#ifdef DEBUG
// The intersection of the two arrays should be null.
for (uint32_t i = 0; i < mStreams.Length(); i++) {
for (uint32_t j = 0; j < mSuspendedStreams.Length(); j++) {
MOZ_ASSERT(
mStreams[i] != mSuspendedStreams[j],
--- a/dom/media/flac/FlacDemuxer.cpp
+++ b/dom/media/flac/FlacDemuxer.cpp
@@ -2,17 +2,16 @@
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "FlacDemuxer.h"
#include "mozilla/Maybe.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mp4_demuxer/BitReader.h"
#include "nsAutoPtr.h"
#include "prenv.h"
#include "FlacFrameParser.h"
#include "VideoUtils.h"
#include "TimeUnits.h"
extern mozilla::LazyLogModule gMediaDemuxerLog;
@@ -863,17 +862,17 @@ FlacTrackDemuxer::GetSamples(int32_t aNu
while (aNumSamples--) {
RefPtr<MediaRawData> frame(GetNextFrame(FindNextFrame()));
if (!frame)
break;
frames->mSamples.AppendElement(frame);
}
- LOGV("GetSamples() End mSamples.Length=%" PRIuSIZE " aNumSamples=%d offset=%" PRId64
+ LOGV("GetSamples() End mSamples.Length=%zu aNumSamples=%d offset=%" PRId64
" mParsedFramesDuration=%f mTotalFrameLen=%" PRIu64,
frames->mSamples.Length(), aNumSamples, GetResourceOffset(),
mParsedFramesDuration.ToSeconds(), mTotalFrameLen);
if (frames->mSamples.IsEmpty()) {
return SamplesPromise::CreateAndReject(
NS_ERROR_DOM_MEDIA_END_OF_STREAM, __func__);
}
@@ -971,17 +970,17 @@ FlacTrackDemuxer::GetNextFrame(const fla
nsAutoPtr<MediaRawDataWriter> frameWriter(frame->CreateWriter());
if (!frameWriter->SetSize(size)) {
LOG("GetNext() Exit failed to allocated media buffer");
return nullptr;
}
const uint32_t read = Read(frameWriter->Data(), offset, size);
if (read != size) {
- LOG("GetNextFrame() Exit read=%u frame->Size=%" PRIuSIZE, read, frame->Size());
+ LOG("GetNextFrame() Exit read=%u frame->Size=%zu", read, frame->Size());
return nullptr;
}
frame->mTime = aFrame.Time();
frame->mDuration = aFrame.Duration();
frame->mTimecode = frame->mTime;
frame->mOffset = aFrame.Offset();
frame->mKeyframe = true;
--- a/dom/media/gmp/ChromiumCDMChild.cpp
+++ b/dom/media/gmp/ChromiumCDMChild.cpp
@@ -10,17 +10,16 @@
#include "WidevineVideoFrame.h"
#include "GMPLog.h"
#include "GMPPlatform.h"
#include "mozilla/Unused.h"
#include "nsPrintfCString.h"
#include "base/time.h"
#include "GMPUtils.h"
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
namespace mozilla {
namespace gmp {
ChromiumCDMChild::ChromiumCDMChild(GMPContentChild* aPlugin)
: mPlugin(aPlugin)
{
MOZ_ASSERT(IsOnMessageLoopThread());
@@ -817,17 +816,17 @@ ChromiumCDMChild::RecvGiveBuffer(ipc::Sh
}
void
ChromiumCDMChild::GiveBuffer(ipc::Shmem&& aBuffer)
{
MOZ_ASSERT(IsOnMessageLoopThread());
size_t sz = aBuffer.Size<uint8_t>();
mBuffers.AppendElement(Move(aBuffer));
- GMP_LOG("ChromiumCDMChild::RecvGiveBuffer(capacity=%" PRIuSIZE
+ GMP_LOG("ChromiumCDMChild::RecvGiveBuffer(capacity=%zu"
") bufferSizes={%s} mDecoderInitialized=%d",
sz,
ToString(mBuffers).get(),
mDecoderInitialized);
}
} // namespace gmp
} // namespace mozilla
--- a/dom/media/gmp/ChromiumCDMParent.cpp
+++ b/dom/media/gmp/ChromiumCDMParent.cpp
@@ -646,17 +646,17 @@ ChromiumCDMParent::RecvIncreaseShmemPool
EnsureSufficientShmems(mVideoFrameBufferSize);
return IPC_OK();
}
bool
ChromiumCDMParent::PurgeShmems()
{
- GMP_LOG("ChromiumCDMParent::PurgeShmems(this=%p) frame_size=%" PRIuSIZE
+ GMP_LOG("ChromiumCDMParent::PurgeShmems(this=%p) frame_size=%zu"
" limit=%" PRIu32 " active=%" PRIu32,
this,
mVideoFrameBufferSize,
mVideoShmemLimit,
mVideoShmemsActive);
if (mVideoShmemsActive == 0) {
// We haven't allocated any shmems, nothing to do here.
@@ -668,17 +668,17 @@ ChromiumCDMParent::PurgeShmems()
mVideoShmemsActive = 0;
return true;
}
bool
ChromiumCDMParent::EnsureSufficientShmems(size_t aVideoFrameSize)
{
GMP_LOG("ChromiumCDMParent::EnsureSufficientShmems(this=%p) "
- "size=%" PRIuSIZE " expected_size=%" PRIuSIZE " limit=%" PRIu32
+ "size=%zu expected_size=%zu limit=%" PRIu32
" active=%" PRIu32,
this,
aVideoFrameSize,
mVideoFrameBufferSize,
mVideoShmemLimit,
mVideoShmemsActive);
// The Chromium CDM API requires us to implement a synchronous
--- a/dom/media/gmp/GMPDecryptorParent.cpp
+++ b/dom/media/gmp/GMPDecryptorParent.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "GMPDecryptorParent.h"
#include "GMPContentParent.h"
#include "MediaData.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
namespace mozilla {
#ifdef LOG
#undef LOG
#endif
@@ -369,17 +368,17 @@ ToMediaKeyStatus(GMPMediaKeyStatus aStat
default: return dom::MediaKeyStatus::Internal_error;
}
}
mozilla::ipc::IPCResult
GMPDecryptorParent::RecvBatchedKeyStatusChanged(const nsCString& aSessionId,
InfallibleTArray<GMPKeyInformation>&& aKeyInfos)
{
- LOGD(("GMPDecryptorParent[%p]::RecvBatchedKeyStatusChanged(sessionId='%s', KeyInfos len='%" PRIuSIZE "')",
+ LOGD(("GMPDecryptorParent[%p]::RecvBatchedKeyStatusChanged(sessionId='%s', KeyInfos len='%zu')",
this, aSessionId.get(), aKeyInfos.Length()));
if (mIsOpen) {
nsTArray<CDMKeyInfo> cdmKeyInfos(aKeyInfos.Length());
for (uint32_t i = 0; i < aKeyInfos.Length(); i++) {
LOGD(("GMPDecryptorParent[%p]::RecvBatchedKeyStatusChanged(keyId=%s, gmp-status=%d)",
this, ToHexString(aKeyInfos[i].keyId()).get(), aKeyInfos[i].status()));
// If the status is kGMPUnknown, we're going to forget(remove) that key info.
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -12,17 +12,16 @@
#include "mozilla/dom/ContentParent.h"
#include "GMPParent.h"
#include "GMPVideoDecoderParent.h"
#include "nsAutoPtr.h"
#include "nsIObserverService.h"
#include "GeckoChildProcessHost.h"
#include "mozilla/Preferences.h"
#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/SyncRunnable.h"
#include "nsXPCOMPrivate.h"
#include "mozilla/Services.h"
#include "nsNativeCharsetUtils.h"
#include "nsIConsoleService.h"
#include "mozilla/Unused.h"
#include "GMPDecryptorParent.h"
#include "nsComponentManagerUtils.h"
@@ -473,17 +472,17 @@ GeckoMediaPluginServiceParent::UnloadPlu
// locked when calling CloseActive (to avoid inter-locking).
Swap(plugins, mPlugins);
for (GMPServiceParent* parent : mServiceParents) {
Unused << parent->SendBeginShutdown();
}
}
- LOGD(("%s::%s plugins:%" PRIuSIZE, __CLASS__, __FUNCTION__,
+ LOGD(("%s::%s plugins:%zu", __CLASS__, __FUNCTION__,
plugins.Length()));
#ifdef DEBUG
for (const auto& plugin : plugins) {
LOGD(("%s::%s plugin: '%s'", __CLASS__, __FUNCTION__,
plugin->GetDisplayName().get()));
}
#endif
// Note: CloseActive may be async; it could actually finish
--- a/dom/media/gmp/GMPStorageParent.cpp
+++ b/dom/media/gmp/GMPStorageParent.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "GMPStorageParent.h"
#include "GMPParent.h"
#include "gmp-storage.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "mozIGeckoMediaPluginService.h"
namespace mozilla {
#ifdef LOG
#undef LOG
#endif
@@ -115,29 +114,29 @@ GMPStorageParent::RecvRead(const nsCStri
nsTArray<uint8_t> data;
if (!mStorage->IsOpen(aRecordName)) {
LOGD(("GMPStorageParent[%p]::RecvRead(record='%s') failed; record not open",
this, aRecordName.get()));
Unused << SendReadComplete(aRecordName, GMPClosedErr, data);
} else {
GMPErr rv = mStorage->Read(aRecordName, data);
- LOGD(("GMPStorageParent[%p]::RecvRead(record='%s') read %" PRIuSIZE " bytes rv=%" PRIu32,
+ LOGD(("GMPStorageParent[%p]::RecvRead(record='%s') read %zu bytes rv=%" PRIu32,
this, aRecordName.get(), data.Length(), static_cast<uint32_t>(rv)));
Unused << SendReadComplete(aRecordName, rv, data);
}
return IPC_OK();
}
mozilla::ipc::IPCResult
GMPStorageParent::RecvWrite(const nsCString& aRecordName,
InfallibleTArray<uint8_t>&& aBytes)
{
- LOGD(("GMPStorageParent[%p]::RecvWrite(record='%s') %" PRIuSIZE " bytes",
+ LOGD(("GMPStorageParent[%p]::RecvWrite(record='%s') %zu bytes",
this, aRecordName.get(), aBytes.Length()));
if (mShutdown) {
return IPC_FAIL_NO_REASON(this);
}
if (!mStorage->IsOpen(aRecordName)) {
LOGD(("GMPStorageParent[%p]::RecvWrite(record='%s') failed record not open",
--- a/dom/media/gmp/GMPVideoDecoderParent.cpp
+++ b/dom/media/gmp/GMPVideoDecoderParent.cpp
@@ -1,16 +1,15 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "GMPVideoDecoderParent.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "nsAutoRef.h"
#include "nsThreadUtils.h"
#include "GMPUtils.h"
#include "GMPVideoEncodedFrameImpl.h"
#include "GMPVideoi420FrameImpl.h"
#include "GMPContentParent.h"
#include "GMPMessageUtils.h"
--- a/dom/media/gmp/widevine-adapter/WidevineUtils.cpp
+++ b/dom/media/gmp/widevine-adapter/WidevineUtils.cpp
@@ -1,16 +1,15 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "WidevineUtils.h"
#include "WidevineDecryptor.h"
-#include <mozilla/SizePrintfMacros.h>
#include "gmp-api/gmp-errors.h"
#include <stdarg.h>
#include <stdio.h>
#include <inttypes.h>
namespace mozilla {
@@ -75,17 +74,17 @@ CDMWrapper::~CDMWrapper()
{
CDM_LOG("CDMWrapper destroying CDM=%p", mCDM);
mCDM->Destroy();
mCDM = nullptr;
}
WidevineBuffer::WidevineBuffer(size_t aSize)
{
- CDM_LOG("WidevineBuffer(size=%" PRIuSIZE ") created", aSize);
+ CDM_LOG("WidevineBuffer(size=%zu) created", aSize);
mBuffer.SetLength(aSize);
}
WidevineBuffer::~WidevineBuffer()
{
CDM_LOG("WidevineBuffer(size=%" PRIu32 ") destroyed", Size());
}
--- a/dom/media/mediasink/VideoSink.cpp
+++ b/dom/media/mediasink/VideoSink.cpp
@@ -4,17 +4,16 @@
* 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/. */
#include "MediaQueue.h"
#include "VideoSink.h"
#include "MediaPrefs.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
namespace mozilla {
extern LazyLogModule gMediaDecoderLog;
#undef FMT
#define FMT(x, ...) "VideoSink=%p " x, this, ##__VA_ARGS__
@@ -411,17 +410,17 @@ VideoSink::RenderVideoFrames(int32_t aMa
}
ImageContainer::NonOwningImage* img = images.AppendElement();
img->mTimeStamp = t;
img->mImage = frame->mImage;
img->mFrameID = frame->mFrameID;
img->mProducerID = mProducerID;
- VSINK_LOG_V("playing video frame %" PRId64 " (id=%x) (vq-queued=%" PRIuSIZE ")",
+ VSINK_LOG_V("playing video frame %" PRId64 " (id=%x) (vq-queued=%zu)",
frame->mTime.ToMicroseconds(), frame->mFrameID,
VideoQueue().GetSize());
}
if (images.Length() > 0) {
mContainer->SetCurrentFrames(frames[0]->mDisplay, images);
}
}
@@ -506,17 +505,17 @@ VideoSink::MaybeResolveEndPromise()
}
nsCString
VideoSink::GetDebugInfo()
{
AssertOwnerThread();
return nsPrintfCString(
"VideoSink Status: IsStarted=%d IsPlaying=%d VideoQueue(finished=%d "
- "size=%" PRIuSIZE ") mVideoFrameEndTime=%" PRId64 " mHasVideo=%d "
+ "size=%zu) mVideoFrameEndTime=%" PRId64 " mHasVideo=%d "
"mVideoSinkEndRequest.Exists()=%d mEndPromiseHolder.IsEmpty()=%d\n",
IsStarted(), IsPlaying(), VideoQueue().IsFinished(),
VideoQueue().GetSize(), mVideoFrameEndTime.ToMicroseconds(), mHasVideo,
mVideoSinkEndRequest.Exists(), mEndPromiseHolder.IsEmpty())
+ mAudioSink->GetDebugInfo();
}
} // namespace media
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ContainerParser.h"
#include "WebMBufferedParser.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/ErrorResult.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mp4_demuxer/MoofParser.h"
#include "mozilla/Logging.h"
#include "mozilla/Maybe.h"
#include "MediaData.h"
#ifdef MOZ_FMP4
#include "MP4Stream.h"
#include "mp4_demuxer/AtomType.h"
#include "mp4_demuxer/ByteReader.h"
@@ -41,29 +40,29 @@ ContainerParser::ContainerParser(const M
{
}
ContainerParser::~ContainerParser() = default;
MediaResult
ContainerParser::IsInitSegmentPresent(MediaByteBuffer* aData)
{
- MSE_DEBUG(ContainerParser, "aLength=%" PRIuSIZE " [%x%x%x%x]",
+ MSE_DEBUG(ContainerParser, "aLength=%zu [%x%x%x%x]",
aData->Length(),
aData->Length() > 0 ? (*aData)[0] : 0,
aData->Length() > 1 ? (*aData)[1] : 0,
aData->Length() > 2 ? (*aData)[2] : 0,
aData->Length() > 3 ? (*aData)[3] : 0);
return NS_ERROR_NOT_AVAILABLE;
}
MediaResult
ContainerParser::IsMediaSegmentPresent(MediaByteBuffer* aData)
{
- MSE_DEBUG(ContainerParser, "aLength=%" PRIuSIZE " [%x%x%x%x]",
+ MSE_DEBUG(ContainerParser, "aLength=%zu [%x%x%x%x]",
aData->Length(),
aData->Length() > 0 ? (*aData)[0] : 0,
aData->Length() > 1 ? (*aData)[1] : 0,
aData->Length() > 2 ? (*aData)[2] : 0,
aData->Length() > 3 ? (*aData)[3] : 0);
return NS_ERROR_NOT_AVAILABLE;
}
@@ -328,17 +327,17 @@ public:
(completeIdx + 1u < mapping.Length())
? mapping[completeIdx + 1].mTimecode - mapping[completeIdx].mTimecode
: mapping[completeIdx].mTimecode - previousMapping.ref().mTimecode;
aStart = mapping[0].mTimecode / NS_PER_USEC;
aEnd = (mapping[completeIdx].mTimecode + frameDuration) / NS_PER_USEC;
MSE_DEBUG(WebMContainerParser,
"[%" PRId64 ", %" PRId64 "] [fso=%" PRId64 ", leo=%" PRId64
- ", l=%" PRIuSIZE " processedIdx=%u fs=%" PRId64 "]",
+ ", l=%zu processedIdx=%u fs=%" PRId64 "]",
aStart,
aEnd,
mapping[0].mSyncOffset,
mapping[completeIdx].mEndOffset,
mapping.Length(),
completeIdx,
mCompleteMediaSegmentRange.mEnd);
--- a/dom/media/mediasource/MediaSourceDemuxer.cpp
+++ b/dom/media/mediasource/MediaSourceDemuxer.cpp
@@ -254,17 +254,17 @@ void
MediaSourceDemuxer::GetMozDebugReaderData(nsACString& aString)
{
MonitorAutoLock mon(mMonitor);
nsAutoCString result;
result += nsPrintfCString("Dumping Data for Demuxer: %p\n", this);
if (mAudioTrack) {
result += nsPrintfCString(
"\tDumping Audio Track Buffer(%s): mLastAudioTime=%f\n"
- "\t\tAudio Track Buffer Details: NumSamples=%" PRIuSIZE
+ "\t\tAudio Track Buffer Details: NumSamples=%zu"
" Size=%u Evictable=%u "
"NextGetSampleIndex=%u NextInsertionIndex=%d\n",
mAudioTrack->mAudioTracks.mInfo->mMimeType.get(),
mAudioTrack->mAudioTracks.mNextSampleTime.ToSeconds(),
mAudioTrack->mAudioTracks.mBuffers[0].Length(),
mAudioTrack->mAudioTracks.mSizeBuffer,
mAudioTrack->Evictable(TrackInfo::kAudioTrack),
mAudioTrack->mAudioTracks.mNextGetSampleIndex.valueOr(-1),
@@ -272,17 +272,17 @@ MediaSourceDemuxer::GetMozDebugReaderDat
result += nsPrintfCString(
"\t\tAudio Track Buffered: ranges=%s\n",
DumpTimeRanges(mAudioTrack->SafeBuffered(TrackInfo::kAudioTrack)).get());
}
if (mVideoTrack) {
result += nsPrintfCString(
"\tDumping Video Track Buffer(%s): mLastVideoTime=%f\n"
- "\t\tVideo Track Buffer Details: NumSamples=%" PRIuSIZE
+ "\t\tVideo Track Buffer Details: NumSamples=%zu"
" Size=%u Evictable=%u "
"NextGetSampleIndex=%u NextInsertionIndex=%d\n",
mVideoTrack->mVideoTracks.mInfo->mMimeType.get(),
mVideoTrack->mVideoTracks.mNextSampleTime.ToSeconds(),
mVideoTrack->mVideoTracks.mBuffers[0].Length(),
mVideoTrack->mVideoTracks.mSizeBuffer,
mVideoTrack->Evictable(TrackInfo::kVideoTrack),
mVideoTrack->mVideoTracks.mNextGetSampleIndex.valueOr(-1),
--- a/dom/media/mediasource/ResourceQueue.cpp
+++ b/dom/media/mediasource/ResourceQueue.cpp
@@ -6,17 +6,16 @@
#include "ResourceQueue.h"
#include "nsDeque.h"
#include "MediaData.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Logging.h"
#include "mozilla/Sprintf.h"
-#include "mozilla/SizePrintfMacros.h"
extern mozilla::LogModule* GetSourceBufferResourceLog();
#define SBR_DEBUG(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), mozilla::LogLevel::Debug, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
#define SBR_DEBUGV(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), mozilla::LogLevel::Verbose, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
namespace mozilla {
@@ -97,17 +96,17 @@ ResourceQueue::Evict(uint64_t aOffset, u
return EvictBefore(std::min(aOffset, mOffset + (uint64_t)aSizeToEvict), aRv);
}
uint32_t ResourceQueue::EvictBefore(uint64_t aOffset, ErrorResult& aRv)
{
SBR_DEBUG("EvictBefore(%" PRIu64 ")", aOffset);
uint32_t evicted = 0;
while (ResourceItem* item = ResourceAt(0)) {
- SBR_DEBUG("item=%p length=%" PRIuSIZE " offset=%" PRIu64,
+ SBR_DEBUG("item=%p length=%zu offset=%" PRIu64,
item, item->mData->Length(), mOffset);
if (item->mData->Length() + mOffset >= aOffset) {
if (aOffset <= mOffset) {
break;
}
uint32_t offset = aOffset - mOffset;
mOffset += offset;
evicted += offset;
@@ -130,17 +129,17 @@ uint32_t ResourceQueue::EvictBefore(uint
}
uint32_t
ResourceQueue::EvictAll()
{
SBR_DEBUG("EvictAll()");
uint32_t evicted = 0;
while (ResourceItem* item = ResourceAt(0)) {
- SBR_DEBUG("item=%p length=%" PRIuSIZE " offset=%" PRIu64,
+ SBR_DEBUG("item=%p length=%zu offset=%" PRIu64,
item, item->mData->Length(), mOffset);
mOffset += item->mData->Length();
evicted += item->mData->Length();
delete PopFront();
}
return evicted;
}
--- a/dom/media/mediasource/SourceBufferResource.cpp
+++ b/dom/media/mediasource/SourceBufferResource.cpp
@@ -6,17 +6,16 @@
#include "SourceBufferResource.h"
#include <algorithm>
#include "nsISeekableStream.h"
#include "nsISupports.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TaskQueue.h"
#include "MediaData.h"
mozilla::LogModule* GetSourceBufferResourceLog()
{
static mozilla::LazyLogModule sLogModule("SourceBufferResource");
return sLogModule;
}
@@ -138,17 +137,17 @@ SourceBufferResource::EvictAll()
SBR_DEBUG("EvictAll()");
return mInputBuffer.EvictAll();
}
void
SourceBufferResource::AppendData(MediaByteBuffer* aData)
{
MOZ_ASSERT(OnTaskQueue());
- SBR_DEBUG("AppendData(aData=%p, aLength=%" PRIuSIZE ")",
+ SBR_DEBUG("AppendData(aData=%p, aLength=%zu)",
aData->Elements(), aData->Length());
mInputBuffer.AppendItem(aData);
mEnded = false;
}
void
SourceBufferResource::Ended()
{
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "TrackBuffersManager.h"
#include "ContainerParser.h"
#include "MediaPrefs.h"
#include "MediaSourceDemuxer.h"
#include "MediaSourceUtils.h"
#include "mozilla/Preferences.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/StateMirroring.h"
#include "SourceBufferResource.h"
#include "SourceBuffer.h"
#include "WebMDemuxer.h"
#include "SourceBufferTask.h"
#ifdef MOZ_FMP4
#include "MP4Demuxer.h"
@@ -119,17 +118,17 @@ TrackBuffersManager::~TrackBuffersManage
}
RefPtr<TrackBuffersManager::AppendPromise>
TrackBuffersManager::AppendData(already_AddRefed<MediaByteBuffer> aData,
const SourceBufferAttributes& aAttributes)
{
MOZ_ASSERT(NS_IsMainThread());
RefPtr<MediaByteBuffer> data(aData);
- MSE_DEBUG("Appending %" PRIuSIZE " bytes", data->Length());
+ MSE_DEBUG("Appending %zu bytes", data->Length());
mEnded = false;
return InvokeAsync(GetTaskQueue(), this, __func__,
&TrackBuffersManager::DoAppendData, data.forget(), aAttributes);
}
RefPtr<TrackBuffersManager::AppendPromise>
@@ -1284,17 +1283,17 @@ TrackBuffersManager::MaybeDispatchEncryp
}
}
void
TrackBuffersManager::OnVideoDemuxCompleted(
RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples)
{
MOZ_ASSERT(OnTaskQueue());
- MSE_DEBUG("%" PRIuSIZE " video samples demuxed", aSamples->mSamples.Length());
+ MSE_DEBUG("%zu video samples demuxed", aSamples->mSamples.Length());
mVideoTracks.mDemuxRequest.Complete();
mVideoTracks.mQueuedSamples.AppendElements(aSamples->mSamples);
MaybeDispatchEncryptedEvent(aSamples->mSamples);
DoDemuxAudio();
}
void
@@ -1311,17 +1310,17 @@ TrackBuffersManager::DoDemuxAudio()
&TrackBuffersManager::OnAudioDemuxFailed)
->Track(mAudioTracks.mDemuxRequest);
}
void
TrackBuffersManager::OnAudioDemuxCompleted(RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples)
{
MOZ_ASSERT(OnTaskQueue());
- MSE_DEBUG("%" PRIuSIZE " audio samples demuxed", aSamples->mSamples.Length());
+ MSE_DEBUG("%zu audio samples demuxed", aSamples->mSamples.Length());
mAudioTracks.mDemuxRequest.Complete();
mAudioTracks.mQueuedSamples.AppendElements(aSamples->mSamples);
CompleteCodedFrameProcessing();
MaybeDispatchEncryptedEvent(aSamples->mSamples);
}
void
@@ -1739,17 +1738,17 @@ TrackBuffersManager::CheckNextInsertionI
void
TrackBuffersManager::InsertFrames(TrackBuffer& aSamples,
const TimeIntervals& aIntervals,
TrackData& aTrackData)
{
// 5. Let track buffer equal the track buffer that the coded frame will be added to.
auto& trackBuffer = aTrackData;
- MSE_DEBUGV("Processing %" PRIuSIZE " %s frames(start:%" PRId64 " end:%" PRId64 ")",
+ MSE_DEBUGV("Processing %zu %s frames(start:%" PRId64 " end:%" PRId64 ")",
aSamples.Length(),
aTrackData.mInfo->mMimeType.get(),
aIntervals.GetStart().ToMicroseconds(),
aIntervals.GetEnd().ToMicroseconds());
// TODO: Handle splicing of audio (and text) frames.
// 11. Let spliced audio frame be an unset variable for holding audio splice information
// 12. Let spliced timed text frame be an unset variable for holding timed text splice information
--- a/dom/media/mp3/MP3Demuxer.cpp
+++ b/dom/media/mp3/MP3Demuxer.cpp
@@ -6,17 +6,16 @@
#include "MP3Demuxer.h"
#include <algorithm>
#include <inttypes.h>
#include <limits>
#include "mozilla/Assertions.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsAutoPtr.h"
#include "TimeUnits.h"
#include "VideoUtils.h"
extern mozilla::LazyLogModule gMediaDemuxerLog;
#define MP3LOG(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Debug, ("MP3Demuxer " msg, ##__VA_ARGS__))
#define MP3LOGV(msg, ...) \
@@ -299,17 +298,17 @@ MP3TrackDemuxer::GetSamples(int32_t aNum
RefPtr<MediaRawData> frame(GetNextFrame(FindNextFrame()));
if (!frame) {
break;
}
frames->mSamples.AppendElement(frame);
}
- MP3LOGV("GetSamples() End mSamples.Size()=%" PRIuSIZE " aNumSamples=%d mOffset=%" PRIu64
+ MP3LOGV("GetSamples() End mSamples.Size()=%zu aNumSamples=%d mOffset=%" PRIu64
" mNumParsedFrames=%" PRIu64 " mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
frames->mSamples.Length(), aNumSamples, mOffset, mNumParsedFrames,
mFrameIndex, mTotalFrameLen, mSamplesPerFrame, mSamplesPerSecond,
mChannels);
if (frames->mSamples.IsEmpty()) {
@@ -625,17 +624,17 @@ MP3TrackDemuxer::GetNextFrame(const Medi
MP3LOG("GetNext() Exit failed to allocated media buffer");
return nullptr;
}
const uint32_t read =
Read(frameWriter->Data(), frame->mOffset, frame->Size());
if (read != aRange.Length()) {
- MP3LOG("GetNext() Exit read=%u frame->Size()=%" PRIuSIZE, read, frame->Size());
+ MP3LOG("GetNext() Exit read=%u frame->Size()=%zu", read, frame->Size());
return nullptr;
}
UpdateState(aRange);
frame->mTime = Duration(mFrameIndex - 1);
frame->mDuration = Duration(1);
frame->mTimecode = frame->mTime;
--- a/dom/media/mp3/MP3FrameParser.cpp
+++ b/dom/media/mp3/MP3FrameParser.cpp
@@ -6,17 +6,16 @@
#include "MP3FrameParser.h"
#include <algorithm>
#include <inttypes.h>
#include "mozilla/Assertions.h"
#include "mozilla/EndianUtils.h"
-#include "mozilla/SizePrintfMacros.h"
#include "VideoUtils.h"
extern mozilla::LazyLogModule gMediaDemuxerLog;
#define MP3LOG(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Debug, ("MP3Demuxer " msg, ##__VA_ARGS__))
#define MP3LOGV(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Verbose, ("MP3Demuxer " msg, ##__VA_ARGS__))
@@ -110,17 +109,17 @@ FrameParser::Parse(ByteReader* aReader,
// ID3 tag found, skip past it.
const uint32_t skipSize = tagSize - ID3Parser::ID3Header::SIZE;
if (skipSize > aReader->Remaining()) {
// Skipping across the ID3v2 tag would take us past the end of the
// buffer, therefore we return immediately and let the calling function
// handle skipping the rest of the tag.
MP3LOGV("ID3v2 tag detected, size=%d,"
- " needing to skip %" PRIuSIZE " bytes past the current buffer",
+ " needing to skip %zu bytes past the current buffer",
tagSize, skipSize - aReader->Remaining());
*aBytesToSkip = skipSize - aReader->Remaining();
return false;
}
MP3LOGV("ID3v2 tag detected, size=%d", tagSize);
aReader->Read(skipSize);
} else {
// No ID3v2 tag found, rewinding reader in order to search for a MPEG
@@ -522,17 +521,17 @@ FrameParser::VBRHeader::ParseVBRI(ByteRe
}
bool
FrameParser::VBRHeader::Parse(ByteReader* aReader)
{
const bool rv = ParseVBRI(aReader) || ParseXing(aReader);
if (rv) {
MP3LOG("VBRHeader::Parse found valid VBR/CBR header: type=%s"
- " NumAudioFrames=%u NumBytes=%u Scale=%u TOC-size=%" PRIuSIZE,
+ " NumAudioFrames=%u NumBytes=%u Scale=%u TOC-size=%zu",
vbr_header::TYPE_STR[Type()], NumAudioFrames().valueOr(0),
NumBytes().valueOr(0), Scale().valueOr(0), mTOC.size());
}
return rv;
}
// FrameParser::Frame
--- a/dom/media/platforms/agnostic/OpusDecoder.cpp
+++ b/dom/media/platforms/agnostic/OpusDecoder.cpp
@@ -7,17 +7,16 @@
#include "OpusDecoder.h"
#include "OpusParser.h"
#include "TimeUnits.h"
#include "VorbisUtils.h"
#include "VorbisDecoder.h" // For VorbisLayout
#include "mozilla/EndianUtils.h"
#include "mozilla/PodOperations.h"
#include "mozilla/SyncRunnable.h"
-#include "mozilla/SizePrintfMacros.h"
#include <inttypes.h> // For PRId64
#include "opus/opus.h"
extern "C" {
#include "opus/opus_multistream.h"
}
@@ -173,17 +172,17 @@ OpusDataDecoder::ProcessDecode(MediaRawD
mFrames = 0;
mLastFrameTime = Some(aSample->mTime.ToMicroseconds());
}
// Maximum value is 63*2880, so there's no chance of overflow.
int frames_number =
opus_packet_get_nb_frames(aSample->Data(), aSample->Size());
if (frames_number <= 0) {
- OPUS_DEBUG("Invalid packet header: r=%d length=%" PRIuSIZE, frames_number,
+ OPUS_DEBUG("Invalid packet header: r=%d length=%zu", frames_number,
aSample->Size());
return DecodePromise::CreateAndReject(
MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR,
RESULT_DETAIL("Invalid packet header: r=%d length=%u",
frames_number, uint32_t(aSample->Size()))),
__func__);
}
--- a/dom/media/platforms/apple/AppleATDecoder.cpp
+++ b/dom/media/platforms/apple/AppleATDecoder.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AppleUtils.h"
#include "MP4Decoder.h"
#include "mp4_demuxer/Adts.h"
#include "MediaInfo.h"
#include "AppleATDecoder.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/SyncRunnable.h"
#include "mozilla/UniquePtr.h"
#define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
#define FourCC2Str(n) ((char[5]){(char)(n >> 24), (char)(n >> 16), (char)(n >> 8), (char)(n), 0})
namespace mozilla {
@@ -384,17 +383,17 @@ AppleATDecoder::GetInputAudioDescription
rv = AudioFormatGetProperty(kAudioFormatProperty_FormatList,
sizeof(formatInfo),
&formatInfo,
&formatListSize,
formatList.get());
if (rv) {
return NS_OK;
}
- LOG("found %" PRIuSIZE " available audio stream(s)",
+ LOG("found %zu available audio stream(s)",
formatListSize / sizeof(AudioFormatListItem));
// Get the index number of the first playable format.
// This index number will be for the highest quality layer the platform
// is capable of playing.
UInt32 itemIndex;
UInt32 indexSize = sizeof(itemIndex);
rv = AudioFormatGetProperty(kAudioFormatProperty_FirstPlayableFormatFromList,
formatListSize,
--- a/dom/media/platforms/apple/AppleVTDecoder.cpp
+++ b/dom/media/platforms/apple/AppleVTDecoder.cpp
@@ -12,17 +12,16 @@
#include "AppleVTDecoder.h"
#include "AppleVTLinker.h"
#include "MediaData.h"
#include "mozilla/ArrayUtils.h"
#include "mp4_demuxer/H264.h"
#include "nsAutoPtr.h"
#include "nsThreadUtils.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "VideoUtils.h"
#include "gfxPlatform.h"
#define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
namespace mozilla {
AppleVTDecoder::AppleVTDecoder(const VideoInfo& aConfig,
@@ -71,17 +70,17 @@ AppleVTDecoder::Init()
}
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
RefPtr<MediaDataDecoder::DecodePromise>
AppleVTDecoder::Decode(MediaRawData* aSample)
{
- LOG("mp4 input sample %p pts %lld duration %lld us%s %" PRIuSIZE " bytes",
+ LOG("mp4 input sample %p pts %lld duration %lld us%s %zu bytes",
aSample,
aSample->mTime.ToMicroseconds(),
aSample->mDuration.ToMicroseconds(),
aSample->mKeyframe ? " keyframe" : "",
aSample->Size());
RefPtr<AppleVTDecoder> self = this;
RefPtr<MediaRawData> sample = aSample;
--- a/dom/media/platforms/omx/OmxDataDecoder.cpp
+++ b/dom/media/platforms/omx/OmxDataDecoder.cpp
@@ -8,17 +8,16 @@
#include "OMX_Audio.h"
#include "OMX_Component.h"
#include "OMX_Types.h"
#include "OmxPlatformLayer.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#ifdef LOG
#undef LOG
#undef LOGL
#endif
#define LOG(arg, ...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, ("OmxDataDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
@@ -725,17 +724,17 @@ OmxDataDecoder::CollectBufferPromises(OM
// OmxBufferPromise is not exclusive, it can be multiple "Then"s, so it
// is safe to call "Ensure" here.
promises.AppendElement(buf->mPromise.Ensure(__func__));
}
}
}
}
- LOG("CollectBufferPromises: type %d, total %" PRIuSIZE " promiese", aType, promises.Length());
+ LOG("CollectBufferPromises: type %d, total %zu promiese", aType, promises.Length());
if (promises.Length()) {
return OmxBufferPromise::All(mOmxTaskQueue, promises);
}
nsTArray<BufferData*> headers;
return OmxBufferPromise::AllPromiseType::CreateAndResolve(headers, __func__);
}
--- a/dom/media/systemservices/ShmemPool.cpp
+++ b/dom/media/systemservices/ShmemPool.cpp
@@ -45,32 +45,32 @@ mozilla::ShmemBuffer ShmemPool::GetIfAva
return ShmemBuffer();
}
mPoolFree--;
#ifdef DEBUG
size_t poolUse = mShmemPool.Length() - mPoolFree;
if (poolUse > mMaxPoolUse) {
mMaxPoolUse = poolUse;
- LOG(("Maximum ShmemPool use increased: %" PRIuSIZE " buffers", mMaxPoolUse));
+ LOG(("Maximum ShmemPool use increased: %zu buffers", mMaxPoolUse));
}
#endif
return Move(res);
}
void ShmemPool::Put(ShmemBuffer&& aShmem)
{
MutexAutoLock lock(mMutex);
MOZ_ASSERT(mPoolFree < mShmemPool.Length());
mShmemPool[mPoolFree] = Move(aShmem);
mPoolFree++;
#ifdef DEBUG
size_t poolUse = mShmemPool.Length() - mPoolFree;
if (poolUse > 0) {
- LOG_VERBOSE(("ShmemPool usage reduced to %" PRIuSIZE " buffers", poolUse));
+ LOG_VERBOSE(("ShmemPool usage reduced to %zu buffers", poolUse));
}
#endif
}
ShmemPool::~ShmemPool()
{
#ifdef DEBUG
for (size_t i = 0; i < mShmemPool.Length(); i++) {
--- a/dom/media/systemservices/ShmemPool.h
+++ b/dom/media/systemservices/ShmemPool.h
@@ -4,17 +4,16 @@
* 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/. */
#ifndef mozilla_ShmemPool_h
#define mozilla_ShmemPool_h
#include "mozilla/ipc/Shmem.h"
#include "mozilla/Mutex.h"
-#include "mozilla/SizePrintfMacros.h"
#undef LOG
#undef LOG_ENABLED
extern mozilla::LazyLogModule gCamerasParentLog;
#define LOG(args) MOZ_LOG(gCamerasParentLog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gCamerasParentLog, mozilla::LogLevel::Debug)
namespace mozilla {
@@ -128,17 +127,17 @@ public:
MOZ_ASSERT(res.mShmem.IsWritable(), "Shmem in Pool is not writable post resize?");
mPoolFree--;
#ifdef DEBUG
size_t poolUse = mShmemPool.Length() - mPoolFree;
if (poolUse > mMaxPoolUse) {
mMaxPoolUse = poolUse;
- LOG(("Maximum ShmemPool use increased: %" PRIuSIZE " buffers", mMaxPoolUse));
+ LOG(("Maximum ShmemPool use increased: %zu buffers", mMaxPoolUse));
}
#endif
return Move(res);
}
private:
Mutex mMutex;
size_t mPoolFree;
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -20,17 +20,16 @@
#include "mozilla/SharedThreadPool.h"
#include "MediaDataDemuxer.h"
#include "nsAutoPtr.h"
#include "nsAutoRef.h"
#include "NesteggPacketHolder.h"
#include "XiphExtradata.h"
#include "prprf.h" // leaving it for PR_vsnprintf()
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include <algorithm>
#include <numeric>
#include <stdint.h>
#define WEBM_DEBUG(arg, ...) MOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, ("WebMDemuxer(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
extern mozilla::LazyLogModule gMediaDemuxerLog;
@@ -719,17 +718,17 @@ WebMDemuxer::GetNextPacket(TrackInfo::Tr
mSharedVideoTrackInfo =
new TrackInfoSharedPtr(mInfo.mVideo, ++sStreamSourceID);
}
mLastSeenFrameSize = Some(dimensions);
}
}
}
- WEBM_DEBUG("push sample tstamp: %" PRId64 " next_tstamp: %" PRId64 " length: %" PRIuSIZE " kf: %d",
+ WEBM_DEBUG("push sample tstamp: %" PRId64 " next_tstamp: %" PRId64 " length: %zu kf: %d",
tstamp, next_tstamp, length, isKeyframe);
RefPtr<MediaRawData> sample;
if (mInfo.mVideo.HasAlpha() && alphaLength != 0) {
sample = new MediaRawData(data, length, alphaData, alphaLength);
if ((length && !sample->Data()) || (alphaLength && !sample->AlphaData())) {
// OOM.
return NS_ERROR_OUT_OF_MEMORY;
}
--- a/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
@@ -1,16 +1,15 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "MediaEngineCameraVideoSource.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include <limits>
namespace mozilla {
using namespace mozilla::gfx;
using namespace mozilla::dom;
@@ -222,17 +221,17 @@ MediaEngineCameraVideoSource::ChooseCapa
const nsString& aDeviceId)
{
if (MOZ_LOG_TEST(GetMediaManagerLog(), LogLevel::Debug)) {
LOG(("ChooseCapability: prefs: %dx%d @%d-%dfps",
aPrefs.GetWidth(), aPrefs.GetHeight(),
aPrefs.mFPS, aPrefs.mMinFPS));
LogConstraints(aConstraints);
if (aConstraints.mAdvanced.size()) {
- LOG(("Advanced array[%" PRIuSIZE "]:", aConstraints.mAdvanced.size()));
+ LOG(("Advanced array[%zu]:", aConstraints.mAdvanced.size()));
for (auto& advanced : aConstraints.mAdvanced) {
LogConstraints(advanced);
}
}
}
size_t num = NumCapabilities();
@@ -252,17 +251,17 @@ MediaEngineCameraVideoSource::ChooseCapa
if (candidate.mDistance == UINT32_MAX) {
candidateSet.RemoveElementAt(i);
} else {
++i;
}
}
if (!candidateSet.Length()) {
- LOG(("failed to find capability match from %" PRIuSIZE " choices",num));
+ LOG(("failed to find capability match from %zu choices",num));
return false;
}
// Filter further with all advanced constraints (that don't overconstrain).
for (const auto &cs : aConstraints.mAdvanced) {
CapabilitySet rejects;
for (size_t i = 0; i < candidateSet.Length();) {
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -621,17 +621,17 @@ MediaEngineWebRTCMicrophoneSource::Inser
if (mState != kStarted) {
return;
}
if (MOZ_LOG_TEST(AudioLogModule(), LogLevel::Debug)) {
mTotalFrames += aFrames;
if (mTotalFrames > mLastLogFrames + mSampleFrequency) { // ~ 1 second
MOZ_LOG(AudioLogModule(), LogLevel::Debug,
- ("%p: Inserting %" PRIuSIZE " samples into graph, total frames = %" PRIu64,
+ ("%p: Inserting %zu samples into graph, total frames = %" PRIu64,
(void*)this, aFrames, mTotalFrames));
mLastLogFrames = mTotalFrames;
}
}
size_t len = mSources.Length();
for (size_t i = 0; i < len; i++) {
if (!mSources[i]) {
--- a/dom/media/webspeech/synth/SpeechSynthesis.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesis.cpp
@@ -2,17 +2,16 @@
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "nsISupportsPrimitives.h"
#include "nsSpeechTask.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/SpeechSynthesisBinding.h"
#include "SpeechSynthesis.h"
#include "nsSynthVoiceRegistry.h"
#include "nsIDocument.h"
@@ -151,17 +150,17 @@ SpeechSynthesis::Speak(SpeechSynthesisUt
AdvanceQueue();
}
}
void
SpeechSynthesis::AdvanceQueue()
{
LOG(LogLevel::Debug,
- ("SpeechSynthesis::AdvanceQueue length=%" PRIuSIZE, mSpeechQueue.Length()));
+ ("SpeechSynthesis::AdvanceQueue length=%zu", mSpeechQueue.Length()));
if (mSpeechQueue.IsEmpty()) {
return;
}
RefPtr<SpeechSynthesisUtterance> utterance = mSpeechQueue.ElementAt(0);
nsAutoString docLang;
--- a/dom/network/UDPSocketChild.cpp
+++ b/dom/network/UDPSocketChild.cpp
@@ -1,16 +1,15 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "UDPSocketChild.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/net/NeckoChild.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/PBackgroundChild.h"
#include "mozilla/ipc/BackgroundUtils.h"
@@ -376,17 +375,17 @@ UDPSocketChild::RecvCallbackClosed()
return IPC_OK();
}
mozilla::ipc::IPCResult
UDPSocketChild::RecvCallbackReceivedData(const UDPAddressInfo& aAddressInfo,
InfallibleTArray<uint8_t>&& aData)
{
- UDPSOCKET_LOG(("%s: %s:%u length %" PRIuSIZE, __FUNCTION__,
+ UDPSOCKET_LOG(("%s: %s:%u length %zu", __FUNCTION__,
aAddressInfo.addr().get(), aAddressInfo.port(), aData.Length()));
nsresult rv = mSocket->CallListenerReceivedData(aAddressInfo.addr(), aAddressInfo.port(),
aData.Elements(), aData.Length());
mozilla::Unused << NS_WARN_IF(NS_FAILED(rv));
return IPC_OK();
}
--- a/dom/presentation/provider/MulticastDNSDeviceProvider.cpp
+++ b/dom/presentation/provider/MulticastDNSDeviceProvider.cpp
@@ -6,17 +6,16 @@
#include "MulticastDNSDeviceProvider.h"
#include "DeviceProviderHelpers.h"
#include "MainThreadUtils.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Logging.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "nsComponentManagerUtils.h"
#include "nsIObserverService.h"
#include "nsIWritablePropertyBag2.h"
#include "nsServiceManagerUtils.h"
#include "nsTCPDeviceInfo.h"
#include "nsThreadUtils.h"
--- a/dom/security/SRICheck.cpp
+++ b/dom/security/SRICheck.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SRICheck.h"
#include "mozilla/Base64.h"
#include "mozilla/LoadTainting.h"
#include "mozilla/Logging.h"
#include "mozilla/Preferences.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/dom/SRILogHelper.h"
#include "mozilla/dom/SRIMetadata.h"
#include "nsContentUtils.h"
#include "nsIChannel.h"
#include "nsIConsoleReportCollector.h"
#include "nsIProtocolHandler.h"
#include "nsIScriptError.h"
#include "nsIIncrementalStreamLoader.h"
@@ -367,17 +366,17 @@ SRICheckDataVerifier::Verify(const SRIMe
{
NS_ENSURE_ARG_POINTER(aReporter);
if (MOZ_LOG_TEST(SRILogHelper::GetSriLog(), mozilla::LogLevel::Debug)) {
nsAutoCString requestURL;
nsCOMPtr<nsIRequest> request;
request = do_QueryInterface(aChannel);
request->GetName(requestURL);
- SRILOG(("SRICheckDataVerifier::Verify, url=%s (length=%" PRIuSIZE ")",
+ SRILOG(("SRICheckDataVerifier::Verify, url=%s (length=%zu)",
requestURL.get(), mBytesHashed));
}
nsresult rv = Finish();
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE);
--- a/dom/security/SRIMetadata.cpp
+++ b/dom/security/SRIMetadata.cpp
@@ -4,17 +4,16 @@
* 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/. */
#include "SRIMetadata.h"
#include "hasht.h"
#include "mozilla/dom/URLSearchParams.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsICryptoHash.h"
static mozilla::LogModule*
GetSriMetadataLog()
{
static mozilla::LazyLogModule gSriMetadataPRLog("SRIMetadata");
return gSriMetadataPRLog;
}
@@ -110,17 +109,17 @@ SRIMetadata::operator+=(const SRIMetadat
{
MOZ_ASSERT(!aOther.IsEmpty() && !IsEmpty());
MOZ_ASSERT(aOther.IsValid() && IsValid());
MOZ_ASSERT(mAlgorithmType == aOther.mAlgorithmType);
// We only pull in the first element of the other metadata
MOZ_ASSERT(aOther.mHashes.Length() == 1);
if (mHashes.Length() < SRIMetadata::MAX_ALTERNATE_HASHES) {
- SRIMETADATALOG(("SRIMetadata::operator+=, appending another '%s' hash (new length=%" PRIuSIZE ")",
+ SRIMETADATALOG(("SRIMetadata::operator+=, appending another '%s' hash (new length=%zu)",
mAlgorithm.get(), mHashes.Length()));
mHashes.AppendElement(aOther.mHashes[0]);
}
MOZ_ASSERT(mHashes.Length() > 1);
MOZ_ASSERT(mHashes.Length() <= SRIMetadata::MAX_ALTERNATE_HASHES);
return *this;
}
--- a/dom/security/nsCSPParser.cpp
+++ b/dom/security/nsCSPParser.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "mozilla/ArrayUtils.h"
#include "mozilla/Preferences.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
#include "nsCSPParser.h"
#include "nsCSPUtils.h"
#include "nsIConsoleService.h"
#include "nsIContentPolicy.h"
#include "nsIScriptError.h"
#include "nsIStringBundle.h"
@@ -874,17 +873,17 @@ void
nsCSPParser::referrerDirectiveValue(nsCSPDirective* aDir)
{
// directive-value = "none" / "none-when-downgrade" / "origin" / "origin-when-cross-origin" / "unsafe-url"
// directive name is token 0, we need to examine the remaining tokens (and
// there should only be one token in the value).
CSPPARSERLOG(("nsCSPParser::referrerDirectiveValue"));
if (mCurDir.Length() != 2) {
- CSPPARSERLOG(("Incorrect number of tokens in referrer directive, got %" PRIuSIZE " expected 1",
+ CSPPARSERLOG(("Incorrect number of tokens in referrer directive, got %zu expected 1",
mCurDir.Length() - 1));
delete aDir;
return;
}
if (!mozilla::net::IsValidReferrerPolicy(mCurDir[1])) {
CSPPARSERLOG(("invalid value for referrer directive: %s",
NS_ConvertUTF16toUTF8(mCurDir[1]).get()));
--- a/dom/u2f/U2F.cpp
+++ b/dom/u2f/U2F.cpp
@@ -7,17 +7,16 @@
#include "hasht.h"
#include "mozilla/dom/CallbackFunction.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/CryptoBuffer.h"
#include "mozilla/dom/NSSU2FTokenRemote.h"
#include "mozilla/dom/U2F.h"
#include "mozilla/Preferences.h"
#include "mozilla/ReentrantMonitor.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsContentUtils.h"
#include "nsINSSU2FToken.h"
#include "nsNetCID.h"
#include "nsNSSComponent.h"
#include "nsThreadUtils.h"
#include "nsURLParsers.h"
#include "nsXPCOMCIDInternal.h"
#include "pk11pub.h"
@@ -657,17 +656,17 @@ U2FRegisterRunnable::Run()
// Treat each call to Promise::All as a work unit, as it completes together
status->WaitGroupAdd();
U2FPrepPromise::All(mEventTarget, prepPromiseList)
->Then(mEventTarget, __func__,
[&status] (const nsTArray<Authenticator>& aTokens) {
MOZ_LOG(gU2FLog, LogLevel::Debug,
- ("ALL: None of the RegisteredKeys were recognized. n=%" PRIuSIZE,
+ ("ALL: None of the RegisteredKeys were recognized. n=%zu",
aTokens.Length()));
status->WaitGroupDone();
},
[&status] (ErrorCode aErrorCode) {
status->Stop(aErrorCode);
status->WaitGroupDone();
});
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -67,17 +67,16 @@
#include "mozilla/dom/SimpleGlobalObject.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/StructuredCloneHolder.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/dom/WorkerDebuggerGlobalScopeBinding.h"
#include "mozilla/dom/WorkerGlobalScopeBinding.h"
#include "mozilla/Preferences.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/ThrottledEventQueue.h"
#include "mozilla/TimelineConsumers.h"
#include "mozilla/WorkerTimelineMarker.h"
#include "nsAlgorithm.h"
#include "nsContentUtils.h"
#include "nsCycleCollector.h"
#include "nsError.h"
#include "nsDOMJSUtils.h"
@@ -6623,17 +6622,17 @@ WorkerPrivate::RescheduleTimeoutTimer(JS
// our code in RunExpiredTimeouts to "fudge" the timeout value will unleash an
// early timeout when we execute the event we're about to queue.
mTimer->Cancel();
double delta =
(mTimeouts[0]->mTargetTime - TimeStamp::Now()).ToMilliseconds();
uint32_t delay = delta > 0 ? std::min(delta, double(UINT32_MAX)) : 0;
- LOG(TimeoutsLog(), ("Worker %p scheduled timer for %d ms, %" PRIuSIZE " pending timeouts\n",
+ LOG(TimeoutsLog(), ("Worker %p scheduled timer for %d ms, %zu pending timeouts\n",
this, delay, mTimeouts.Length()));
nsresult rv = mTimer->InitWithCallback(mTimerRunnable, delay, nsITimer::TYPE_ONE_SHOT);
if (NS_FAILED(rv)) {
JS_ReportErrorASCII(aCx, "Failed to start timer!");
return false;
}
--- a/gfx/layers/apz/src/GestureEventListener.cpp
+++ b/gfx/layers/apz/src/GestureEventListener.cpp
@@ -7,17 +7,16 @@
#include "GestureEventListener.h"
#include <math.h> // for fabsf
#include <stddef.h> // for size_t
#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "InputBlockState.h" // for TouchBlockState
#include "base/task.h" // for CancelableTask, etc
#include "gfxPrefs.h" // for gfxPrefs
#include "InputBlockState.h" // for TouchBlockState
-#include "mozilla/SizePrintfMacros.h" // for PRIuSIZE
#include "nsDebug.h" // for NS_WARNING
#include "nsMathUtils.h" // for NS_hypot
#define GEL_LOG(...)
// #define GEL_LOG(...) printf_stderr("GEL: " __VA_ARGS__)
namespace mozilla {
namespace layers {
@@ -90,17 +89,17 @@ GestureEventListener::GestureEventListen
}
GestureEventListener::~GestureEventListener()
{
}
nsEventStatus GestureEventListener::HandleInputEvent(const MultiTouchInput& aEvent)
{
- GEL_LOG("Receiving event type %d with %" PRIuSIZE " touches in state %d\n", aEvent.mType, aEvent.mTouches.Length(), mState);
+ GEL_LOG("Receiving event type %d with %zu touches in state %d\n", aEvent.mType, aEvent.mTouches.Length(), mState);
nsEventStatus rv = nsEventStatus_eIgnore;
// Cache the current event since it may become the single or long tap that we
// send.
mLastTouchInput = aEvent;
switch (aEvent.mType) {
--- a/gfx/layers/apz/src/InputBlockState.cpp
+++ b/gfx/layers/apz/src/InputBlockState.cpp
@@ -4,17 +4,16 @@
* 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/. */
#include "InputBlockState.h"
#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "AsyncScrollBase.h" // for kScrollSeriesTimeoutMs
#include "gfxPrefs.h" // for gfxPrefs
#include "mozilla/MouseEvents.h"
-#include "mozilla/SizePrintfMacros.h" // for PRIuSIZE
#include "mozilla/Telemetry.h" // for Telemetry
#include "mozilla/layers/APZCTreeManager.h" // for AllowedTouchBehavior
#include "OverscrollHandoffState.h"
#include "QueuedInput.h"
#define TBS_LOG(...)
// #define TBS_LOG(...) printf_stderr("TBS: " __VA_ARGS__)
@@ -655,17 +654,17 @@ TouchBlockState::TouchBlockState(const R
}
bool
TouchBlockState::SetAllowedTouchBehaviors(const nsTArray<TouchBehaviorFlags>& aBehaviors)
{
if (mAllowedTouchBehaviorSet) {
return false;
}
- TBS_LOG("%p got allowed touch behaviours for %" PRIuSIZE " points\n", this, aBehaviors.Length());
+ TBS_LOG("%p got allowed touch behaviours for %zu points\n", this, aBehaviors.Length());
mAllowedTouchBehaviors.AppendElements(aBehaviors);
mAllowedTouchBehaviorSet = true;
return true;
}
bool
TouchBlockState::GetAllowedTouchBehaviors(nsTArray<TouchBehaviorFlags>& aOutBehaviors) const
{
--- a/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp
+++ b/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp
@@ -67,17 +67,17 @@ protected:
SetScrollHandoff(layers[1], layers[0]);
SetScrollHandoff(layers[3], layers[0]);
SetScrollHandoff(layers[2], layers[1]);
SetScrollHandoff(layers[4], layers[3]);
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, 0, root, mcc);
manager->UpdateHitTestingTree(0, root, false, 0, 0);
}
- // Creates a layer tree with a parent layer that is only scrollable
+ // Creates a layer tree with a parent layer that is only scrollable
// horizontally, and a child layer that is only scrollable vertically.
void CreateScrollHandoffLayerTree4() {
const char* layerTreeSyntax = "c(t)";
nsIntRegion layerVisibleRegion[] = {
nsIntRegion(IntRect(0, 0, 100, 100)),
nsIntRegion(IntRect(0, 0, 100, 100))
};
root = CreateLayerTree(layerTreeSyntax, layerVisibleRegion, nullptr, lm, layers);
--- a/gfx/layers/ipc/LayerTransactionParent.cpp
+++ b/gfx/layers/ipc/LayerTransactionParent.cpp
@@ -23,17 +23,16 @@
#include "mozilla/layers/ImageBridgeParent.h" // for ImageBridgeParent
#include "mozilla/layers/ImageLayerComposite.h"
#include "mozilla/layers/LayerManagerComposite.h"
#include "mozilla/layers/LayersMessages.h" // for EditReply, etc
#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_LOG
#include "mozilla/layers/TextureHostOGL.h" // for TextureHostOGL
#include "mozilla/layers/PaintedLayerComposite.h"
#include "mozilla/mozalloc.h" // for operator delete, etc
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "nsCoord.h" // for NSAppUnitsToFloatPixels
#include "nsDebug.h" // for NS_RUNTIMEABORT
#include "nsISupportsImpl.h" // for Layer::Release, etc
#include "nsLayoutUtils.h" // for nsLayoutUtils
#include "nsMathUtils.h" // for NS_round
#include "nsPoint.h" // for nsPoint
#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc
@@ -170,17 +169,17 @@ LayerTransactionParent::RecvInitReadLock
mozilla::ipc::IPCResult
LayerTransactionParent::RecvUpdate(const TransactionInfo& aInfo)
{
AutoProfilerTracing tracing("Paint", "LayerTransaction");
AUTO_PROFILER_LABEL("LayerTransactionParent::RecvUpdate", GRAPHICS);
TimeStamp updateStart = TimeStamp::Now();
- MOZ_LAYERS_LOG(("[ParentSide] received txn with %" PRIuSIZE " edits", aInfo.cset().Length()));
+ MOZ_LAYERS_LOG(("[ParentSide] received txn with %zu edits", aInfo.cset().Length()));
UpdateFwdTransactionId(aInfo.fwdTransactionId());
AutoClearReadLocks clearLocks(mReadLocks);
if (mDestroyed || !layer_manager() || layer_manager()->IsDestroyed()) {
for (const auto& op : aInfo.toDestroy()) {
DestroyActor(op);
}
--- a/gfx/skia/skia/src/pathops/SkPathOpsDebug.cpp
+++ b/gfx/skia/skia/src/pathops/SkPathOpsDebug.cpp
@@ -58,19 +58,19 @@ bool SkPathOpsDebug::ChaseContains(const
const SkOpSpanBase* entry = chaseArray[index];
if (entry == span) {
return true;
}
}
return false;
}
#endif
-
-#if DEBUG_ACTIVE_SPANS
-SkString SkPathOpsDebug::gActiveSpans;
+
+#if DEBUG_ACTIVE_SPANS
+SkString SkPathOpsDebug::gActiveSpans;
#endif
#if DEBUG_COIN
SkPathOpsDebug::CoinDict SkPathOpsDebug::gCoinSumChangedDict;
SkPathOpsDebug::CoinDict SkPathOpsDebug::gCoinSumVisitedDict;
static const int kGlitchType_Count = SkPathOpsDebug::kUnalignedTail_Glitch + 1;
@@ -328,25 +328,25 @@ void SkOpGlobalState::debugAddToCoinChan
void SkPathOpsDebug::ShowActiveSpans(SkOpContourHead* contourList) {
#if DEBUG_ACTIVE_SPANS
SkString str;
SkOpContour* contour = contourList;
do {
contour->debugShowActiveSpans(&str);
} while ((contour = contour->next()));
- if (!gActiveSpans.equals(str)) {
- const char* s = str.c_str();
- const char* end;
- while ((end = strchr(s, '\n'))) {
- SkDebugf("%.*s", end - s + 1, s);
- s = end + 1;
- }
- gActiveSpans.set(str);
- }
+ if (!gActiveSpans.equals(str)) {
+ const char* s = str.c_str();
+ const char* end;
+ while ((end = strchr(s, '\n'))) {
+ SkDebugf("%.*s", end - s + 1, s);
+ s = end + 1;
+ }
+ gActiveSpans.set(str);
+ }
#endif
}
#if DEBUG_COINCIDENCE || DEBUG_COIN
void SkPathOpsDebug::CheckHealth(SkOpContourHead* contourList) {
#if DEBUG_COINCIDENCE
contourList->globalState()->debugSetCheckHealth(true);
#endif
--- a/gfx/thebes/gfxFcPlatformFontList.cpp
+++ b/gfx/thebes/gfxFcPlatformFontList.cpp
@@ -1,15 +1,14 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "gfxFcPlatformFontList.h"
#include "gfxFont.h"
#include "gfxFontConstants.h"
#include "gfxFontFamilyList.h"
#include "gfxFT2Utils.h"
#include "gfxPlatform.h"
#include "mozilla/ArrayUtils.h"
@@ -377,17 +376,17 @@ gfxFontconfigFontEntry::ReadCMAP(FontInf
if (mHasCmapTable) {
gfxPlatformFontList *pfl = gfxPlatformFontList::PlatformFontList();
mCharacterMap = pfl->FindCharMap(charmap);
} else {
// if error occurred, initialize to null cmap
mCharacterMap = new gfxCharacterMap();
}
- LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %" PRIuSIZE " hash: %8.8x%s\n",
+ LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %zu hash: %8.8x%s\n",
NS_ConvertUTF16toUTF8(mName).get(),
charmap->SizeOfIncludingThis(moz_malloc_size_of),
charmap->mHash, mCharacterMap == charmap ? " new" : ""));
if (LOG_CMAPDATA_ENABLED()) {
char prefix[256];
SprintfLiteral(prefix, "(cmapdata) name: %.220s",
NS_ConvertUTF16toUTF8(mName).get());
charmap->Dump(prefix, eGfxLog_cmapdata);
--- a/gfx/thebes/gfxMacPlatformFontList.mm
+++ b/gfx/thebes/gfxMacPlatformFontList.mm
@@ -60,17 +60,16 @@
#include "nsCharTraits.h"
#include "nsCocoaFeatures.h"
#include "nsCocoaUtils.h"
#include "gfxFontConstants.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "mozilla/Telemetry.h"
#include "mozilla/gfx/2D.h"
#include <unistd.h>
#include <time.h>
#include <dlfcn.h>
@@ -231,17 +230,17 @@ MacOSFontEntry::ReadCMAP(FontInfoData *a
if (mHasCmapTable) {
gfxPlatformFontList *pfl = gfxPlatformFontList::PlatformFontList();
mCharacterMap = pfl->FindCharMap(charmap);
} else {
// if error occurred, initialize to null cmap
mCharacterMap = new gfxCharacterMap();
}
- LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %" PRIuSIZE " hash: %8.8x%s\n",
+ LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %zu hash: %8.8x%s\n",
NS_ConvertUTF16toUTF8(mName).get(),
charmap->SizeOfIncludingThis(moz_malloc_size_of),
charmap->mHash, mCharacterMap == charmap ? " new" : ""));
if (LOG_CMAPDATA_ENABLED()) {
char prefix[256];
SprintfLiteral(prefix, "(cmapdata) name: %.220s",
NS_ConvertUTF16toUTF8(mName).get());
charmap->Dump(prefix, eGfxLog_cmapdata);
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "gfxTextRun.h"
#include "gfxGlyphExtents.h"
#include "gfxPlatformFontList.h"
#include "gfxUserFontSet.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/PathHelpers.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "gfxContext.h"
#include "gfxFontConstants.h"
#include "gfxFontMissingGlyphs.h"
#include "gfxScriptItemizer.h"
#include "nsUnicodeProperties.h"
#include "nsUnicodeRange.h"
@@ -2419,17 +2418,17 @@ gfxFontGroup::InitTextRun(DrawTarget* aD
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Warning))) {
nsAutoCString lang;
mStyle.language->ToUTF8String(lang);
nsAutoString families;
mFamilyList.ToString(families);
nsAutoCString str((const char*)aString, aLength);
MOZ_LOG(log, LogLevel::Warning,\
("(%s) fontgroup: [%s] default: %s lang: %s script: %d "
- "len %d weight: %d width: %d style: %s size: %6.2f %" PRIuSIZE "-byte "
+ "len %d weight: %d width: %d style: %s size: %6.2f %zu-byte "
"TEXTRUN [%s] ENDTEXTRUN\n",
(mStyle.systemFont ? "textrunui" : "textrun"),
NS_ConvertUTF16toUTF8(families).get(),
(mFamilyList.GetDefaultFontType() == eFamily_serif ?
"serif" :
(mFamilyList.GetDefaultFontType() == eFamily_sans_serif ?
"sans-serif" : "none")),
lang.get(), static_cast<int>(Script::LATIN), aLength,
@@ -2468,17 +2467,17 @@ gfxFontGroup::InitTextRun(DrawTarget* aD
nsAutoCString lang;
mStyle.language->ToUTF8String(lang);
nsAutoString families;
mFamilyList.ToString(families);
uint32_t runLen = runLimit - runStart;
MOZ_LOG(log, LogLevel::Warning,\
("(%s) fontgroup: [%s] default: %s lang: %s script: %d "
"len %d weight: %d width: %d style: %s size: %6.2f "
- "%" PRIuSIZE "-byte TEXTRUN [%s] ENDTEXTRUN\n",
+ "%zu-byte TEXTRUN [%s] ENDTEXTRUN\n",
(mStyle.systemFont ? "textrunui" : "textrun"),
NS_ConvertUTF16toUTF8(families).get(),
(mFamilyList.GetDefaultFontType() == eFamily_serif ?
"serif" :
(mFamilyList.GetDefaultFontType() == eFamily_sans_serif ?
"sans-serif" : "none")),
lang.get(), static_cast<int>(runScript), runLen,
uint32_t(mStyle.weight), uint32_t(mStyle.stretch),
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -8,17 +8,16 @@
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/Logging.h"
#include "mozilla/Move.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
#include "nsAppRunner.h"
#include "nsAutoPtr.h"
#include "nsDebug.h"
#include "nsISupportsImpl.h"
#include "nsContentUtils.h"
@@ -2748,21 +2747,21 @@ MessageChannel::DebugAbort(const char* f
printf_stderr("###!!! [MessageChannel][%s][%s:%d] "
"Assertion (%s) failed. %s %s\n",
mSide == ChildSide ? "Child" : "Parent",
file, line, cond,
why,
reply ? "(reply)" : "");
// technically we need the mutex for this, but we're dying anyway
DumpInterruptStack(" ");
- printf_stderr(" remote Interrupt stack guess: %" PRIuSIZE "\n",
+ printf_stderr(" remote Interrupt stack guess: %zu\n",
mRemoteStackDepthGuess);
- printf_stderr(" deferred stack size: %" PRIuSIZE "\n",
+ printf_stderr(" deferred stack size: %zu\n",
mDeferred.size());
- printf_stderr(" out-of-turn Interrupt replies stack size: %" PRIuSIZE "\n",
+ printf_stderr(" out-of-turn Interrupt replies stack size: %zu\n",
mOutOfTurnReplies.size());
MessageQueue pending = Move(mPending);
while (!pending.isEmpty()) {
printf_stderr(" [ %s%s ]\n",
pending.getFirst()->Msg().is_interrupt() ? "intr" :
(pending.getFirst()->Msg().is_sync() ? "sync" : "async"),
pending.getFirst()->Msg().is_reply() ? "reply" : "");
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -318,17 +318,17 @@ GC(JSContext* cx, unsigned argc, Value*
else
JS::PrepareForFullGC(cx);
JSGCInvocationKind gckind = shrinking ? GC_SHRINK : GC_NORMAL;
JS::GCForReason(cx, gckind, JS::gcreason::API);
char buf[256] = { '\0' };
#ifndef JS_MORE_DETERMINISTIC
- SprintfLiteral(buf, "before %" PRIuSIZE ", after %" PRIuSIZE "\n",
+ SprintfLiteral(buf, "before %zu, after %zu\n",
preBytes, cx->runtime()->gc.usage.gcBytes());
#endif
JSString* str = JS_NewStringCopyZ(cx, buf);
if (!str)
return false;
args.rval().setString(str);
return true;
}
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "ctypes/CTypes.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "mozilla/Vector.h"
#include <limits>
#include <math.h>
#include <stdint.h>
#if defined(XP_WIN)
@@ -1466,17 +1465,17 @@ static bool
FieldDescriptorCountError(JSContext* cx, HandleValue typeVal, size_t length)
{
JSAutoByteString valBytes;
const char* valStr = CTypesToSourceForError(cx, typeVal, valBytes);
if (!valStr)
return false;
char lengthStr[16];
- SprintfLiteral(lengthStr, "%" PRIuSIZE, length);
+ SprintfLiteral(lengthStr, "%zu", length);
JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr,
CTYPESMSG_FIELD_DESC_COUNT, valStr, lengthStr);
return false;
}
static bool
FieldDescriptorNameError(JSContext* cx, HandleId id)
@@ -1730,20 +1729,20 @@ InvalidIndexError(JSContext* cx, HandleI
RootedValue idVal(cx, IdToValue(id));
return InvalidIndexError(cx, idVal);
}
static bool
InvalidIndexRangeError(JSContext* cx, size_t index, size_t length)
{
char indexStr[16];
- SprintfLiteral(indexStr, "%" PRIuSIZE, index);
+ SprintfLiteral(indexStr, "%zu", index);
char lengthStr[16];
- SprintfLiteral(lengthStr,"%" PRIuSIZE, length);
+ SprintfLiteral(lengthStr,"%zu", length);
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
CTYPESMSG_INVALID_RANGE, indexStr, lengthStr);
return false;
}
static bool
NonPrimitiveError(JSContext* cx, HandleObject typeObj)
@@ -1890,18 +1889,18 @@ SizeMismatchCastError(JSContext* cx,
BuildTypeSource(cx, targetTypeObj, true, targetTypeSource);
const char* targetTypeStr = EncodeLatin1(cx, targetTypeSource,
targetTypeBytes);
if (!targetTypeStr)
return false;
char sourceSizeStr[16];
char targetSizeStr[16];
- SprintfLiteral(sourceSizeStr, "%" PRIuSIZE, sourceSize);
- SprintfLiteral(targetSizeStr, "%" PRIuSIZE, targetSize);
+ SprintfLiteral(sourceSizeStr, "%zu", sourceSize);
+ SprintfLiteral(targetSizeStr, "%zu", targetSize);
JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr,
CTYPESMSG_SIZE_MISMATCH_CAST,
targetTypeStr, sourceTypeStr,
targetSizeStr, sourceSizeStr);
return false;
}
@@ -6314,17 +6313,17 @@ StructType::ConstructData(JSContext* cx,
}
return true;
}
size_t count = fields->count();
if (count >= 2) {
char fieldLengthStr[32];
- SprintfLiteral(fieldLengthStr, "0, 1, or %" PRIuSIZE, count);
+ SprintfLiteral(fieldLengthStr, "0, 1, or %zu", count);
return ArgumentLengthError(cx, "StructType constructor", fieldLengthStr,
"s");
}
return ArgumentLengthError(cx, "StructType constructor", "at most one", "");
}
const FieldInfoHash*
StructType::GetFieldInfo(JSObject* obj)
--- a/js/src/gc/Tracer.cpp
+++ b/js/src/gc/Tracer.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "gc/Tracer.h"
#include "mozilla/DebugOnly.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jsapi.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsprf.h"
#include "jsscript.h"
#include "jsutil.h"
#include "NamespaceImports.h"
@@ -91,17 +90,17 @@ void
JS::CallbackTracer::getTracingEdgeName(char* buffer, size_t bufferSize)
{
MOZ_ASSERT(bufferSize > 0);
if (contextFunctor_) {
(*contextFunctor_)(this, buffer, bufferSize);
return;
}
if (contextIndex_ != InvalidIndex) {
- snprintf(buffer, bufferSize, "%s[%" PRIuSIZE "]", contextName_, contextIndex_);
+ snprintf(buffer, bufferSize, "%s[%zu]", contextName_, contextIndex_);
return;
}
snprintf(buffer, bufferSize, "%s", contextName_);
}
/*** Public Tracing API **************************************************************************/
@@ -419,40 +418,40 @@ JS_GetTraceThingInfo(char* buf, size_t b
snprintf(buf, bufsize, " <no private>");
}
break;
}
case JS::TraceKind::Script:
{
JSScript* script = static_cast<JSScript*>(thing);
- snprintf(buf, bufsize, " %s:%" PRIuSIZE, script->filename(), script->lineno());
+ snprintf(buf, bufsize, " %s:%zu", script->filename(), script->lineno());
break;
}
case JS::TraceKind::String:
{
*buf++ = ' ';
bufsize--;
JSString* str = (JSString*)thing;
if (str->isLinear()) {
const char* header = StringKindHeader(str);
bool willFit = str->length() + strlen("<length > ") + strlen(header) +
CountDecimalDigits(str->length()) < bufsize;
- n = snprintf(buf, bufsize, "<%slength %" PRIuSIZE "%s> ",
+ n = snprintf(buf, bufsize, "<%slength %zu%s> ",
header, str->length(),
willFit ? "" : " (truncated)");
buf += n;
bufsize -= n;
PutEscapedString(buf, bufsize, &str->asLinear(), 0);
} else {
- snprintf(buf, bufsize, "<rope: length %" PRIuSIZE ">", str->length());
+ snprintf(buf, bufsize, "<rope: length %zu>", str->length());
}
break;
}
case JS::TraceKind::Symbol:
{
JS::Symbol* sym = static_cast<JS::Symbol*>(thing);
if (JSString* desc = sym->description()) {
--- a/js/src/gc/Verifier.cpp
+++ b/js/src/gc/Verifier.cpp
@@ -605,17 +605,17 @@ CheckHeapTracer::checkCell(Cell* cell)
void
CheckHeapTracer::check(AutoLockForExclusiveAccess& lock)
{
if (!traceHeap(lock))
return;
if (failures)
- fprintf(stderr, "Heap check: %" PRIuSIZE " failure(s)\n", failures);
+ fprintf(stderr, "Heap check: %zu failure(s)\n", failures);
MOZ_RELEASE_ASSERT(failures == 0);
}
void
js::gc::CheckHeapAfterGC(JSRuntime* rt)
{
AutoTraceSession session(rt, JS::HeapState::Tracing);
CheckHeapTracer tracer(rt);
--- a/js/src/jit/BacktrackingAllocator.cpp
+++ b/js/src/jit/BacktrackingAllocator.cpp
@@ -1240,17 +1240,17 @@ BacktrackingAllocator::tryAllocateNonFix
MOZ_ASSERT(!*success);
return true;
}
bool
BacktrackingAllocator::processBundle(MIRGenerator* mir, LiveBundle* bundle)
{
if (JitSpewEnabled(JitSpew_RegAlloc)) {
- JitSpew(JitSpew_RegAlloc, "Allocating %s [priority %" PRIuSIZE "] [weight %" PRIuSIZE "]",
+ JitSpew(JitSpew_RegAlloc, "Allocating %s [priority %zu] [weight %zu]",
bundle->toString().get(), computePriority(bundle), computeSpillWeight(bundle));
}
// A bundle can be processed by doing any of the following:
//
// - Assigning the bundle a register. The bundle cannot overlap any other
// bundle allocated for that physical register.
//
@@ -1432,23 +1432,23 @@ BacktrackingAllocator::tryAllocateRegist
// case of multiple conflicting sets keep track of the set with the
// lowest maximum spill weight.
// The #ifdef guards against "unused variable 'existing'" bustage.
#ifdef JS_JITSPEW
if (JitSpewEnabled(JitSpew_RegAlloc)) {
if (aliasedConflicting.length() == 1) {
LiveBundle* existing = aliasedConflicting[0];
- JitSpew(JitSpew_RegAlloc, " %s collides with %s [weight %" PRIuSIZE "]",
+ JitSpew(JitSpew_RegAlloc, " %s collides with %s [weight %zu]",
r.reg.name(), existing->toString().get(), computeSpillWeight(existing));
} else {
JitSpew(JitSpew_RegAlloc, " %s collides with the following", r.reg.name());
for (size_t i = 0; i < aliasedConflicting.length(); i++) {
LiveBundle* existing = aliasedConflicting[i];
- JitSpew(JitSpew_RegAlloc, " %s [weight %" PRIuSIZE "]",
+ JitSpew(JitSpew_RegAlloc, " %s [weight %zu]",
existing->toString().get(), computeSpillWeight(existing));
}
}
}
#endif
if (conflicting.empty()) {
if (!conflicting.appendAll(aliasedConflicting))
@@ -1477,17 +1477,17 @@ BacktrackingAllocator::tryAllocateRegist
*success = true;
return true;
}
bool
BacktrackingAllocator::evictBundle(LiveBundle* bundle)
{
if (JitSpewEnabled(JitSpew_RegAlloc)) {
- JitSpew(JitSpew_RegAlloc, " Evicting %s [priority %" PRIuSIZE "] [weight %" PRIuSIZE "]",
+ JitSpew(JitSpew_RegAlloc, " Evicting %s [priority %zu] [weight %zu]",
bundle->toString().get(), computePriority(bundle), computeSpillWeight(bundle));
}
AnyRegister reg(bundle->allocation().toRegister());
PhysicalRegister& physical = registers[reg.code()];
MOZ_ASSERT(physical.reg == reg && physical.allocatable);
for (LiveRange::BundleLinkIterator iter = bundle->rangesBegin(); iter; iter++) {
--- a/js/src/jit/BaselineBailouts.cpp
+++ b/js/src/jit/BaselineBailouts.cpp
@@ -1,16 +1,15 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jsprf.h"
#include "jsutil.h"
#include "jit/arm/Simulator-arm.h"
#include "jit/BaselineFrame.h"
#include "jit/BaselineIC.h"
#include "jit/BaselineJIT.h"
#include "jit/CompileInfo.h"
@@ -229,21 +228,21 @@ struct BaselineStackBuilder
}
MOZ_MUST_USE bool writeWord(size_t w, const char* info) {
if (!write<size_t>(w))
return false;
if (info) {
if (sizeof(size_t) == 4) {
JitSpew(JitSpew_BaselineBailouts,
- " WRITE_WRD %p/%p %-15s %08" PRIxSIZE,
+ " WRITE_WRD %p/%p %-15s %08zx",
header_->copyStackBottom, virtualPointerAtStackOffset(0), info, w);
} else {
JitSpew(JitSpew_BaselineBailouts,
- " WRITE_WRD %p/%p %-15s %016" PRIxSIZE,
+ " WRITE_WRD %p/%p %-15s %016zx",
header_->copyStackBottom, virtualPointerAtStackOffset(0), info, w);
}
}
return true;
}
MOZ_MUST_USE bool writeValue(const Value& val, const char* info) {
if (!write<Value>(val))
@@ -671,17 +670,17 @@ InitFromBailout(JSContext* cx, HandleScr
// +---------------+
// | StackS |
// +---------------+ --- IF NOT LAST INLINE FRAME,
// | Descr(BLJS) | --- CALLING INFO STARTS HERE
// +---------------+
// | ReturnAddr | <-- return into main jitcode after IC
// +===============+
- JitSpew(JitSpew_BaselineBailouts, " Unpacking %s:%" PRIuSIZE, script->filename(), script->lineno());
+ JitSpew(JitSpew_BaselineBailouts, " Unpacking %s:%zu", script->filename(), script->lineno());
JitSpew(JitSpew_BaselineBailouts, " [BASELINE-JS FRAME]");
// Calculate and write the previous frame pointer value.
// Record the virtual stack offset at this location. Later on, if we end up
// writing out a BaselineStub frame for the next callee, we'll need to save the
// address.
void* prevFramePtr = builder.calculatePrevFramePtr();
if (!builder.writePtr(prevFramePtr, "PrevFramePtr"))
@@ -817,17 +816,17 @@ InitFromBailout(JSContext* cx, HandleScr
Value thisv = iter.read();
JitSpew(JitSpew_BaselineBailouts, " Is function!");
JitSpew(JitSpew_BaselineBailouts, " thisv=%016" PRIx64, *((uint64_t*) &thisv));
size_t thisvOffset = builder.framePushed() + JitFrameLayout::offsetOfThis();
builder.valuePointerAtStackOffset(thisvOffset).set(thisv);
MOZ_ASSERT(iter.numAllocations() >= CountArgSlots(script, fun));
- JitSpew(JitSpew_BaselineBailouts, " frame slots %u, nargs %" PRIuSIZE ", nfixed %" PRIuSIZE,
+ JitSpew(JitSpew_BaselineBailouts, " frame slots %u, nargs %zu, nfixed %zu",
iter.numAllocations(), fun->nargs(), script->nfixed());
if (!callerPC) {
// This is the first frame. Store the formals in a Vector until we
// are done. Due to UCE and phi elimination, we could store an
// UndefinedValue() here for formals we think are unused, but
// locals may still reference the original argument slot
// (MParameter/LArgument) and expect the original Value.
@@ -1058,17 +1057,17 @@ InitFromBailout(JSContext* cx, HandleScr
// arguments in the slots and not be 4.
MOZ_ASSERT(exprStackSlots == expectedDepth);
}
}
}
#endif
#ifdef JS_JITSPEW
- JitSpew(JitSpew_BaselineBailouts, " Resuming %s pc offset %d (op %s) (line %d) of %s:%" PRIuSIZE,
+ JitSpew(JitSpew_BaselineBailouts, " Resuming %s pc offset %d (op %s) (line %d) of %s:%zu",
resumeAfter ? "after" : "at", (int) pcOff, CodeName[op],
PCToLineNumber(script, pc), script->filename(), script->lineno());
JitSpew(JitSpew_BaselineBailouts, " Bailout kind: %s",
BailoutKindString(bailoutKind));
#endif
bool pushedNewTarget = IsConstructorCallPC(pc);
@@ -1227,17 +1226,17 @@ InitFromBailout(JSContext* cx, HandleScr
if (filename == nullptr)
filename = "<unknown>";
unsigned len = strlen(filename) + 200;
char* buf = js_pod_malloc<char>(len);
if (buf == nullptr) {
ReportOutOfMemory(cx);
return false;
}
- snprintf(buf, len, "%s %s %s on line %u of %s:%" PRIuSIZE,
+ snprintf(buf, len, "%s %s %s on line %u of %s:%zu",
BailoutKindString(bailoutKind),
resumeAfter ? "after" : "at",
CodeName[op],
PCToLineNumber(script, pc),
filename,
script->lineno());
cx->runtime()->geckoProfiler().markEvent(buf);
js_free(buf);
@@ -1544,17 +1543,17 @@ jit::BailoutIonToBaseline(JSContext* cx,
// +---------------+
// | ReturnAddr |
// +---------------+
// | ||||| | <---- Overwrite starting here.
// | ||||| |
// | ||||| |
// +---------------+
- JitSpew(JitSpew_BaselineBailouts, "Bailing to baseline %s:%" PRIuSIZE " (IonScript=%p) (FrameType=%d)",
+ JitSpew(JitSpew_BaselineBailouts, "Bailing to baseline %s:%zu (IonScript=%p) (FrameType=%d)",
iter.script()->filename(), iter.script()->lineno(), (void*) iter.ionScript(),
(int) prevFrameType);
bool catchingException;
bool propagatingExceptionForDebugMode;
if (excInfo) {
catchingException = excInfo->catchingException();
propagatingExceptionForDebugMode = excInfo->propagatingIonExceptionForDebugMode();
@@ -1564,17 +1563,17 @@ jit::BailoutIonToBaseline(JSContext* cx,
if (propagatingExceptionForDebugMode)
JitSpew(JitSpew_BaselineBailouts, "Resuming in-place for debug mode");
} else {
catchingException = false;
propagatingExceptionForDebugMode = false;
}
- JitSpew(JitSpew_BaselineBailouts, " Reading from snapshot offset %u size %" PRIuSIZE,
+ JitSpew(JitSpew_BaselineBailouts, " Reading from snapshot offset %u size %zu",
iter.snapshotOffset(), iter.ionScript()->snapshotsListSize());
if (!excInfo)
iter.ionScript()->incNumBailouts();
iter.script()->updateBaselineOrIonRaw(cx->runtime());
// Allocate buffer to hold stack replacement data.
BaselineStackBuilder builder(iter, 1024);
@@ -1592,17 +1591,17 @@ jit::BailoutIonToBaseline(JSContext* cx,
#ifdef TRACK_SNAPSHOTS
snapIter.spewBailingFrom();
#endif
RootedFunction callee(cx, iter.maybeCallee());
RootedScript scr(cx, iter.script());
if (callee) {
- JitSpew(JitSpew_BaselineBailouts, " Callee function (%s:%" PRIuSIZE ")",
+ JitSpew(JitSpew_BaselineBailouts, " Callee function (%s:%zu)",
scr->filename(), scr->lineno());
} else {
JitSpew(JitSpew_BaselineBailouts, " No callee!");
}
if (iter.isConstructing())
JitSpew(JitSpew_BaselineBailouts, " Constructing!");
else
@@ -1627,17 +1626,17 @@ jit::BailoutIonToBaseline(JSContext* cx,
// TraceLogger doesn't create entries for inlined frames. But we
// see them in Baseline. Here we create the start events of those
// entries. So they correspond to what we will see in Baseline.
TraceLoggerEvent scriptEvent(TraceLogger_Scripts, scr);
TraceLogStartEvent(logger, scriptEvent);
TraceLogStartEvent(logger, TraceLogger_Baseline);
}
- JitSpew(JitSpew_BaselineBailouts, " FrameNo %" PRIuSIZE, frameNo);
+ JitSpew(JitSpew_BaselineBailouts, " FrameNo %zu", frameNo);
// If we are bailing out to a catch or finally block in this frame,
// pass excInfo to InitFromBailout and don't unpack any other frames.
bool handleException = (catchingException && excInfo->frameNo() == frameNo);
// We also need to pass excInfo if we're bailing out in place for
// debug mode.
bool passExcInfo = handleException || propagatingExceptionForDebugMode;
@@ -1724,57 +1723,57 @@ InvalidateAfterBailout(JSContext* cx, Ha
JitSpew(JitSpew_BaselineBailouts, "Invalidating due to %s", reason);
Invalidate(cx, outerScript);
}
static void
HandleBoundsCheckFailure(JSContext* cx, HandleScript outerScript, HandleScript innerScript)
{
- JitSpew(JitSpew_IonBailouts, "Bounds check failure %s:%" PRIuSIZE ", inlined into %s:%" PRIuSIZE,
+ JitSpew(JitSpew_IonBailouts, "Bounds check failure %s:%zu, inlined into %s:%zu",
innerScript->filename(), innerScript->lineno(),
outerScript->filename(), outerScript->lineno());
if (!innerScript->failedBoundsCheck())
innerScript->setFailedBoundsCheck();
InvalidateAfterBailout(cx, outerScript, "bounds check failure");
if (innerScript->hasIonScript())
Invalidate(cx, innerScript);
}
static void
HandleShapeGuardFailure(JSContext* cx, HandleScript outerScript, HandleScript innerScript)
{
- JitSpew(JitSpew_IonBailouts, "Shape guard failure %s:%" PRIuSIZE ", inlined into %s:%" PRIuSIZE,
+ JitSpew(JitSpew_IonBailouts, "Shape guard failure %s:%zu, inlined into %s:%zu",
innerScript->filename(), innerScript->lineno(),
outerScript->filename(), outerScript->lineno());
// TODO: Currently this mimic's Ion's handling of this case. Investigate setting
// the flag on innerScript as opposed to outerScript, and maybe invalidating both
// inner and outer scripts, instead of just the outer one.
outerScript->setFailedShapeGuard();
InvalidateAfterBailout(cx, outerScript, "shape guard failure");
}
static void
HandleBaselineInfoBailout(JSContext* cx, HandleScript outerScript, HandleScript innerScript)
{
- JitSpew(JitSpew_IonBailouts, "Baseline info failure %s:%" PRIuSIZE ", inlined into %s:%" PRIuSIZE,
+ JitSpew(JitSpew_IonBailouts, "Baseline info failure %s:%zu, inlined into %s:%zu",
innerScript->filename(), innerScript->lineno(),
outerScript->filename(), outerScript->lineno());
InvalidateAfterBailout(cx, outerScript, "invalid baseline info");
}
static void
HandleLexicalCheckFailure(JSContext* cx, HandleScript outerScript, HandleScript innerScript)
{
- JitSpew(JitSpew_IonBailouts, "Lexical check failure %s:%" PRIuSIZE ", inlined into %s:%" PRIuSIZE,
+ JitSpew(JitSpew_IonBailouts, "Lexical check failure %s:%zu, inlined into %s:%zu",
innerScript->filename(), innerScript->lineno(),
outerScript->filename(), outerScript->lineno());
if (!innerScript->failedLexicalCheck())
innerScript->setFailedLexicalCheck();
InvalidateAfterBailout(cx, outerScript, "lexical check failure");
if (innerScript->hasIonScript())
@@ -1807,17 +1806,17 @@ CopyFromRematerializedFrame(JSContext* c
*frame->valueSlot(i) = rematFrame->locals()[i];
frame->setReturnValue(rematFrame->returnValue());
if (rematFrame->hasCachedSavedFrame())
frame->setHasCachedSavedFrame();
JitSpew(JitSpew_BaselineBailouts,
- " Copied from rematerialized frame at (%p,%" PRIuSIZE ")",
+ " Copied from rematerialized frame at (%p,%zu)",
fp, inlineDepth);
// Propagate the debuggee frame flag. For the case where the Debugger did
// not rematerialize an Ion frame, the baseline frame has its debuggee
// flag set iff its script is considered a debuggee. See the debuggee case
// in InitFromBailout.
if (rematFrame->isDebuggee()) {
frame->setIsDebuggee();
@@ -1966,17 +1965,17 @@ jit::FinishBailoutToBaseline(BaselineBai
// If we are catching an exception, we need to unwind scopes.
// See |SettleOnTryNote|
if (cx->isExceptionPending() && faultPC) {
EnvironmentIter ei(cx, topFrame, faultPC);
UnwindEnvironment(cx, ei, tryPC);
}
JitSpew(JitSpew_BaselineBailouts,
- " Restored outerScript=(%s:%" PRIuSIZE ",%u) innerScript=(%s:%" PRIuSIZE ",%u) (bailoutKind=%u)",
+ " Restored outerScript=(%s:%zu,%u) innerScript=(%s:%zu,%u) (bailoutKind=%u)",
outerScript->filename(), outerScript->lineno(), outerScript->getWarmUpCount(),
innerScript->filename(), innerScript->lineno(), innerScript->getWarmUpCount(),
(unsigned) bailoutKind);
switch (bailoutKind) {
// Normal bailouts.
case Bailout_Inevitable:
case Bailout_DuringVMCall:
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/BaselineCompiler.h"
#include "mozilla/Casting.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jsfun.h"
#include "jit/BaselineIC.h"
#include "jit/BaselineJIT.h"
#include "jit/FixedList.h"
#include "jit/IonAnalysis.h"
#include "jit/JitcodeMap.h"
@@ -83,20 +82,20 @@ BaselineCompiler::addPCMappingEntry(bool
entry.addIndexEntry = addIndexEntry;
return pcMappingEntries_.append(entry);
}
MethodStatus
BaselineCompiler::compile()
{
- JitSpew(JitSpew_BaselineScripts, "Baseline compiling script %s:%" PRIuSIZE " (%p)",
+ JitSpew(JitSpew_BaselineScripts, "Baseline compiling script %s:%zu (%p)",
script->filename(), script->lineno(), script);
- JitSpew(JitSpew_Codegen, "# Emitting baseline code for script %s:%" PRIuSIZE,
+ JitSpew(JitSpew_Codegen, "# Emitting baseline code for script %s:%zu",
script->filename(), script->lineno());
TraceLoggerThread* logger = TraceLoggerForCurrentThread(cx);
TraceLoggerEvent scriptEvent(TraceLogger_AnnotateScripts, script);
AutoTraceLog logScript(logger, scriptEvent);
AutoTraceLog logCompile(logger, TraceLogger_BaselineCompilation);
if (!script->ensureHasTypes(cx) || !script->ensureHasAnalyzedArgsUsage(cx))
@@ -218,17 +217,17 @@ BaselineCompiler::compile()
if (!baselineScript) {
ReportOutOfMemory(cx);
return Method_Error;
}
baselineScript->setMethod(code);
baselineScript->setTemplateEnvironment(templateEnv);
- JitSpew(JitSpew_BaselineScripts, "Created BaselineScript %p (raw %p) for %s:%" PRIuSIZE,
+ JitSpew(JitSpew_BaselineScripts, "Created BaselineScript %p (raw %p) for %s:%zu",
(void*) baselineScript.get(), (void*) code->raw(),
script->filename(), script->lineno());
MOZ_ASSERT(pcMappingIndexEntries.length() > 0);
baselineScript->copyPCMappingIndexEntries(&pcMappingIndexEntries[0]);
MOZ_ASSERT(pcEntries.length() > 0);
baselineScript->copyPCMappingEntries(pcEntries);
@@ -274,17 +273,17 @@ BaselineCompiler::compile()
baselineScript->copyYieldAndAwaitEntries(script, yieldAndAwaitOffsets_);
if (compileDebugInstrumentation_)
baselineScript->setHasDebugInstrumentation();
// Always register a native => bytecode mapping entry, since profiler can be
// turned on with baseline jitcode on stack, and baseline jitcode cannot be invalidated.
{
- JitSpew(JitSpew_Profiling, "Added JitcodeGlobalEntry for baseline script %s:%" PRIuSIZE " (%p)",
+ JitSpew(JitSpew_Profiling, "Added JitcodeGlobalEntry for baseline script %s:%zu (%p)",
script->filename(), script->lineno(), baselineScript.get());
// Generate profiling string.
char* str = JitcodeGlobalEntry::createScriptString(cx, script);
if (!str)
return Method_Error;
JitcodeGlobalEntry::BaselineEntry entry;
--- a/js/src/jit/BaselineDebugModeOSR.cpp
+++ b/js/src/jit/BaselineDebugModeOSR.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/BaselineDebugModeOSR.h"
#include "mozilla/DebugOnly.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/BaselineIC.h"
#include "jit/JitcodeMap.h"
#include "jit/Linker.h"
#include "jit/PerfSpewer.h"
#include "jit/JitFrames-inl.h"
#include "jit/MacroAssembler-inl.h"
@@ -318,27 +317,27 @@ ICEntryKindToString(ICEntry::Kind kind)
}
#endif // JS_JITSPEW
static void
SpewPatchBaselineFrame(uint8_t* oldReturnAddress, uint8_t* newReturnAddress,
JSScript* script, ICEntry::Kind frameKind, jsbytecode* pc)
{
JitSpew(JitSpew_BaselineDebugModeOSR,
- "Patch return %p -> %p on BaselineJS frame (%s:%" PRIuSIZE ") from %s at %s",
+ "Patch return %p -> %p on BaselineJS frame (%s:%zu) from %s at %s",
oldReturnAddress, newReturnAddress, script->filename(), script->lineno(),
ICEntryKindToString(frameKind), CodeName[(JSOp)*pc]);
}
static void
SpewPatchBaselineFrameFromExceptionHandler(uint8_t* oldReturnAddress, uint8_t* newReturnAddress,
JSScript* script, jsbytecode* pc)
{
JitSpew(JitSpew_BaselineDebugModeOSR,
- "Patch return %p -> %p on BaselineJS frame (%s:%" PRIuSIZE ") from exception handler at %s",
+ "Patch return %p -> %p on BaselineJS frame (%s:%zu) from exception handler at %s",
oldReturnAddress, newReturnAddress, script->filename(), script->lineno(),
CodeName[(JSOp)*pc]);
}
static void
SpewPatchStubFrame(ICStub* oldStub, ICStub* newStub)
{
JitSpew(JitSpew_BaselineDebugModeOSR,
@@ -664,17 +663,17 @@ RecompileBaselineScriptForDebugMode(JSCo
{
BaselineScript* oldBaselineScript = script->baselineScript();
// If a script is on the stack multiple times, it may have already
// been recompiled.
if (oldBaselineScript->hasDebugInstrumentation() == observing)
return true;
- JitSpew(JitSpew_BaselineDebugModeOSR, "Recompiling (%s:%" PRIuSIZE ") for %s",
+ JitSpew(JitSpew_BaselineDebugModeOSR, "Recompiling (%s:%zu) for %s",
script->filename(), script->lineno(), observing ? "DEBUGGING" : "NORMAL EXECUTION");
script->setBaselineScript(cx->runtime(), nullptr);
MethodStatus status = BaselineCompile(cx, script, /* forceDebugMode = */ observing);
if (status != Method_Compiled) {
// We will only fail to recompile for debug mode due to OOM. Restore
// the old baseline script in case something doesn't properly
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/BaselineIC.h"
#include "mozilla/DebugOnly.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TemplateLib.h"
#include "jsfriendapi.h"
#include "jsfun.h"
#include "jslibmath.h"
#include "jstypes.h"
#include "builtin/Eval.h"
@@ -2325,17 +2324,17 @@ TryAttachCallStub(JSContext* cx, ICCall_
if (!thisObject)
return false;
if (thisObject->is<PlainObject>() || thisObject->is<UnboxedPlainObject>())
templateObject = thisObject;
}
JitSpew(JitSpew_BaselineIC,
- " Generating Call_Scripted stub (fun=%p, %s:%" PRIuSIZE ", cons=%s, spread=%s)",
+ " Generating Call_Scripted stub (fun=%p, %s:%zu, cons=%s, spread=%s)",
fun.get(), fun->nonLazyScript()->filename(), fun->nonLazyScript()->lineno(),
constructing ? "yes" : "no", isSpread ? "yes" : "no");
ICCallScriptedCompiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
fun, templateObject,
constructing, isSpread, script->pcToOffset(pc));
ICStub* newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
return false;
--- a/js/src/jit/C1Spewer.cpp
+++ b/js/src/jit/C1Spewer.cpp
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#ifdef JS_JITSPEW
#include "jit/C1Spewer.h"
-#include "mozilla/SizePrintfMacros.h"
#include <time.h>
#include "jit/BacktrackingAllocator.h"
#include "jit/LIR.h"
#include "jit/MIRGraph.h"
#include "vm/Printer.h"
@@ -23,18 +22,18 @@ using namespace js::jit;
void
C1Spewer::beginFunction(MIRGraph* graph, JSScript* script)
{
this->graph = graph;
out_.printf("begin_compilation\n");
if (script) {
- out_.printf(" name \"%s:%" PRIuSIZE "\"\n", script->filename(), script->lineno());
- out_.printf(" method \"%s:%" PRIuSIZE "\"\n", script->filename(), script->lineno());
+ out_.printf(" name \"%s:%zu\"\n", script->filename(), script->lineno());
+ out_.printf(" method \"%s:%zu\"\n", script->filename(), script->lineno());
} else {
out_.printf(" name \"wasm compilation\"\n");
out_.printf(" method \"wasm compilation\"\n");
}
out_.printf(" date %d\n", (int)time(nullptr));
out_.printf("end_compilation\n");
}
--- a/js/src/jit/CacheIRSpewer.cpp
+++ b/js/src/jit/CacheIRSpewer.cpp
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#ifdef JS_CACHEIR_SPEW
#include "jit/CacheIRSpewer.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#ifdef XP_WIN
#include <process.h>
#define getpid _getpid
#else
#include <unistd.h>
#endif
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -9,17 +9,16 @@
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/Casting.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/EnumeratedArray.h"
#include "mozilla/EnumeratedRange.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jslibmath.h"
#include "jsmath.h"
#include "jsnum.h"
#include "jsprf.h"
#include "jsstr.h"
#include "builtin/Eval.h"
@@ -5023,17 +5022,17 @@ CodeGenerator::maybeCreateScriptCounts()
resume = resume->caller();
offset = script->pcToOffset(resume->pc());
if (block->entryResumePoint()->caller()) {
// Get the filename and line number of the inner script.
JSScript* innerScript = block->info().script();
description = (char*) js_calloc(200);
if (description) {
- snprintf(description, 200, "%s:%" PRIuSIZE,
+ snprintf(description, 200, "%s:%zu",
innerScript->filename(), innerScript->lineno());
}
}
}
if (!counts->block(i).init(block->id(), offset, description, block->numSuccessors()))
return nullptr;
@@ -5379,17 +5378,17 @@ CodeGenerator::generateBody()
lineNumber = PCToLineNumber(current->mir()->info().script(), current->mir()->pc(),
&columnNumber);
} else {
#ifdef DEBUG
lineNumber = current->mir()->lineno();
columnNumber = current->mir()->columnIndex();
#endif
}
- JitSpew(JitSpew_Codegen, "# block%" PRIuSIZE " %s:%" PRIuSIZE ":%u%s:",
+ JitSpew(JitSpew_Codegen, "# block%zu %s:%zu:%u%s:",
i, filename ? filename : "?", lineNumber, columnNumber,
current->mir()->isLoopHeader() ? " (loop header)" : "");
#endif
masm.bind(current->label());
mozilla::Maybe<ScriptCountBlockState> blockCounts;
if (counts) {
@@ -9593,17 +9592,17 @@ CodeGenerator::generateWasm(wasm::SigIdD
MOZ_ASSERT(safepoints_.size() == 0);
MOZ_ASSERT(!scriptCounts_);
return true;
}
bool
CodeGenerator::generate()
{
- JitSpew(JitSpew_Codegen, "# Emitting code for script %s:%" PRIuSIZE,
+ JitSpew(JitSpew_Codegen, "# Emitting code for script %s:%zu",
gen->info().script()->filename(),
gen->info().script()->lineno());
// Initialize native code table with an entry to the start of
// top-level script.
InlineScriptTree* tree = gen->info().inlineScriptTree();
jsbytecode* startPC = tree->script()->code();
BytecodeSite* startSite = new(gen->alloc()) BytecodeSite(tree, startPC);
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/Ion.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/ThreadLocal.h"
#include "jscompartment.h"
#include "jsgc.h"
#include "jsprf.h"
#include "gc/Marking.h"
#include "jit/AliasAnalysis.h"
@@ -2220,17 +2219,17 @@ IonCompile(JSContext* cx, JSScript* scri
return reason;
}
AssertBasicGraphCoherency(builder->graph());
// If possible, compile the script off thread.
if (options.offThreadCompilationAvailable()) {
- JitSpew(JitSpew_IonSyncLogs, "Can't log script %s:%" PRIuSIZE
+ JitSpew(JitSpew_IonSyncLogs, "Can't log script %s:%zu"
". (Compiled on background thread.)",
builderScript->filename(), builderScript->lineno());
if (!CreateMIRRootList(*builder))
return AbortReason::Alloc;
if (!StartOffThreadIonCompile(cx, builder)) {
JitSpew(JitSpew_IonAbort, "Unable to start off-thread ion compilation.");
@@ -2350,17 +2349,17 @@ CheckScriptSize(JSContext* cx, JSScript*
return Method_Compiled;
uint32_t numLocalsAndArgs = NumLocalsAndArgs(script);
if (script->length() > MAX_ACTIVE_THREAD_SCRIPT_SIZE ||
numLocalsAndArgs > MAX_ACTIVE_THREAD_LOCALS_AND_ARGS)
{
if (!OffThreadCompilationAvailable(cx)) {
- JitSpew(JitSpew_IonAbort, "Script too large (%" PRIuSIZE " bytes) (%u locals/args)",
+ JitSpew(JitSpew_IonAbort, "Script too large (%zu bytes) (%u locals/args)",
script->length(), numLocalsAndArgs);
TrackIonAbort(cx, script, script->code(), "too large");
return Method_CantCompile;
}
}
return Method_Compiled;
}
@@ -2392,23 +2391,23 @@ Compile(JSContext* cx, HandleScript scri
return Method_Skipped;
if (script->isDebuggee() || (osrFrame && osrFrame->isDebuggee())) {
TrackAndSpewIonAbort(cx, script, "debugging");
return Method_Skipped;
}
if (!CheckScript(cx, script, bool(osrPc))) {
- JitSpew(JitSpew_IonAbort, "Aborted compilation of %s:%" PRIuSIZE, script->filename(), script->lineno());
+ JitSpew(JitSpew_IonAbort, "Aborted compilation of %s:%zu", script->filename(), script->lineno());
return Method_CantCompile;
}
MethodStatus status = CheckScriptSize(cx, script);
if (status != Method_Compiled) {
- JitSpew(JitSpew_IonAbort, "Aborted compilation of %s:%" PRIuSIZE, script->filename(), script->lineno());
+ JitSpew(JitSpew_IonAbort, "Aborted compilation of %s:%zu", script->filename(), script->lineno());
return status;
}
bool recompile = false;
OptimizationLevel optimizationLevel = GetOptimizationLevel(script, osrPc);
if (optimizationLevel == OptimizationLevel::DontCompile)
return Method_Skipped;
@@ -2682,17 +2681,17 @@ jit::IonCompileScriptForBaseline(JSConte
// TODO: ASSERT that a ion-script-already-exists checker stub doesn't exist.
// TODO: Clear all optimized stubs.
// TODO: Add a ion-script-already-exists checker stub.
return true;
}
// Ensure that Ion-compiled code is available.
JitSpew(JitSpew_BaselineOSR,
- "WarmUpCounter for %s:%" PRIuSIZE " reached %d at pc %p, trying to switch to Ion!",
+ "WarmUpCounter for %s:%zu reached %d at pc %p, trying to switch to Ion!",
script->filename(), script->lineno(), (int) script->getWarmUpCount(), (void*) pc);
MethodStatus stat;
if (isLoopEntry) {
MOZ_ASSERT(LoopEntryCanIonOsr(pc));
JitSpew(JitSpew_BaselineOSR, " Compile at loop entry!");
stat = BaselineCanEnterAtBranch(cx, script, frame, pc);
} else if (frame->isFunctionFrame()) {
@@ -2975,48 +2974,48 @@ InvalidateActivation(FreeOp* fop, const
size_t frameno = 1;
for (JitFrameIterator it(activations); !it.done(); ++it, ++frameno) {
MOZ_ASSERT_IF(frameno == 1, it.isExitFrame() || it.type() == JitFrame_Bailout);
#ifdef JS_JITSPEW
switch (it.type()) {
case JitFrame_Exit:
- JitSpew(JitSpew_IonInvalidate, "#%" PRIuSIZE " exit frame @ %p", frameno, it.fp());
+ JitSpew(JitSpew_IonInvalidate, "#%zu exit frame @ %p", frameno, it.fp());
break;
case JitFrame_BaselineJS:
case JitFrame_IonJS:
case JitFrame_Bailout:
{
MOZ_ASSERT(it.isScripted());
const char* type = "Unknown";
if (it.isIonJS())
type = "Optimized";
else if (it.isBaselineJS())
type = "Baseline";
else if (it.isBailoutJS())
type = "Bailing";
JitSpew(JitSpew_IonInvalidate,
- "#%" PRIuSIZE " %s JS frame @ %p, %s:%" PRIuSIZE " (fun: %p, script: %p, pc %p)",
+ "#%zu %s JS frame @ %p, %s:%zu (fun: %p, script: %p, pc %p)",
frameno, type, it.fp(), it.script()->maybeForwardedFilename(),
it.script()->lineno(), it.maybeCallee(), (JSScript*)it.script(),
it.returnAddressToFp());
break;
}
case JitFrame_BaselineStub:
- JitSpew(JitSpew_IonInvalidate, "#%" PRIuSIZE " baseline stub frame @ %p", frameno, it.fp());
+ JitSpew(JitSpew_IonInvalidate, "#%zu baseline stub frame @ %p", frameno, it.fp());
break;
case JitFrame_Rectifier:
- JitSpew(JitSpew_IonInvalidate, "#%" PRIuSIZE " rectifier frame @ %p", frameno, it.fp());
+ JitSpew(JitSpew_IonInvalidate, "#%zu rectifier frame @ %p", frameno, it.fp());
break;
case JitFrame_IonICCall:
- JitSpew(JitSpew_IonInvalidate, "#%" PRIuSIZE " ion IC call frame @ %p", frameno, it.fp());
+ JitSpew(JitSpew_IonInvalidate, "#%zu ion IC call frame @ %p", frameno, it.fp());
break;
case JitFrame_Entry:
- JitSpew(JitSpew_IonInvalidate, "#%" PRIuSIZE " entry frame @ %p", frameno, it.fp());
+ JitSpew(JitSpew_IonInvalidate, "#%zu entry frame @ %p", frameno, it.fp());
break;
}
#endif // JS_JITSPEW
if (!it.isIonScripted())
continue;
bool calledFromLinkStub = false;
@@ -3101,17 +3100,17 @@ InvalidateActivation(FreeOp* fop, const
CodeLocationLabel dataLabelToMunge(it.returnAddressToFp());
ptrdiff_t delta = ionScript->invalidateEpilogueDataOffset() -
(it.returnAddressToFp() - ionCode->raw());
Assembler::PatchWrite_Imm32(dataLabelToMunge, Imm32(delta));
CodeLocationLabel osiPatchPoint = SafepointReader::InvalidationPatchPoint(ionScript, si);
CodeLocationLabel invalidateEpilogue(ionCode, CodeOffset(ionScript->invalidateEpilogueOffset()));
- JitSpew(JitSpew_IonInvalidate, " ! Invalidate ionScript %p (inv count %" PRIuSIZE ") -> patching osipoint %p",
+ JitSpew(JitSpew_IonInvalidate, " ! Invalidate ionScript %p (inv count %zu) -> patching osipoint %p",
ionScript, ionScript->invalidationCount(), (void*) osiPatchPoint.raw());
Assembler::PatchWrite_NearCall(osiPatchPoint, invalidateEpilogue);
}
JitSpew(JitSpew_IonInvalidate, "END invalidating activation");
}
void
@@ -3153,17 +3152,17 @@ jit::Invalidate(TypeZone& types, FreeOp*
MOZ_ASSERT(co->isValid());
if (cancelOffThread)
CancelOffThreadIonCompile(co->script());
if (!co->ion())
continue;
- JitSpew(JitSpew_IonInvalidate, " Invalidate %s:%" PRIuSIZE ", IonScript %p",
+ JitSpew(JitSpew_IonInvalidate, " Invalidate %s:%zu, IonScript %p",
co->script()->filename(), co->script()->lineno(), co->ion());
// Keep the ion script alive during the invalidation and flag this
// ionScript as being invalidated. This increment is removed by the
// loop after the calls to InvalidateActivation.
co->ion()->incrementInvalidationCount();
numInvalidations++;
}
@@ -3249,17 +3248,17 @@ jit::Invalidate(JSContext* cx, JSScript*
// "<filename>:<lineno>"
// Get the script filename, if any, and its length.
const char* filename = script->filename();
if (filename == nullptr)
filename = "<unknown>";
// Construct the descriptive string.
- UniqueChars buf = JS_smprintf("Invalidate %s:%" PRIuSIZE, filename, script->lineno());
+ UniqueChars buf = JS_smprintf("Invalidate %s:%zu", filename, script->lineno());
// Ignore the event on allocation failure.
if (buf) {
cx->runtime()->geckoProfiler().markEvent(buf.get());
}
}
// RecompileInfoVector has inline space for at least one element.
@@ -3296,17 +3295,17 @@ jit::FinishInvalidation(FreeOp* fop, JSS
script->setIonScript(nullptr, nullptr);
FinishInvalidationOf(fop, script, ion);
}
}
void
jit::ForbidCompilation(JSContext* cx, JSScript* script)
{
- JitSpew(JitSpew_IonAbort, "Disabling Ion compilation of script %s:%" PRIuSIZE,
+ JitSpew(JitSpew_IonAbort, "Disabling Ion compilation of script %s:%zu",
script->filename(), script->lineno());
CancelOffThreadIonCompile(script);
if (script->hasIonScript())
Invalidate(cx, script, false);
script->setIonScript(cx->runtime(), ION_DISABLED_SCRIPT);
@@ -3331,17 +3330,17 @@ JSContext::setAutoFlushICache(AutoFlushI
// AutoFlushICache context.
void
AutoFlushICache::setRange(uintptr_t start, size_t len)
{
#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
AutoFlushICache* afc = TlsContext.get()->autoFlushICache();
MOZ_ASSERT(afc);
MOZ_ASSERT(!afc->start_);
- JitSpewCont(JitSpew_CacheFlush, "(%" PRIxPTR " %" PRIxSIZE "):", start, len);
+ JitSpewCont(JitSpew_CacheFlush, "(%" PRIxPTR " %zx):", start, len);
uintptr_t stop = start + len;
afc->start_ = start;
afc->stop_ = stop;
#endif
}
// Flush the instruction cache.
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/IonAnalysis.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/AliasAnalysis.h"
#include "jit/BaselineInspector.h"
#include "jit/BaselineJIT.h"
#include "jit/FlowAliasAnalysis.h"
#include "jit/Ion.h"
#include "jit/IonBuilder.h"
#include "jit/IonOptimizationLevels.h"
@@ -440,20 +439,20 @@ jit::PruneUnusedBranches(MIRGenerator* m
// Interpreters are often implemented as a table switch within a for
// loop. What might happen is that the interpreter heats up in a
// subset of instructions, but might need other instructions for the
// rest of the evaluation.
if (numSuccessorsOfPreds > 8)
shouldBailout = false;
JitSpew(JitSpew_Prune, "info: block %d,"
- " predCount: %" PRIuSIZE ", domInst: %" PRIuSIZE
- ", span: %" PRIuSIZE ", effectful: %" PRIuSIZE ", "
- " isLoopExit: %s, numSuccessorsOfPred: %" PRIuSIZE "."
- " (score: %" PRIuSIZE ", shouldBailout: %s)",
+ " predCount: %zu, domInst: %zu"
+ ", span: %zu, effectful: %zu, "
+ " isLoopExit: %s, numSuccessorsOfPred: %zu."
+ " (score: %zu, shouldBailout: %s)",
block->id(), predCount, numDominatedInst, branchSpan, numEffectfulInst,
isLoopExit ? "true" : "false", numSuccessorsOfPreds,
score, shouldBailout ? "true" : "false");
}
// Continue to the next basic block if the current basic block can
// remain unchanged.
if (!isUnreachable && !shouldBailout)
@@ -2644,17 +2643,17 @@ CheckOperand(const MNode* consumer, cons
MDefinition* producer = use->producer();
MOZ_ASSERT(!producer->isDiscarded());
MOZ_ASSERT(producer->block() != nullptr);
MOZ_ASSERT(use->consumer() == consumer);
#ifdef _DEBUG_CHECK_OPERANDS_USES_BALANCE
Fprinter print(stderr);
print.printf("==Check Operand\n");
use->producer()->dump(print);
- print.printf(" index: %" PRIuSIZE "\n", use->consumer()->indexOf(use));
+ print.printf(" index: %zu\n", use->consumer()->indexOf(use));
use->consumer()->dump(print);
print.printf("==End\n");
#endif
--*usesBalance;
}
static void
CheckUse(const MDefinition* producer, const MUse* use, int32_t* usesBalance)
@@ -2663,17 +2662,17 @@ CheckUse(const MDefinition* producer, co
MOZ_ASSERT_IF(use->consumer()->isDefinition(),
!use->consumer()->toDefinition()->isDiscarded());
MOZ_ASSERT(use->consumer()->block() != nullptr);
MOZ_ASSERT(use->consumer()->getOperand(use->index()) == producer);
#ifdef _DEBUG_CHECK_OPERANDS_USES_BALANCE
Fprinter print(stderr);
print.printf("==Check Use\n");
use->producer()->dump(print);
- print.printf(" index: %" PRIuSIZE "\n", use->consumer()->indexOf(use));
+ print.printf(" index: %zu\n", use->consumer()->indexOf(use));
use->consumer()->dump(print);
print.printf("==End\n");
#endif
++*usesBalance;
}
// To properly encode entry resume points, we have to ensure that all the
// operands of the entry resume point are located before the safeInsertTop
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/IonBuilder.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
#include "builtin/Eval.h"
#include "builtin/TypedObject.h"
#include "frontend/SourceNotes.h"
#include "jit/BaselineFrame.h"
#include "jit/BaselineInspector.h"
#include "jit/Ion.h"
#include "jit/IonControlFlow.h"
@@ -321,17 +320,17 @@ IonBuilder::getPolyCallTargets(Temporary
return Ok();
}
IonBuilder::InliningDecision
IonBuilder::DontInline(JSScript* targetScript, const char* reason)
{
if (targetScript) {
- JitSpew(JitSpew_Inlining, "Cannot inline %s:%" PRIuSIZE ": %s",
+ JitSpew(JitSpew_Inlining, "Cannot inline %s:%zu: %s",
targetScript->filename(), targetScript->lineno(), reason);
} else {
JitSpew(JitSpew_Inlining, "Cannot inline: %s", reason);
}
return InliningDecision_DontInline;
}
@@ -728,21 +727,21 @@ IonBuilder::build()
script()->baselineScript()->resetMaxInliningDepth();
MBasicBlock* entry;
MOZ_TRY_VAR(entry, newBlock(info().firstStackSlot(), pc));
MOZ_TRY(setCurrentAndSpecializePhis(entry));
#ifdef JS_JITSPEW
if (info().isAnalysis()) {
- JitSpew(JitSpew_IonScripts, "Analyzing script %s:%" PRIuSIZE " (%p) %s",
+ JitSpew(JitSpew_IonScripts, "Analyzing script %s:%zu (%p) %s",
script()->filename(), script()->lineno(), (void*)script(),
AnalysisModeString(info().analysisMode()));
} else {
- JitSpew(JitSpew_IonScripts, "%sompiling script %s:%" PRIuSIZE " (%p) (warmup-counter=%" PRIu32 ", level=%s)",
+ JitSpew(JitSpew_IonScripts, "%sompiling script %s:%zu (%p) (warmup-counter=%" PRIu32 ", level=%s)",
(script()->hasIonScript() ? "Rec" : "C"),
script()->filename(), script()->lineno(), (void*)script(),
script()->getWarmUpCount(), OptimizationLevelString(optimizationInfo().level()));
}
#endif
MOZ_TRY(initParameters());
initLocals();
@@ -902,17 +901,17 @@ IonBuilder::processIterators()
AbortReasonOr<Ok>
IonBuilder::buildInline(IonBuilder* callerBuilder, MResumePoint* callerResumePoint,
CallInfo& callInfo)
{
inlineCallInfo_ = &callInfo;
MOZ_TRY(init());
- JitSpew(JitSpew_IonScripts, "Inlining script %s:%" PRIuSIZE " (%p)",
+ JitSpew(JitSpew_IonScripts, "Inlining script %s:%zu (%p)",
script()->filename(), script()->lineno(), (void*)script());
callerBuilder_ = callerBuilder;
callerResumePoint_ = callerResumePoint;
if (callerBuilder->failedBoundsCheck_)
failedBoundsCheck_ = true;
@@ -1191,17 +1190,17 @@ IonBuilder::initEnvironmentChain(MDefini
// See: |InitFromBailout|
current->setEnvironmentChain(env);
return Ok();
}
void
IonBuilder::initArgumentsObject()
{
- JitSpew(JitSpew_IonMIR, "%s:%" PRIuSIZE " - Emitting code to initialize arguments object! block=%p",
+ JitSpew(JitSpew_IonMIR, "%s:%zu - Emitting code to initialize arguments object! block=%p",
script()->filename(), script()->lineno(), current);
MOZ_ASSERT(info().needsArgsObj());
bool mapped = script()->hasMappedArgsObj();
ArgumentsObject* templateObj = script()->compartment()->maybeArgumentsTemplateObject(mapped);
MCreateArgumentsObject* argsObj =
MCreateArgumentsObject::New(alloc(), current->environmentChain(), templateObj);
@@ -1403,17 +1402,17 @@ GetOrCreateControlFlowGraph(TempAllocato
return CFGState::Alloc;
if (script->hasBaselineScript()) {
MOZ_ASSERT(!script->baselineScript()->controlFlowGraph());
script->baselineScript()->setControlFlowGraph(cfg);
}
if (JitSpewEnabled(JitSpew_CFG)) {
- JitSpew(JitSpew_CFG, "Generating graph for %s:%" PRIuSIZE,
+ JitSpew(JitSpew_CFG, "Generating graph for %s:%zu",
script->filename(), script->lineno());
Fprinter& print = JitSpewPrinter();
cfg->dump(print, script);
}
*cfgOut = cfg;
return CFGState::Success;
}
@@ -4010,17 +4009,17 @@ IonBuilder::makeInliningDecision(JSObjec
// Callee must have been called a few times to have somewhat stable
// type information, except for definite properties analysis,
// as the caller has not run yet.
if (targetScript->getWarmUpCount() < optimizationInfo().inliningWarmUpThreshold() &&
!targetScript->baselineScript()->ionCompiledOrInlined() &&
info().analysisMode() != Analysis_DefiniteProperties)
{
trackOptimizationOutcome(TrackedOutcome::CantInlineNotHot);
- JitSpew(JitSpew_Inlining, "Cannot inline %s:%" PRIuSIZE ": callee is insufficiently hot.",
+ JitSpew(JitSpew_Inlining, "Cannot inline %s:%zu: callee is insufficiently hot.",
targetScript->filename(), targetScript->lineno());
return InliningDecision_WarmUpCountTooLow;
}
// Don't inline if the callee is known to inline a lot of code, to avoid
// huge MIR graphs.
uint32_t inlinedBytecodeLength = targetScript->baselineScript()->inlinedBytecodeLength();
if (inlinedBytecodeLength > optimizationInfo().inlineMaxCalleeInlinedBytecodeLength()) {
--- a/js/src/jit/IonCaches.cpp
+++ b/js/src/jit/IonCaches.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/IonCaches.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TemplateLib.h"
#include "jstypes.h"
#include "builtin/TypedObject.h"
#include "jit/BaselineIC.h"
#include "jit/Ion.h"
#include "jit/JitcodeMap.h"
--- a/js/src/jit/IonControlFlow.cpp
+++ b/js/src/jit/IonControlFlow.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/IonControlFlow.h"
#include "mozilla/DebugOnly.h"
-#include "mozilla/SizePrintfMacros.h"
using namespace js;
using namespace js::jit;
using mozilla::DebugOnly;
ControlFlowGenerator::ControlFlowGenerator(TempAllocator& temp, JSScript* script)
: script(script),
current(nullptr),
@@ -38,39 +37,39 @@ ControlFlowGraph::dump(GenericPrinter& p
{
if (blocks_.length() == 0) {
print.printf("Didn't run yet.\n");
return;
}
fprintf(stderr, "Dumping cfg:\n\n");
for (size_t i = 0; i < blocks_.length(); i++) {
- print.printf(" Block %" PRIuSIZE ", %" PRIuSIZE ":%" PRIuSIZE "\n",
+ print.printf(" Block %zu, %zu:%zu\n",
blocks_[i].id(),
script->pcToOffset(blocks_[i].startPc()),
script->pcToOffset(blocks_[i].stopPc()));
jsbytecode* pc = blocks_[i].startPc();
for ( ; pc < blocks_[i].stopPc(); pc += CodeSpec[JSOp(*pc)].length) {
MOZ_ASSERT(pc < script->codeEnd());
- print.printf(" %" PRIuSIZE ": %s\n", script->pcToOffset(pc),
+ print.printf(" %zu: %s\n", script->pcToOffset(pc),
CodeName[JSOp(*pc)]);
}
if (blocks_[i].stopIns()->isGoto()) {
- print.printf(" %s (popping:%" PRIuSIZE ") [",
+ print.printf(" %s (popping:%zu) [",
blocks_[i].stopIns()->Name(),
blocks_[i].stopIns()->toGoto()->popAmount());
} else {
print.printf(" %s [", blocks_[i].stopIns()->Name());
}
for (size_t j=0; j<blocks_[i].stopIns()->numSuccessors(); j++) {
if (j!=0)
print.printf(", ");
- print.printf("%" PRIuSIZE, blocks_[i].stopIns()->getSuccessor(j)->id());
+ print.printf("%zu", blocks_[i].stopIns()->getSuccessor(j)->id());
}
print.printf("]\n\n");
}
}
bool
ControlFlowGraph::init(TempAllocator& alloc, const CFGBlockVector& blocks)
{
--- a/js/src/jit/IonIC.cpp
+++ b/js/src/jit/IonIC.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/IonIC.h"
#include "mozilla/Maybe.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/CacheIRCompiler.h"
#include "jit/Linker.h"
#include "jit/MacroAssembler-inl.h"
#include "vm/Interpreter-inl.h"
using namespace js;
@@ -149,17 +148,17 @@ IonGetPropertyIC::update(JSContext* cx,
if (!attached && ic->idempotent()) {
// Invalidate the cache if the property was not found, or was found on
// a non-native object. This ensures:
// 1) The property read has no observable side-effects.
// 2) There's no need to dynamically monitor the return type. This would
// be complicated since (due to GVN) there can be multiple pc's
// associated with a single idempotent cache.
- JitSpew(JitSpew_IonIC, "Invalidating from idempotent cache %s:%" PRIuSIZE,
+ JitSpew(JitSpew_IonIC, "Invalidating from idempotent cache %s:%zu",
outerScript->filename(), outerScript->lineno());
outerScript->setInvalidatedIdempotentCache();
// Do not re-invalidate if the lookup already caused invalidation.
if (outerScript->hasIonScript())
Invalidate(cx, outerScript);
--- a/js/src/jit/JSONSpewer.cpp
+++ b/js/src/jit/JSONSpewer.cpp
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#ifdef JS_JITSPEW
#include "jit/JSONSpewer.h"
-#include "mozilla/SizePrintfMacros.h"
#include <stdarg.h>
#include "jit/BacktrackingAllocator.h"
#include "jit/LIR.h"
#include "jit/MIR.h"
#include "jit/MIRGraph.h"
#include "jit/RangeAnalysis.h"
@@ -21,17 +20,17 @@
using namespace js;
using namespace js::jit;
void
JSONSpewer::beginFunction(JSScript* script)
{
beginObject();
if (script)
- formatProperty("name", "%s:%" PRIuSIZE, script->filename(), script->lineno());
+ formatProperty("name", "%s:%zu", script->filename(), script->lineno());
else
property("name", "wasm compilation");
beginListProperty("passes");
}
void
JSONSpewer::beginPass(const char* pass)
{
--- a/js/src/jit/JitFrameIterator.cpp
+++ b/js/src/jit/JitFrameIterator.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/JitFrameIterator-inl.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/BaselineIC.h"
#include "jit/JitcodeMap.h"
#include "jit/JitFrames.h"
using namespace js;
using namespace js::jit;
@@ -319,17 +318,17 @@ JitFrameIterator::dumpBaseline() const
DumpObject(callee());
#else
fprintf(stderr, "?\n");
#endif
} else {
fprintf(stderr, " global frame, no callee\n");
}
- fprintf(stderr, " file %s line %" PRIuSIZE "\n",
+ fprintf(stderr, " file %s line %zu\n",
script()->filename(), script()->lineno());
JSContext* cx = TlsContext.get();
RootedScript script(cx);
jsbytecode* pc;
baselineScriptAndPc(script.address(), &pc);
fprintf(stderr, " script = %p, pc = %p (offset %u)\n", (void*)script, pc, uint32_t(script->pcToOffset(pc)));
@@ -429,30 +428,30 @@ JitFrameIterator::verifyReturnAddressUsi
uint32_t depth = UINT32_MAX;
if (!entry->callStackAtAddr(rt, returnAddressToFp_, location, &depth))
return false;
MOZ_ASSERT(depth > 0 && depth != UINT32_MAX);
MOZ_ASSERT(location.length() == depth);
JitSpew(JitSpew_Profiling, "Found bytecode location of depth %d:", depth);
for (size_t i = 0; i < location.length(); i++) {
- JitSpew(JitSpew_Profiling, " %s:%" PRIuSIZE " - %" PRIuSIZE,
+ JitSpew(JitSpew_Profiling, " %s:%zu - %zu",
location[i].script->filename(), location[i].script->lineno(),
size_t(location[i].pc - location[i].script->code()));
}
if (type_ == JitFrame_IonJS) {
// Create an InlineFrameIterator here and verify the mapped info against the iterator info.
InlineFrameIterator inlineFrames(TlsContext.get(), this);
for (size_t idx = 0; idx < location.length(); idx++) {
MOZ_ASSERT(idx < location.length());
MOZ_ASSERT_IF(idx < location.length() - 1, inlineFrames.more());
JitSpew(JitSpew_Profiling,
- "Match %d: ION %s:%" PRIuSIZE "(%" PRIuSIZE ") vs N2B %s:%" PRIuSIZE "(%" PRIuSIZE ")",
+ "Match %d: ION %s:%zu(%zu) vs N2B %s:%zu(%zu)",
(int)idx,
inlineFrames.script()->filename(),
inlineFrames.script()->lineno(),
size_t(inlineFrames.pc() - inlineFrames.script()->code()),
location[idx].script->filename(),
location[idx].script->lineno(),
size_t(location[idx].pc - location[idx].script->code()));
--- a/js/src/jit/JitFrames.cpp
+++ b/js/src/jit/JitFrames.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/JitFrames-inl.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jsfun.h"
#include "jsobj.h"
#include "jsscript.h"
#include "jsutil.h"
#include "gc/Marking.h"
#include "jit/BaselineDebugModeOSR.h"
@@ -2330,17 +2329,17 @@ InlineFrameIterator::dump() const
DumpObject(callee(fallback));
#else
fprintf(stderr, "?\n");
#endif
} else {
fprintf(stderr, " global frame, no callee\n");
}
- fprintf(stderr, " file %s line %" PRIuSIZE "\n",
+ fprintf(stderr, " file %s line %zu\n",
script()->filename(), script()->lineno());
fprintf(stderr, " script = %p, pc = %p\n", (void*) script(), pc());
fprintf(stderr, " current op: %s\n", CodeName[*pc()]);
if (!more()) {
numActualArgs();
}
--- a/js/src/jit/JitcodeMap.cpp
+++ b/js/src/jit/JitcodeMap.cpp
@@ -4,17 +4,16 @@
* 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/. */
#include "jit/JitcodeMap.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Maybe.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "jsprf.h"
#include "gc/Marking.h"
#include "gc/Statistics.h"
#include "jit/BaselineJIT.h"
#include "jit/JitSpewer.h"
@@ -327,17 +326,17 @@ JitcodeGlobalEntry::createScriptString(J
const char* filenameStr = script->filename() ? script->filename() : "(null)";
size_t filenameLength = strlen(filenameStr);
// Calculate lineno length
bool hasLineno = false;
size_t linenoLength = 0;
char linenoStr[15];
if (hasName || (script->functionNonDelazifying() || script->isForEval())) {
- linenoLength = SprintfLiteral(linenoStr, "%" PRIuSIZE, script->lineno());
+ linenoLength = SprintfLiteral(linenoStr, "%zu", script->lineno());
hasLineno = true;
}
// Full profile string for scripts with functions is:
// FuncName (FileName:Lineno)
// Full profile string for scripts without functions is:
// FileName:Lineno
// Full profile string for scripts without functions and without linenos is:
@@ -1547,23 +1546,23 @@ JitcodeIonTable::WriteIonTable(CompactBu
const CodeGeneratorShared::NativeToBytecode* end,
uint32_t* tableOffsetOut, uint32_t* numRegionsOut)
{
MOZ_ASSERT(tableOffsetOut != nullptr);
MOZ_ASSERT(numRegionsOut != nullptr);
MOZ_ASSERT(writer.length() == 0);
MOZ_ASSERT(scriptListSize > 0);
- JitSpew(JitSpew_Profiling, "Writing native to bytecode map for %s:%" PRIuSIZE " (%" PRIuSIZE " entries)",
+ JitSpew(JitSpew_Profiling, "Writing native to bytecode map for %s:%zu (%zu entries)",
scriptList[0]->filename(), scriptList[0]->lineno(),
mozilla::PointerRangeSize(start, end));
JitSpew(JitSpew_Profiling, " ScriptList of size %d", int(scriptListSize));
for (uint32_t i = 0; i < scriptListSize; i++) {
- JitSpew(JitSpew_Profiling, " Script %d - %s:%" PRIuSIZE,
+ JitSpew(JitSpew_Profiling, " Script %d - %s:%zu",
int(i), scriptList[i]->filename(), scriptList[i]->lineno());
}
// Write out runs first. Keep a vector tracking the positive offsets from payload
// start to the run.
const CodeGeneratorShared::NativeToBytecode* curEntry = start;
js::Vector<uint32_t, 32, SystemAllocPolicy> runOffsets;
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "jit/MIR.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/MathAlgorithms.h"
-#include "mozilla/SizePrintfMacros.h"
#include <ctype.h>
#include "jslibmath.h"
#include "jsstr.h"
#include "builtin/RegExp.h"
#include "jit/AtomicOperations.h"
@@ -1068,17 +1067,17 @@ MConstant::printOpcode(GenericPrinter& o
if (fun->displayAtom()) {
out.put("function ");
EscapedStringPrinter(out, fun->displayAtom(), 0);
} else {
out.put("unnamed function");
}
if (fun->hasScript()) {
JSScript* script = fun->nonLazyScript();
- out.printf(" (%s:%" PRIuSIZE ")",
+ out.printf(" (%s:%zu)",
script->filename() ? script->filename() : "", script->lineno());
}
out.printf(" at %p", (void*) fun);
break;
}
out.printf("object %p (%s)", (void*)&toObject(), toObject().getClass()->name);
break;
case MIRType::Symbol:
--- a/js/src/jit/OptimizationTracking.cpp
+++ b/js/src/jit/OptimizationTracking.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/OptimizationTracking.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jsprf.h"
#include "ds/Sort.h"
#include "jit/IonBuilder.h"
#include "jit/JitcodeMap.h"
#include "jit/JitSpewer.h"
#include "js/TrackedOptimizationInfo.h"
@@ -323,17 +322,17 @@ UniqueTrackedOptimizations::sortByFreque
for (size_t i = 0; i < entries.length(); i++) {
Key key;
key.types = entries[i].types;
key.attempts = entries[i].attempts;
AttemptsMap::Ptr p = map_.lookup(key);
MOZ_ASSERT(p);
p->value().index = sorted_.length();
- JitSpew(JitSpew_OptimizationTrackingExtended, " Entry %" PRIuSIZE " has frequency %" PRIu32,
+ JitSpew(JitSpew_OptimizationTrackingExtended, " Entry %zu has frequency %" PRIu32,
sorted_.length(), p->value().frequency);
if (!sorted_.append(entries[i]))
return false;
}
return true;
}
@@ -762,41 +761,41 @@ IonTrackedOptimizationsRegion::WriteDelt
/* static */ bool
IonTrackedOptimizationsRegion::WriteRun(CompactBufferWriter& writer,
const NativeToTrackedOptimizations* start,
const NativeToTrackedOptimizations* end,
const UniqueTrackedOptimizations& unique)
{
// Write the header, which is the range that this whole run encompasses.
- JitSpew(JitSpew_OptimizationTrackingExtended, " Header: [%" PRIuSIZE ", %" PRIuSIZE "]",
+ JitSpew(JitSpew_OptimizationTrackingExtended, " Header: [%zu, %zu]",
start->startOffset.offset(), (end - 1)->endOffset.offset());
writer.writeUnsigned(start->startOffset.offset());
writer.writeUnsigned((end - 1)->endOffset.offset());
// Write the first entry of the run, which is not delta-encoded.
JitSpew(JitSpew_OptimizationTrackingExtended,
- " [%6" PRIuSIZE ", %6" PRIuSIZE "] vector %3u, offset %4" PRIuSIZE,
+ " [%6zu, %6zu] vector %3u, offset %4zu",
start->startOffset.offset(), start->endOffset.offset(),
unique.indexOf(start->optimizations), writer.length());
uint32_t prevEndOffset = start->endOffset.offset();
writer.writeUnsigned(prevEndOffset);
writer.writeByte(unique.indexOf(start->optimizations));
// Delta encode the run.
for (const NativeToTrackedOptimizations* entry = start + 1; entry != end; entry++) {
uint32_t startOffset = entry->startOffset.offset();
uint32_t endOffset = entry->endOffset.offset();
uint32_t startDelta = startOffset - prevEndOffset;
uint32_t length = endOffset - startOffset;
uint8_t index = unique.indexOf(entry->optimizations);
JitSpew(JitSpew_OptimizationTrackingExtended,
- " [%6u, %6u] delta [+%5u, +%5u] vector %3u, offset %4" PRIuSIZE,
+ " [%6u, %6u] delta [+%5u, +%5u] vector %3u, offset %4zu",
startOffset, endOffset, startDelta, length, index, writer.length());
WriteDelta(writer, startDelta, length, index);
prevEndOffset = endOffset;
}
if (writer.oom())
@@ -822,17 +821,17 @@ WriteOffsetsTable(CompactBufferWriter& w
uint32_t tableOffset = writer.length();
// Write how many bytes were padded and numEntries.
writer.writeNativeEndianUint32_t(padding);
writer.writeNativeEndianUint32_t(offsets.length());
// Write entry offset table.
for (size_t i = 0; i < offsets.length(); i++) {
- JitSpew(JitSpew_OptimizationTrackingExtended, " Entry %" PRIuSIZE " reverse offset %u",
+ JitSpew(JitSpew_OptimizationTrackingExtended, " Entry %zu reverse offset %u",
i, tableOffset - padding - offsets[i]);
writer.writeNativeEndianUint32_t(tableOffset - padding - offsets[i]);
}
if (writer.oom())
return false;
*tableOffsetp = tableOffset;
@@ -919,33 +918,33 @@ jit::WriteIonTrackedOptimizationsTable(J
MOZ_ASSERT(unique.sorted());
#ifdef JS_JITSPEW
// Spew training data, which may be fed into a script to determine a good
// encoding strategy.
if (JitSpewEnabled(JitSpew_OptimizationTrackingExtended)) {
JitSpewStart(JitSpew_OptimizationTrackingExtended, "=> Training data: ");
for (const NativeToTrackedOptimizations* entry = start; entry != end; entry++) {
- JitSpewCont(JitSpew_OptimizationTrackingExtended, "%" PRIuSIZE ",%" PRIuSIZE ",%u ",
+ JitSpewCont(JitSpew_OptimizationTrackingExtended, "%zu,%zu,%u ",
entry->startOffset.offset(), entry->endOffset.offset(),
unique.indexOf(entry->optimizations));
}
JitSpewFin(JitSpew_OptimizationTrackingExtended);
}
#endif
Vector<uint32_t, 16> offsets(cx);
const NativeToTrackedOptimizations* entry = start;
// Write out region offloads, partitioned into runs.
JitSpew(JitSpew_Profiling, "=> Writing regions");
while (entry != end) {
uint32_t runLength = IonTrackedOptimizationsRegion::ExpectedRunLength(entry, end);
JitSpew(JitSpew_OptimizationTrackingExtended,
- " Run at entry %" PRIuSIZE ", length %" PRIu32 ", offset %" PRIuSIZE,
+ " Run at entry %zu, length %" PRIu32 ", offset %zu",
size_t(entry - start), runLength, writer.length());
if (!offsets.append(writer.length()))
return false;
if (!IonTrackedOptimizationsRegion::WriteRun(writer, entry, entry + runLength, unique))
return false;
@@ -958,28 +957,28 @@ jit::WriteIonTrackedOptimizationsTable(J
*numRegions = offsets.length();
// Clear offsets so that it may be reused below for the unique
// optimizations table.
offsets.clear();
const UniqueTrackedOptimizations::SortedVector& vec = unique.sortedVector();
- JitSpew(JitSpew_OptimizationTrackingExtended, "=> Writing unique optimizations table with %" PRIuSIZE " entr%s",
+ JitSpew(JitSpew_OptimizationTrackingExtended, "=> Writing unique optimizations table with %zu entr%s",
vec.length(), vec.length() == 1 ? "y" : "ies");
// Write out type info payloads.
UniqueTrackedTypes uniqueTypes(cx);
if (!uniqueTypes.init())
return false;
for (const UniqueTrackedOptimizations::SortEntry* p = vec.begin(); p != vec.end(); p++) {
const TempOptimizationTypeInfoVector* v = p->types;
JitSpew(JitSpew_OptimizationTrackingExtended,
- " Type info entry %" PRIuSIZE " of length %" PRIuSIZE ", offset %" PRIuSIZE,
+ " Type info entry %zu of length %zu, offset %zu",
size_t(p - vec.begin()), v->length(), writer.length());
SpewTempOptimizationTypeInfoVector(JitSpew_OptimizationTrackingExtended, v, " ");
if (!offsets.append(writer.length()))
return false;
for (const OptimizationTypeInfo* t = v->begin(); t != v->end(); t++) {
if (!t->writeCompact(cx, writer, uniqueTypes))
@@ -1021,17 +1020,17 @@ jit::WriteIonTrackedOptimizationsTable(J
return false;
offsets.clear();
// Write out attempts payloads.
for (const UniqueTrackedOptimizations::SortEntry* p = vec.begin(); p != vec.end(); p++) {
const TempOptimizationAttemptsVector* v = p->attempts;
if (JitSpewEnabled(JitSpew_OptimizationTrackingExtended)) {
JitSpew(JitSpew_OptimizationTrackingExtended,
- " Attempts entry %" PRIuSIZE " of length %" PRIuSIZE ", offset %" PRIuSIZE,
+ " Attempts entry %zu of length %zu, offset %zu",
size_t(p - vec.begin()), v->length(), writer.length());
SpewTempOptimizationAttemptsVector(JitSpew_OptimizationTrackingExtended, v, " ");
}
if (!offsets.append(writer.length()))
return false;
for (const OptimizationAttempt* a = v->begin(); a != v->end(); a++)
--- a/js/src/jit/PerfSpewer.cpp
+++ b/js/src/jit/PerfSpewer.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/PerfSpewer.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#ifdef XP_UNIX
# include <unistd.h>
#endif
#ifdef JS_ION_PERF
# include "jit/JitSpewer.h"
# include "jit/LIR.h"
@@ -202,17 +201,17 @@ PerfSpewer::writeProfile(JSScript* scrip
if (PerfFuncEnabled()) {
if (!lockPerfMap())
return;
uint32_t thisFunctionIndex = nextFunctionIndex++;
size_t size = code->instructionsSize();
if (size > 0) {
- fprintf(PerfFilePtr, "%p %" PRIxSIZE " %s:%" PRIuSIZE ": Func%02d\n",
+ fprintf(PerfFilePtr, "%p %zx %s:%zu: Func%02d\n",
code->raw(),
size,
script->filename(),
script->lineno(),
thisFunctionIndex);
}
unlockPerfMap();
return;
@@ -226,57 +225,57 @@ PerfSpewer::writeProfile(JSScript* scrip
uintptr_t funcStart = uintptr_t(code->raw());
uintptr_t funcEndInlineCode = funcStart + endInlineCode.offset();
uintptr_t funcEnd = funcStart + code->instructionsSize();
// function begins with the prologue, which is located before the first basic block
size_t prologueSize = basicBlocks_[0].start.offset();
if (prologueSize > 0) {
- fprintf(PerfFilePtr, "%" PRIxSIZE " %" PRIxSIZE " %s:%" PRIuSIZE ": Func%02d-Prologue\n",
+ fprintf(PerfFilePtr, "%zx %zx %s:%zu: Func%02d-Prologue\n",
funcStart, prologueSize, script->filename(), script->lineno(), thisFunctionIndex);
}
uintptr_t cur = funcStart + prologueSize;
for (uint32_t i = 0; i < basicBlocks_.length(); i++) {
Record& r = basicBlocks_[i];
uintptr_t blockStart = funcStart + r.start.offset();
uintptr_t blockEnd = funcStart + r.end.offset();
MOZ_ASSERT(cur <= blockStart);
if (cur < blockStart) {
- fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxPTR " %s:%" PRIuSIZE ": Func%02d-Block?\n",
+ fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxPTR " %s:%zu: Func%02d-Block?\n",
cur, blockStart - cur,
script->filename(), script->lineno(),
thisFunctionIndex);
}
cur = blockEnd;
size_t size = blockEnd - blockStart;
if (size > 0) {
- fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxSIZE " %s:%d:%d: Func%02d-Block%d\n",
+ fprintf(PerfFilePtr, "%" PRIxPTR " %zx %s:%d:%d: Func%02d-Block%d\n",
blockStart, size,
r.filename, r.lineNumber, r.columnNumber,
thisFunctionIndex, r.id);
}
}
MOZ_ASSERT(cur <= funcEndInlineCode);
if (cur < funcEndInlineCode) {
- fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxPTR " %s:%" PRIuSIZE ": Func%02d-Epilogue\n",
+ fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxPTR " %s:%zu: Func%02d-Epilogue\n",
cur, funcEndInlineCode - cur,
script->filename(), script->lineno(),
thisFunctionIndex);
}
MOZ_ASSERT(funcEndInlineCode <= funcEnd);
if (funcEndInlineCode < funcEnd) {
- fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxPTR " %s:%" PRIuSIZE ": Func%02d-OOL\n",
+ fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxPTR " %s:%zu: Func%02d-OOL\n",
funcEndInlineCode, funcEnd - funcEndInlineCode,
script->filename(), script->lineno(),
thisFunctionIndex);
}
unlockPerfMap();
return;
}
@@ -288,17 +287,17 @@ js::jit::writePerfSpewerBaselineProfile(
if (!PerfEnabled())
return;
if (!lockPerfMap())
return;
size_t size = code->instructionsSize();
if (size > 0) {
- fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxSIZE " %s:%" PRIuSIZE ": Baseline\n",
+ fprintf(PerfFilePtr, "%" PRIxPTR " %zx %s:%zu: Baseline\n",
reinterpret_cast<uintptr_t>(code->raw()),
size, script->filename(), script->lineno());
}
unlockPerfMap();
}
void
@@ -307,17 +306,17 @@ js::jit::writePerfSpewerJitCodeProfile(J
if (!code || !PerfEnabled())
return;
if (!lockPerfMap())
return;
size_t size = code->instructionsSize();
if (size > 0) {
- fprintf(PerfFilePtr, "%" PRIxPTR " %" PRIxSIZE " %s (%p 0x%" PRIxSIZE ")\n",
+ fprintf(PerfFilePtr, "%" PRIxPTR " %zx %s (%p 0x%zx)\n",
reinterpret_cast<uintptr_t>(code->raw()),
size, msg, code->raw(), size);
}
unlockPerfMap();
}
void
--- a/js/src/jit/Recover.cpp
+++ b/js/src/jit/Recover.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/Recover.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jsapi.h"
#include "jscntxt.h"
#include "jsiter.h"
#include "jsmath.h"
#include "jsobj.h"
#include "jsstr.h"
@@ -123,17 +122,17 @@ MResumePoint::writeRecoverData(CompactBu
MOZ_ASSERT(CountArgSlots(script, fun) < SNAPSHOT_MAX_NARGS + 4);
#ifdef JS_JITSPEW
uint32_t implicit = StartArgSlot(script);
#endif
uint32_t formalArgs = CountArgSlots(script, fun);
uint32_t nallocs = formalArgs + script->nfixed() + exprStack;
- JitSpew(JitSpew_IonSnapshots, "Starting frame; implicit %u, formals %u, fixed %" PRIuSIZE ", exprs %u",
+ JitSpew(JitSpew_IonSnapshots, "Starting frame; implicit %u, formals %u, fixed %zu, exprs %u",
implicit, formalArgs - implicit, script->nfixed(), exprStack);
uint32_t pcoff = script->pcToOffset(pc());
JitSpew(JitSpew_IonSnapshots, "Writing pc offset %u, nslots %u", pcoff, nallocs);
writer.writeUnsigned(pcoff);
writer.writeUnsigned(nallocs);
return true;
}
--- a/js/src/jit/RematerializedFrame.cpp
+++ b/js/src/jit/RematerializedFrame.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/RematerializedFrame.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/JitFrames.h"
#include "vm/ArgumentsObject.h"
#include "vm/Debugger.h"
#include "jsscriptinlines.h"
#include "jit/JitFrames-inl.h"
#include "vm/EnvironmentObject-inl.h"
@@ -161,17 +160,17 @@ RematerializedFrame::dump()
DumpValue(ObjectValue(*callee()));
#else
fprintf(stderr, "?\n");
#endif
} else {
fprintf(stderr, " global frame, no callee\n");
}
- fprintf(stderr, " file %s line %" PRIuSIZE " offset %" PRIuSIZE "\n",
+ fprintf(stderr, " file %s line %zu offset %zu\n",
script()->filename(), script()->lineno(),
script()->pcToOffset(pc()));
fprintf(stderr, " script = %p\n", (void*) script());
if (isFunctionFrame()) {
fprintf(stderr, " env chain: ");
#ifdef DEBUG
--- a/js/src/jit/Safepoints.cpp
+++ b/js/src/jit/Safepoints.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/Safepoints.h"
#include "mozilla/MathAlgorithms.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/BitSet.h"
#include "jit/JitSpewer.h"
#include "jit/LIR.h"
using namespace js;
using namespace jit;
@@ -27,17 +26,17 @@ bool
SafepointWriter::init(TempAllocator& alloc)
{
return frameSlots_.init(alloc) && argumentSlots_.init(alloc);
}
uint32_t
SafepointWriter::startEntry()
{
- JitSpew(JitSpew_Safepoints, "Encoding safepoint (position %" PRIuSIZE "):", stream_.length());
+ JitSpew(JitSpew_Safepoints, "Encoding safepoint (position %zu):", stream_.length());
return uint32_t(stream_.length());
}
void
SafepointWriter::writeOsiCallPointOffset(uint32_t osiCallPointOffset)
{
stream_.writeUnsigned(osiCallPointOffset);
}
--- a/js/src/jit/SharedIC.cpp
+++ b/js/src/jit/SharedIC.cpp
@@ -4,17 +4,16 @@
* 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/. */
#include "jit/SharedIC.h"
#include "mozilla/Casting.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "jslibmath.h"
#include "jstypes.h"
#include "gc/Policy.h"
#include "jit/BaselineCacheIRCompiler.h"
#include "jit/BaselineDebugModeOSR.h"
@@ -47,17 +46,17 @@ FallbackICSpew(JSContext* cx, ICFallback
char fmtbuf[100];
va_list args;
va_start(args, fmt);
(void) VsprintfLiteral(fmtbuf, fmt, args);
va_end(args);
JitSpew(JitSpew_BaselineICFallback,
- "Fallback hit for (%s:%" PRIuSIZE ") (pc=%" PRIuSIZE ",line=%d,uses=%d,stubs=%" PRIuSIZE "): %s",
+ "Fallback hit for (%s:%zu) (pc=%zu,line=%d,uses=%d,stubs=%zu): %s",
script->filename(),
script->lineno(),
script->pcToOffset(pc),
PCToLineNumber(script, pc),
script->getWarmUpCount(),
stub->numOptimizedStubs(),
fmtbuf);
}
@@ -72,17 +71,17 @@ TypeFallbackICSpew(JSContext* cx, ICType
char fmtbuf[100];
va_list args;
va_start(args, fmt);
(void) VsprintfLiteral(fmtbuf, fmt, args);
va_end(args);
JitSpew(JitSpew_BaselineICFallback,
- "Type monitor fallback hit for (%s:%" PRIuSIZE ") (pc=%" PRIuSIZE ",line=%d,uses=%d,stubs=%d): %s",
+ "Type monitor fallback hit for (%s:%zu) (pc=%zu,line=%d,uses=%d,stubs=%d): %s",
script->filename(),
script->lineno(),
script->pcToOffset(pc),
PCToLineNumber(script, pc),
script->getWarmUpCount(),
(int) stub->numOptimizedMonitorStubs(),
fmtbuf);
}
--- a/js/src/jit/arm/Simulator-arm.cpp
+++ b/js/src/jit/arm/Simulator-arm.cpp
@@ -28,17 +28,16 @@
#include "jit/arm/Simulator-arm.h"
#include "mozilla/Casting.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/Likely.h"
#include "mozilla/MathAlgorithms.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/arm/Assembler-arm.h"
#include "jit/arm/disasm/Constants-arm.h"
#include "jit/AtomicOperations.h"
#include "threading/LockGuard.h"
#include "vm/Runtime.h"
#include "vm/SharedMem.h"
#include "wasm/WasmInstance.h"
@@ -1099,17 +1098,17 @@ Simulator::setLastDebuggerInput(char* in
{
js_free(lastDebuggerInput_);
lastDebuggerInput_ = input;
}
/* static */ void
SimulatorProcess::FlushICache(void* start_addr, size_t size)
{
- JitSpewCont(JitSpew_CacheFlush, "[%p %" PRIxSIZE "]", start_addr, size);
+ JitSpewCont(JitSpew_CacheFlush, "[%p %zx]", start_addr, size);
if (!ICacheCheckingDisableCount) {
AutoLockSimulatorCache als;
js::jit::FlushICacheLocked(icache(), start_addr, size);
}
}
Simulator::Simulator(JSContext* cx)
: cx_(cx)
--- a/js/src/jit/shared/CodeGenerator-shared.cpp
+++ b/js/src/jit/shared/CodeGenerator-shared.cpp
@@ -2,17 +2,16 @@
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "jit/shared/CodeGenerator-shared-inl.h"
#include "mozilla/DebugOnly.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jit/CompactBuffer.h"
#include "jit/IonCaches.h"
#include "jit/JitcodeMap.h"
#include "jit/JitSpewer.h"
#include "jit/MacroAssembler.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
@@ -233,17 +232,17 @@ CodeGeneratorShared::addNativeToBytecode
NativeToBytecode& lastEntry = nativeToBytecodeList_[lastIdx];
MOZ_ASSERT(nativeOffset >= lastEntry.nativeOffset.offset());
// If the new entry is for the same inlineScriptTree and same
// bytecodeOffset, but the nativeOffset has changed, do nothing.
// The same site just generated some more code.
if (lastEntry.tree == tree && lastEntry.pc == pc) {
- JitSpew(JitSpew_Profiling, " => In-place update [%" PRIuSIZE "-%" PRIu32 "]",
+ JitSpew(JitSpew_Profiling, " => In-place update [%zu-%" PRIu32 "]",
lastEntry.nativeOffset.offset(), nativeOffset);
return true;
}
// If the new entry is for the same native offset, then update the
// previous entry with the new bytecode site, since the previous
// bytecode site did not generate any native code.
if (lastEntry.nativeOffset.offset() == nativeOffset) {
@@ -280,17 +279,17 @@ CodeGeneratorShared::addNativeToBytecode
return true;
}
void
CodeGeneratorShared::dumpNativeToBytecodeEntries()
{
#ifdef JS_JITSPEW
InlineScriptTree* topTree = gen->info().inlineScriptTree();
- JitSpewStart(JitSpew_Profiling, "Native To Bytecode Entries for %s:%" PRIuSIZE "\n",
+ JitSpewStart(JitSpew_Profiling, "Native To Bytecode Entries for %s:%zu\n",
topTree->script()->filename(), topTree->script()->lineno());
for (unsigned i = 0; i < nativeToBytecodeList_.length(); i++)
dumpNativeToBytecodeEntry(i);
#endif
}
void
CodeGeneratorShared::dumpNativeToBytecodeEntry(uint32_t idx)
@@ -303,26 +302,26 @@ CodeGeneratorShared::dumpNativeToBytecod
unsigned nativeDelta = 0;
unsigned pcDelta = 0;
if (idx + 1 < nativeToBytecodeList_.length()) {
NativeToBytecode* nextRef = &ref + 1;
nativeDelta = nextRef->nativeOffset.offset() - nativeOffset;
if (nextRef->tree == ref.tree)
pcDelta = nextRef->pc - ref.pc;
}
- JitSpewStart(JitSpew_Profiling, " %08" PRIxSIZE " [+%-6d] => %-6ld [%-4d] {%-10s} (%s:%" PRIuSIZE,
+ JitSpewStart(JitSpew_Profiling, " %08zx [+%-6d] => %-6ld [%-4d] {%-10s} (%s:%zu",
ref.nativeOffset.offset(),
nativeDelta,
(long) (ref.pc - script->code()),
pcDelta,
CodeName[JSOp(*ref.pc)],
script->filename(), script->lineno());
for (tree = tree->caller(); tree; tree = tree->caller()) {
- JitSpewCont(JitSpew_Profiling, " <= %s:%" PRIuSIZE, tree->script()->filename(),
+ JitSpewCont(JitSpew_Profiling, " <= %s:%zu", tree->script()->filename(),
tree->script()->lineno());
}
JitSpewCont(JitSpew_Profiling, ")");
JitSpewFin(JitSpew_Profiling);
#endif
}
bool
@@ -928,17 +927,17 @@ CodeGeneratorShared::generateCompactTrac
trackedOptimizationsAttemptsTableOffset_ = attemptsTableOffset;
verifyCompactTrackedOptimizationsMap(code, numRegions, unique, allTypes);
JitSpew(JitSpew_OptimizationTrackingExtended,
"== Compact Native To Optimizations Map [%p-%p] size %u",
data, data + trackedOptimizationsMapSize_, trackedOptimizationsMapSize_);
JitSpew(JitSpew_OptimizationTrackingExtended,
- " with type list of length %" PRIuSIZE ", size %" PRIuSIZE,
+ " with type list of length %zu, size %zu",
allTypes->length(), allTypes->length() * sizeof(IonTrackedTypeWithAddendum));
return true;
}
#ifdef DEBUG
class ReadTempAttemptsVectorOp : public JS::ForEachTrackedOptimizationAttemptOp
{
--- a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h
+++ b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#ifndef jit_shared_IonAssemblerBufferWithConstantPools_h
#define jit_shared_IonAssemblerBufferWithConstantPools_h
#include "mozilla/MathAlgorithms.h"
-#include "mozilla/SizePrintfMacros.h"
#include <algorithm>
#include "jit/JitSpewer.h"
#include "jit/shared/IonAssemblerBuffer.h"
// This code extends the AssemblerBuffer to support the pooling of values loaded
// using program-counter relative addressing modes. This is necessary with the
@@ -788,17 +787,17 @@ struct AssemblerBufferWithConstantPools
// range check.
if (numPoolEntries)
pool_.updateLimiter(BufferOffset(sizeExcludingCurrentPool()));
if (!hasSpaceForInsts(numInst, numPoolEntries)) {
if (numPoolEntries)
JitSpew(JitSpew_Pools, "[%d] Inserting pool entry caused a spill", id);
else
- JitSpew(JitSpew_Pools, "[%d] Inserting instruction(%" PRIuSIZE ") caused a spill", id,
+ JitSpew(JitSpew_Pools, "[%d] Inserting instruction(%zu) caused a spill", id,
sizeExcludingCurrentPool());
finishPool();
if (this->oom())
return OOM_FAIL;
return insertEntryForwards(numInst, numPoolEntries, inst, data);
}
if (numPoolEntries) {
@@ -859,17 +858,17 @@ struct AssemblerBufferWithConstantPools
// Insert the pool value.
unsigned index = insertEntryForwards(numInst, numPoolEntries, inst, data);
if (this->oom())
return BufferOffset();
// Now to get an instruction to write.
PoolEntry retPE;
if (numPoolEntries) {
- JitSpew(JitSpew_Pools, "[%d] Entry has index %u, offset %" PRIuSIZE, id, index,
+ JitSpew(JitSpew_Pools, "[%d] Entry has index %u, offset %zu", id, index,
sizeExcludingCurrentPool());
Asm::InsertIndexIntoTag(inst, index);
// Figure out the offset within the pool entries.
retPE = PoolEntry(poolEntryCount);
poolEntryCount += numPoolEntries;
}
// Now inst is a valid thing to insert into the instruction stream.
if (pe != nullptr)
@@ -957,17 +956,17 @@ struct AssemblerBufferWithConstantPools
// Include branches that would expire in the next N bytes.
// The hysteresis avoids the needless creation of many tiny constant
// pools.
return this->nextOffset().getOffset() + ShortRangeBranchHysteresis >
size_t(branchDeadlines_.earliestDeadline().getOffset());
}
void finishPool() {
- JitSpew(JitSpew_Pools, "[%d] Attempting to finish pool %" PRIuSIZE " with %u entries.",
+ JitSpew(JitSpew_Pools, "[%d] Attempting to finish pool %zu with %u entries.",
id, poolInfo_.length(), pool_.numEntries());
if (pool_.numEntries() == 0 && !hasExpirableShortRangeBranches()) {
// If there is no data in the pool being dumped, don't dump anything.
JitSpew(JitSpew_Pools, "[%d] Aborting because the pool is empty", id);
return;
}
@@ -1026,17 +1025,17 @@ struct AssemblerBufferWithConstantPools
// substitutions.
Inst* inst = this->getInst(*iter);
size_t codeOffset = poolOffset - iter->getOffset();
// That is, PatchConstantPoolLoad wants to be handed the address of
// the pool entry that is being loaded. We need to do a non-trivial
// amount of math here, since the pool that we've made does not
// actually reside there in memory.
- JitSpew(JitSpew_Pools, "[%d] Fixing entry %d offset to %" PRIuSIZE, id, idx, codeOffset);
+ JitSpew(JitSpew_Pools, "[%d] Fixing entry %d offset to %zu", id, idx, codeOffset);
Asm::PatchConstantPoolLoad(inst, (uint8_t*)inst + codeOffset);
}
// Record the pool info.
unsigned firstEntry = poolEntryCount - pool_.numEntries();
if (!poolInfo_.append(PoolInfo(firstEntry, data))) {
this->fail_oom();
return;
@@ -1059,17 +1058,17 @@ struct AssemblerBufferWithConstantPools
MOZ_ASSERT(!canNotPlacePool_);
insertNopFill();
// Check if the pool will spill by adding maxInst instructions, and if
// so then finish the pool before entering the no-pool region. It is
// assumed that no pool entries are allocated in a no-pool region and
// this is asserted when allocating entries.
if (!hasSpaceForInsts(maxInst, 0)) {
- JitSpew(JitSpew_Pools, "[%d] No-Pool instruction(%" PRIuSIZE ") caused a spill.", id,
+ JitSpew(JitSpew_Pools, "[%d] No-Pool instruction(%zu) caused a spill.", id,
sizeExcludingCurrentPool());
finishPool();
}
#ifdef DEBUG
// Record the buffer position to allow validating maxInst when leaving
// the region.
canNotPlacePoolStartOffset_ = this->nextOffset().getOffset();
@@ -1099,17 +1098,17 @@ struct AssemblerBufferWithConstantPools
if (requiredFill == 0)
return;
requiredFill = alignment - requiredFill;
// Add an InstSize because it is probably not useful for a pool to be
// dumped at the aligned code position.
if (!hasSpaceForInsts(requiredFill / InstSize + 1, 0)) {
// Alignment would cause a pool dump, so dump the pool now.
- JitSpew(JitSpew_Pools, "[%d] Alignment of %d at %" PRIuSIZE " caused a spill.",
+ JitSpew(JitSpew_Pools, "[%d] Alignment of %d at %zu caused a spill.",
id, alignment, sizeExcludingCurrentPool());
finishPool();
}
inhibitNops_ = true;
while ((sizeExcludingCurrentPool() & (alignment - 1)) && !this->oom())
putInt(alignFillInst_);
inhibitNops_ = false;
--- a/js/src/jsapi-tests/testPrintf.cpp
+++ b/js/src/jsapi-tests/testPrintf.cpp
@@ -1,17 +1,16 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include <cfloat>
#include <stdarg.h>
#include "jsprf.h"
#include "jsapi-tests/tests.h"
@@ -46,17 +45,17 @@ BEGIN_TEST(testPrintf)
// This could be expanded if need be, it's just convenient to do
// it this way.
if (sizeof(short) == 2) {
CHECK(print_one("8000", "%hx", (unsigned short) 0x8000));
}
CHECK(print_one("0xf0f0", "0x%lx", 0xf0f0ul));
CHECK(print_one("0xF0F0", "0x%llX", 0xf0f0ull));
CHECK(print_one("27270", "%zu", (size_t) 27270));
- CHECK(print_one("27270", "%" PRIuSIZE, (size_t) 27270));
+ CHECK(print_one("27270", "%zu", (size_t) 27270));
CHECK(print_one("hello", "he%so", "ll"));
CHECK(print_one("(null)", "%s", zero()));
CHECK(print_one("0", "%p", (char *) 0));
CHECK(print_one("h", "%c", 'h'));
CHECK(print_one("1.500000", "%f", 1.5f));
CHECK(print_one("1.5", "%g", 1.5));
// Regression test for bug#1350097. The bug was an assertion
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -188,17 +188,16 @@
#include "jsgcinlines.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/MacroForEach.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Move.h"
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Unused.h"
#include <ctype.h>
#include <string.h>
#ifndef XP_WIN
# include <sys/mman.h>
# include <unistd.h>
@@ -1120,23 +1119,23 @@ FOR_EACH_ALLOCKIND(EXPAND_THING_NAME)
size_t i = size_t(kind);
MOZ_ASSERT(i < ArrayLength(names));
return names[i];
}
void
js::gc::DumpArenaInfo()
{
- fprintf(stderr, "Arena header size: %" PRIuSIZE "\n\n", ArenaHeaderSize);
+ fprintf(stderr, "Arena header size: %zu\n\n", ArenaHeaderSize);
fprintf(stderr, "GC thing kinds:\n");
fprintf(stderr, "%25s %8s %8s %8s\n", "AllocKind:", "Size:", "Count:", "Padding:");
for (auto kind : AllAllocKinds()) {
fprintf(stderr,
- "%25s %8" PRIuSIZE " %8" PRIuSIZE " %8" PRIuSIZE "\n",
+ "%25s %8zu %8zu %8zu\n",
AllocKindName(kind),
Arena::thingSize(kind),
Arena::thingsPerArena(kind),
Arena::firstThingOffset(kind) - ArenaHeaderSize);
}
}
#endif // JS_GC_ZEAL
@@ -3659,17 +3658,17 @@ ArenaLists::checkEmptyArenaList(AllocKin
TenuredCell* t = i.getCell();
MOZ_ASSERT(t->isMarkedAny(), "unmarked cells should have been finalized");
if (++num_live <= max_cells) {
fprintf(stderr, "ERROR: GC found live Cell %p of kind %s at shutdown\n",
t, AllocKindToAscii(kind));
}
}
}
- fprintf(stderr, "ERROR: GC found %" PRIuSIZE " live Cells at shutdown\n", num_live);
+ fprintf(stderr, "ERROR: GC found %zu live Cells at shutdown\n", num_live);
}
#endif // DEBUG
return num_live == 0;
}
class MOZ_RAII js::gc::AutoRunParallelTask : public GCParallelTask
{
using Func = void (*)(JSRuntime*);
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -8,17 +8,16 @@
* JS object implementation.
*/
#include "jsobjinlines.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TemplateLib.h"
#include <string.h>
#include "jsapi.h"
#include "jsarray.h"
#include "jsatom.h"
#include "jscntxt.h"
@@ -3384,17 +3383,17 @@ dumpValue(const Value& v, FILE* fp)
if (fun->displayAtom()) {
fputs("<function ", fp);
FileEscapedString(fp, fun->displayAtom(), 0);
} else {
fputs("<unnamed function", fp);
}
if (fun->hasScript()) {
JSScript* script = fun->nonLazyScript();
- fprintf(fp, " (%s:%" PRIuSIZE ")",
+ fprintf(fp, " (%s:%zu)",
script->filename() ? script->filename() : "", script->lineno());
}
fprintf(fp, " at %p>", (void*) fun);
} else if (v.isObject()) {
JSObject* obj = &v.toObject();
const Class* clasp = obj->getClass();
fprintf(fp, "<%s%s at %p>",
clasp->name,
@@ -3650,17 +3649,17 @@ js::DumpInterpreterFrame(JSContext* cx,
JSObject* fun = i.callee(cx);
v.setObject(*fun);
dumpValue(v, fp);
} else {
fprintf(fp, "global or eval frame, no callee");
}
fputc('\n', fp);
- fprintf(fp, "file %s line %" PRIuSIZE "\n",
+ fprintf(fp, "file %s line %zu\n",
i.script()->filename(), i.script()->lineno());
if (jsbytecode* pc = i.pc()) {
fprintf(fp, " pc = %p\n", pc);
fprintf(fp, " current op: %s\n", CodeName[*pc]);
MaybeDumpScope(i.script()->lookupScope(pc), fp);
}
if (i.isFunctionFrame())
@@ -3709,21 +3708,21 @@ js::DumpBacktrace(JSContext* cx, FILE* f
}
char frameType =
i.isInterp() ? 'i' :
i.isBaseline() ? 'b' :
i.isIon() ? 'I' :
i.isWasm() ? 'W' :
'?';
- sprinter.printf("#%" PRIuSIZE " %14p %c %s:%d",
+ sprinter.printf("#%zu %14p %c %s:%d",
depth, i.rawFramePtr(), frameType, filename, line);
if (i.hasScript()) {
- sprinter.printf(" (%p @ %" PRIuSIZE ")\n",
+ sprinter.printf(" (%p @ %zu)\n",
i.script(), i.script()->pcToOffset(i.pc()));
} else {
sprinter.printf(" (%p)\n", i.pc());
}
}
fprintf(fp, "%s", sprinter.string());
#ifdef XP_WIN32
if (IsDebuggerPresent())
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -8,17 +8,16 @@
* JS bytecode descriptors, disassemblers, and (expression) decompilers.
*/
#include "jsopcodeinlines.h"
#define __STDC_FORMAT_MACROS
#include "mozilla/Attributes.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "mozilla/Vector.h"
#include <algorithm>
#include <ctype.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
@@ -149,17 +148,17 @@ js::StackDefs(JSScript* script, jsbyteco
return cs.ndefs;
}
const char * PCCounts::numExecName = "interp";
static MOZ_MUST_USE bool
DumpIonScriptCounts(Sprinter* sp, HandleScript script, jit::IonScriptCounts* ionCounts)
{
- if (!sp->jsprintf("IonScript [%" PRIuSIZE " blocks]:\n", ionCounts->numBlocks()))
+ if (!sp->jsprintf("IonScript [%zu blocks]:\n", ionCounts->numBlocks()))
return false;
for (size_t i = 0; i < ionCounts->numBlocks(); i++) {
const jit::IonBlockCounts& block = ionCounts->block(i);
unsigned lineNumber = 0, columnNumber = 0;
lineNumber = PCToLineNumber(script, script->offsetToPC(block.offset()), &columnNumber);
if (!sp->jsprintf("BB #%" PRIu32 " [%05u,%u,%u]",
block.id(), block.offset(), lineNumber, columnNumber))
@@ -237,21 +236,21 @@ js::DumpCompartmentPCCounts(JSContext* c
}
for (uint32_t i = 0; i < scripts.length(); i++) {
HandleScript script = scripts[i];
Sprinter sprinter(cx);
if (!sprinter.init())
return false;
- fprintf(stdout, "--- SCRIPT %s:%" PRIuSIZE " ---\n", script->filename(), script->lineno());
+ fprintf(stdout, "--- SCRIPT %s:%zu ---\n", script->filename(), script->lineno());
if (!DumpPCCounts(cx, script, &sprinter))
return false;
fputs(sprinter.string(), stdout);
- fprintf(stdout, "--- END SCRIPT %s:%" PRIuSIZE " ---\n", script->filename(), script->lineno());
+ fprintf(stdout, "--- END SCRIPT %s:%zu ---\n", script->filename(), script->lineno());
}
return true;
}
/////////////////////////////////////////////////////////////////////
// Bytecode Parser
/////////////////////////////////////////////////////////////////////
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -10,17 +10,16 @@
#include "mozilla/Atomics.h"
#include "mozilla/Attributes.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/GuardObjects.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/mozalloc.h"
#include "mozilla/PodOperations.h"
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "mozilla/TimeStamp.h"
#ifdef XP_WIN
# include <direct.h>
# include <process.h>
#endif
#include <errno.h>
@@ -1715,19 +1714,19 @@ Evaluate(JSContext* cx, unsigned argc, V
}
if (saveBytecode || saveIncrementalBytecode) {
// If we are both loading and saving, we assert that we are going to
// replace the current bytecode by the same stream of bytes.
if (loadBytecode && assertEqBytecode) {
if (saveBuffer.length() != loadBuffer.length()) {
char loadLengthStr[16];
- SprintfLiteral(loadLengthStr, "%" PRIuSIZE, loadBuffer.length());
+ SprintfLiteral(loadLengthStr, "%zu", loadBuffer.length());
char saveLengthStr[16];
- SprintfLiteral(saveLengthStr,"%" PRIuSIZE, saveBuffer.length());
+ SprintfLiteral(saveLengthStr,"%zu", saveBuffer.length());
JS_ReportErrorNumberASCII(cx, my_GetErrorMessage, nullptr, JSSMSG_CACHE_EQ_SIZE_FAILED,
loadLengthStr, saveLengthStr);
return false;
}
if (!PodEqual(loadBuffer.begin(), saveBuffer.begin(), loadBuffer.length())) {
JS_ReportErrorNumberASCII(cx, my_GetErrorMessage, nullptr,
@@ -5628,17 +5627,17 @@ ReflectTrackedOptimizations(JSContext* c
// Use endOffset, as startOffset may be associated with a
// previous, adjacent region ending exactly at startOffset. That
// is, suppose we have two regions [0, startOffset], [startOffset,
// endOffset]. Since we are not querying a return address, we want
// the second region and not the first.
uint8_t* addr = ion->method()->raw() + endOffset;
entry.youngestFrameLocationAtAddr(rt, addr, &script, &pc);
- if (!sp.jsprintf("{\"location\":\"%s:%" PRIuSIZE "\",\"offset\":%" PRIuSIZE ",\"index\":%u}%s",
+ if (!sp.jsprintf("{\"location\":\"%s:%zu\",\"offset\":%zu,\"index\":%u}%s",
script->filename(), script->lineno(), script->pcToOffset(pc), index,
iter.more() ? "," : ""))
{
return false;
}
}
}
--- a/js/src/vm/CodeCoverage.cpp
+++ b/js/src/vm/CodeCoverage.cpp
@@ -107,26 +107,26 @@ LCovSource::exportInto(GenericPrinter& o
// Only write if everything got recorded.
if (!hasTopLevelScript_)
return;
out.printf("SF:%s\n", name_);
outFN_.exportInto(out);
outFNDA_.exportInto(out);
- out.printf("FNF:%" PRIuSIZE "\n", numFunctionsFound_);
- out.printf("FNH:%" PRIuSIZE "\n", numFunctionsHit_);
+ out.printf("FNF:%zu\n", numFunctionsFound_);
+ out.printf("FNH:%zu\n", numFunctionsHit_);
outBRDA_.exportInto(out);
- out.printf("BRF:%" PRIuSIZE "\n", numBranchesFound_);
- out.printf("BRH:%" PRIuSIZE "\n", numBranchesHit_);
+ out.printf("BRF:%zu\n", numBranchesFound_);
+ out.printf("BRH:%zu\n", numBranchesHit_);
outDA_.exportInto(out);
- out.printf("LF:%" PRIuSIZE "\n", numLinesInstrumented_);
- out.printf("LH:%" PRIuSIZE "\n", numLinesHit_);
+ out.printf("LF:%zu\n", numLinesInstrumented_);
+ out.printf("LH:%zu\n", numLinesHit_);
out.put("end_of_record\n");
}
bool
LCovSource::writeScriptName(LSprinter& out, JSScript* script)
{
JSFunction* fun = script->functionNonDelazifying();
@@ -135,17 +135,17 @@ LCovSource::writeScriptName(LSprinter& o
out.printf("top-level");
return true;
}
bool
LCovSource::writeScript(JSScript* script)
{
numFunctionsFound_++;
- outFN_.printf("FN:%" PRIuSIZE ",", script->lineno());
+ outFN_.printf("FN:%zu,", script->lineno());
if (!writeScriptName(outFN_, script))
return false;
outFN_.put("\n", 1);
uint64_t hits = 0;
ScriptCounts* sc = nullptr;
if (script->hasScriptCounts()) {
sc = &script->getScriptCounts();
@@ -197,17 +197,17 @@ LCovSource::writeScript(JSScript* script
else if (type == SRC_TABLESWITCH)
tableswitchExitOffset = GetSrcNoteOffset(sn, 0);
sn = SN_NEXT(sn);
snpc += SN_DELTA(sn);
}
if (oldLine != lineno && fallsthrough) {
- outDA_.printf("DA:%" PRIuSIZE ",%" PRIu64 "\n", lineno, hits);
+ outDA_.printf("DA:%zu,%" PRIu64 "\n", lineno, hits);
// Count the number of lines instrumented & hit.
numLinesInstrumented_++;
if (hits)
numLinesHit_++;
}
}
@@ -226,23 +226,23 @@ LCovSource::writeScript(JSScript* script
uint64_t fallthroughHits = 0;
if (sc) {
const PCCounts* counts = sc->maybeGetPCCounts(script->pcToOffset(fallthroughTarget));
if (counts)
fallthroughHits = counts->numExec();
}
uint64_t taken = hits - fallthroughHits;
- outBRDA_.printf("BRDA:%" PRIuSIZE ",%" PRIuSIZE ",0,", lineno, branchId);
+ outBRDA_.printf("BRDA:%zu,%zu,0,", lineno, branchId);
if (taken)
outBRDA_.printf("%" PRIu64 "\n", taken);
else
outBRDA_.put("-\n", 2);
- outBRDA_.printf("BRDA:%" PRIuSIZE ",%" PRIuSIZE ",1,", lineno, branchId);
+ outBRDA_.printf("BRDA:%zu,%zu,1,", lineno, branchId);
if (fallthroughHits)
outBRDA_.printf("%" PRIu64 "\n", fallthroughHits);
else
outBRDA_.put("-\n", 2);
// Count the number of branches, and the number of branches hit.
numBranchesFound_ += 2;
if (hits)
@@ -329,17 +329,17 @@ LCovSource::writeScript(JSScript* script
if (BytecodeFallsThrough(JSOp(*endpc)))
fallsThroughHits = script->getHitCount(endpc);
}
caseHits -= fallsThroughHits;
}
- outBRDA_.printf("BRDA:%" PRIuSIZE ",%" PRIuSIZE ",%" PRIuSIZE ",",
+ outBRDA_.printf("BRDA:%zu,%zu,%zu,",
lineno, branchId, caseId);
if (caseHits)
outBRDA_.printf("%" PRIu64 "\n", caseHits);
else
outBRDA_.put("-\n", 2);
numBranchesFound_++;
numBranchesHit_ += !!caseHits;
@@ -394,17 +394,17 @@ LCovSource::writeScript(JSScript* script
const PCCounts* counts = sc->maybeGetPCCounts(script->pcToOffset(defaultpc));
if (counts)
defaultHits = counts->numExec();
}
defaultHits -= fallsThroughHits;
}
if (defaultHasOwnClause) {
- outBRDA_.printf("BRDA:%" PRIuSIZE ",%" PRIuSIZE ",%" PRIuSIZE ",",
+ outBRDA_.printf("BRDA:%zu,%zu,%zu,",
lineno, branchId, caseId);
if (defaultHits)
outBRDA_.printf("%" PRIu64 "\n", defaultHits);
else
outBRDA_.put("-\n", 2);
numBranchesFound_++;
numBranchesHit_ += !!defaultHits;
}
@@ -584,17 +584,17 @@ LCovRuntime::fillWithFilename(char *name
const char* outDir = getenv("JS_CODE_COVERAGE_OUTPUT_DIR");
if (!outDir || *outDir == 0)
return false;
int64_t timestamp = static_cast<double>(PRMJ_Now()) / PRMJ_USEC_PER_SEC;
static mozilla::Atomic<size_t> globalRuntimeId(0);
size_t rid = globalRuntimeId++;
- int len = snprintf(name, length, "%s/%" PRId64 "-%" PRIu32 "-%" PRIuSIZE ".info",
+ int len = snprintf(name, length, "%s/%" PRId64 "-%" PRIu32 "-%zu.info",
outDir, timestamp, pid_, rid);
if (len < 0 || size_t(len) >= length) {
fprintf(stderr, "Warning: LCovRuntime::init: Cannot serialize file name.");
return false;
}
return true;
}
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -353,17 +353,17 @@ class MOZ_RAII js::EnterDebuggeeNoExecut
AutoCompartment ac(cx, nx->debugger().toJSObject());
nx->reported_ = true;
if (cx->options().dumpStackOnDebuggeeWouldRun()) {
fprintf(stdout, "Dumping stack for DebuggeeWouldRun:\n");
DumpBacktrace(cx);
}
const char* filename = script->filename() ? script->filename() : "(none)";
char linenoStr[15];
- SprintfLiteral(linenoStr, "%" PRIuSIZE, script->lineno());
+ SprintfLiteral(linenoStr, "%zu", script->lineno());
unsigned flags = warning ? JSREPORT_WARNING : JSREPORT_ERROR;
// FIXME: filename should be UTF-8 (bug 987069).
return JS_ReportErrorFlagsAndNumberLatin1(cx, flags, GetErrorMessage, nullptr,
JSMSG_DEBUGGEE_WOULD_RUN,
filename, linenoStr);
}
}
return true;
--- a/js/src/vm/EnvironmentObject.cpp
+++ b/js/src/vm/EnvironmentObject.cpp
@@ -3,17 +3,16 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "vm/EnvironmentObject-inl.h"
#include "mozilla/PodOperations.h"
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
#include "jscompartment.h"
#include "jsiter.h"
#include "builtin/ModuleObject.h"
#include "gc/Policy.h"
#include "vm/ArgumentsObject.h"
#include "vm/AsyncFunction.h"
@@ -3636,24 +3635,24 @@ AnalyzeEntrainedVariablesInScript(JSCont
buf.printf("Script ");
if (JSAtom* name = script->functionNonDelazifying()->displayAtom()) {
buf.putString(name);
buf.printf(" ");
}
- buf.printf("(%s:%" PRIuSIZE ") has variables entrained by ", script->filename(), script->lineno());
+ buf.printf("(%s:%zu) has variables entrained by ", script->filename(), script->lineno());
if (JSAtom* name = innerScript->functionNonDelazifying()->displayAtom()) {
buf.putString(name);
buf.printf(" ");
}
- buf.printf("(%s:%" PRIuSIZE ") ::", innerScript->filename(), innerScript->lineno());
+ buf.printf("(%s:%zu) ::", innerScript->filename(), innerScript->lineno());
for (PropertyNameSet::Range r = remainingNames.all(); !r.empty(); r.popFront()) {
buf.printf(" ");
buf.putString(r.front());
}
printf("%s\n", buf.string());
}
--- a/js/src/vm/JSONPrinter.cpp
+++ b/js/src/vm/JSONPrinter.cpp
@@ -4,17 +4,16 @@
* 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/. */
#include "vm/JSONPrinter.h"
#include "mozilla/Assertions.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include <stdarg.h>
#include "jsdtoa.h"
using namespace js;
JSONPrinter::~JSONPrinter()
@@ -158,17 +157,17 @@ JSONPrinter::property(const char* name,
out_.printf("%" PRIu64, value);
}
#if defined(XP_DARWIN) || defined(__OpenBSD__)
void
JSONPrinter::property(const char* name, size_t value)
{
propertyName(name);
- out_.printf("%" PRIuSIZE, value);
+ out_.printf("%zu", value);
}
#endif
void
JSONPrinter::floatProperty(const char* name, double value, size_t precision)
{
if (!mozilla::IsFinite(value)) {
propertyName(name);
--- a/js/src/vm/String.cpp
+++ b/js/src/vm/String.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "vm/String-inl.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/PodOperations.h"
#include "mozilla/RangedPtr.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TypeTraits.h"
#include "mozilla/Unused.h"
#include "gc/Marking.h"
#include "js/GCAPI.h"
#include "js/UbiNode.h"
#include "vm/GeckoProfiler.h"
@@ -197,17 +196,17 @@ JSString::dumpRepresentation(FILE* fp, i
}
void
JSString::dumpRepresentationHeader(FILE* fp, int indent, const char* subclass) const
{
uint32_t flags = d.u1.flags;
// Print the string's address as an actual C++ expression, to facilitate
// copy-and-paste into a debugger.
- fprintf(fp, "((%s*) %p) length: %" PRIuSIZE " flags: 0x%x", subclass, this, length(), flags);
+ fprintf(fp, "((%s*) %p) length: %zu flags: 0x%x", subclass, this, length(), flags);
if (flags & FLAT_BIT) fputs(" FLAT", fp);
if (flags & HAS_BASE_BIT) fputs(" HAS_BASE", fp);
if (flags & INLINE_CHARS_BIT) fputs(" INLINE_CHARS", fp);
if (flags & ATOM_BIT) fputs(" ATOM", fp);
if (isPermanentAtom()) fputs(" PERMANENT", fp);
if (flags & LATIN1_CHARS_BIT) fputs(" LATIN1", fp);
if (flags & INDEX_VALUE_BIT) fprintf(fp, " INDEX_VALUE(%u)", getIndexValue());
fputc('\n', fp);
@@ -715,17 +714,17 @@ JSDependentString::undepend(JSContext* c
#ifdef DEBUG
void
JSDependentString::dumpRepresentation(FILE* fp, int indent) const
{
dumpRepresentationHeader(fp, indent, "JSDependentString");
indent += 2;
if (mozilla::Maybe<size_t> offset = baseOffset())
- fprintf(fp, "%*soffset: %" PRIuSIZE "\n", indent, "", *offset);
+ fprintf(fp, "%*soffset: %zu\n", indent, "", *offset);
fprintf(fp, "%*sbase: ", indent, "");
base()->dumpRepresentation(fp, indent);
}
#endif
template <typename CharT>
/* static */ bool
@@ -1488,17 +1487,17 @@ NewMaybeExternalString(JSContext* cx, co
#ifdef DEBUG
void
JSExtensibleString::dumpRepresentation(FILE* fp, int indent) const
{
dumpRepresentationHeader(fp, indent, "JSExtensibleString");
indent += 2;
- fprintf(fp, "%*scapacity: %" PRIuSIZE "\n", indent, "", capacity());
+ fprintf(fp, "%*scapacity: %zu\n", indent, "", capacity());
dumpRepresentationChars(fp, indent);
}
void
JSInlineString::dumpRepresentation(FILE* fp, int indent) const
{
dumpRepresentationHeader(fp, indent,
isFatInline() ? "JSFatInlineString" : "JSThinInlineString");
--- a/js/src/vm/TraceLogging.cpp
+++ b/js/src/vm/TraceLogging.cpp
@@ -469,17 +469,17 @@ TraceLoggerThreadState::getOrCreateEvent
for (size_t i = colno; i /= 10; lenColno++);
size_t len = 7 + lenFilename + 1 + lenLineno + 1 + lenColno;
char* str = js_pod_malloc<char>(len + 1);
if (!str)
return nullptr;
DebugOnly<size_t> ret =
- snprintf(str, len + 1, "script %s:%" PRIuSIZE ":%" PRIuSIZE, filename, lineno, colno);
+ snprintf(str, len + 1, "script %s:%zu:%zu", filename, lineno, colno);
MOZ_ASSERT(ret == len);
MOZ_ASSERT(strlen(str) == len);
uint32_t textId = nextTextId;
TraceLoggerEventPayload* payload = js_new<TraceLoggerEventPayload>(textId, str);
if (!payload) {
js_free(str);
return nullptr;
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "vm/TypeInference-inl.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/PodOperations.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "jsapi.h"
#include "jscntxt.h"
#include "jsgc.h"
#include "jshashutil.h"
#include "jsobj.h"
#include "jsprf.h"
@@ -2553,17 +2552,17 @@ TypeZone::processPendingRecompiles(FreeO
void
TypeZone::addPendingRecompile(JSContext* cx, const RecompileInfo& info)
{
CompilerOutput* co = info.compilerOutput(cx);
if (!co || !co->isValid() || co->pendingInvalidation())
return;
- InferSpew(ISpewOps, "addPendingRecompile: %p:%s:%" PRIuSIZE,
+ InferSpew(ISpewOps, "addPendingRecompile: %p:%s:%zu",
co->script(), co->script()->filename(), co->script()->lineno());
co->setPendingInvalidation();
AutoEnterOOMUnsafeRegion oomUnsafe;
if (!cx->zone()->types.activeAnalysis->pendingRecompiles.append(info))
oomUnsafe.crash("Could not update pendingRecompiles");
}
@@ -3331,33 +3330,33 @@ js::TypeMonitorResult(JSContext* cx, JSS
assertSameCompartment(cx, script, type);
AutoEnterAnalysis enter(cx);
StackTypeSet* types = TypeScript::BytecodeTypes(script, pc);
if (types->hasType(type))
return;
- InferSpew(ISpewOps, "bytecodeType: %p %05" PRIuSIZE ": %s",
+ InferSpew(ISpewOps, "bytecodeType: %p %05zu: %s",
script, script->pcToOffset(pc), TypeSet::TypeString(type));
types->addType(cx, type);
}
void
js::TypeMonitorResult(JSContext* cx, JSScript* script, jsbytecode* pc, StackTypeSet* types,
TypeSet::Type type)
{
assertSameCompartment(cx, script, type);
AutoEnterAnalysis enter(cx);
MOZ_ASSERT(types == TypeScript::BytecodeTypes(script, pc));
MOZ_ASSERT(!types->hasType(type));
- InferSpew(ISpewOps, "bytecodeType: %p %05" PRIuSIZE ": %s",
+ InferSpew(ISpewOps, "bytecodeType: %p %05zu: %s",
script, script->pcToOffset(pc), TypeSet::TypeString(type));
types->addType(cx, type);
}
void
js::TypeMonitorResult(JSContext* cx, JSScript* script, jsbytecode* pc, const js::Value& rval)
{
/* Allow the non-TYPESET scenario to simplify stubs used in compound opcodes. */
@@ -4638,17 +4637,17 @@ TypeScript::printTypes(JSContext* cx, Ha
AutoEnterAnalysis enter(nullptr, script->zone());
if (script->functionNonDelazifying())
fprintf(stderr, "Function");
else if (script->isForEval())
fprintf(stderr, "Eval");
else
fprintf(stderr, "Main");
- fprintf(stderr, " %#" PRIxPTR " %s:%" PRIuSIZE " ",
+ fprintf(stderr, " %#" PRIxPTR " %s:%zu ",
uintptr_t(script.get()), script->filename(), script->lineno());
if (script->functionNonDelazifying()) {
if (JSAtom* name = script->functionNonDelazifying()->explicitName())
name->dumpCharsNoNewline();
}
fprintf(stderr, "\n this:");
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -4757,18 +4757,18 @@ CheckCallArgs(FunctionValidator& f, Pars
}
return true;
}
static bool
CheckSignatureAgainstExisting(ModuleValidator& m, ParseNode* usepn, const Sig& sig, const Sig& existing)
{
if (sig.args().length() != existing.args().length()) {
- return m.failf(usepn, "incompatible number of arguments (%" PRIuSIZE
- " here vs. %" PRIuSIZE " before)",
+ return m.failf(usepn, "incompatible number of arguments (%zu"
+ " here vs. %zu before)",
sig.args().length(), existing.args().length());
}
for (unsigned i = 0; i < sig.args().length(); i++) {
if (sig.arg(i) != existing.arg(i)) {
return m.failf(usepn, "incompatible type for argument %u: (%s here vs. %s before)", i,
ToCString(sig.arg(i)), ToCString(existing.arg(i)));
}
--- a/js/src/wasm/WasmValidate.cpp
+++ b/js/src/wasm/WasmValidate.cpp
@@ -45,17 +45,17 @@ Decoder::failf(const char* msg, ...)
return fail(str.get());
}
bool
Decoder::fail(size_t errorOffset, const char* msg)
{
MOZ_ASSERT(error_);
- UniqueChars strWithOffset(JS_smprintf("at offset %" PRIuSIZE ": %s", errorOffset, msg));
+ UniqueChars strWithOffset(JS_smprintf("at offset %zu: %s", errorOffset, msg));
if (!strWithOffset)
return false;
*error_ = Move(strWithOffset);
return false;
}
bool
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -1450,17 +1450,17 @@ ReportZoneStats(const JS::ZoneStats& zSt
// path, because we don't want any forward slashes in the string to
// count as path separators.
nsCString escapedString(notableString);
escapedString.ReplaceSubstring("/", "\\");
bool truncated = notableString.Length() < info.length;
nsCString path = pathPrefix +
- nsPrintfCString("strings/" STRING_LENGTH "%" PRIuSIZE ", copies=%d, \"%s\"%s)/",
+ nsPrintfCString("strings/" STRING_LENGTH "%zu, copies=%d, \"%s\"%s)/",
info.length, info.numCopies, escapedString.get(),
truncated ? " (truncated)" : "");
if (info.gcHeapLatin1 > 0) {
REPORT_GC_BYTES(path + NS_LITERAL_CSTRING("gc-heap/latin1"),
info.gcHeapLatin1,
"Latin1 strings. " MAYBE_INLINE);
}
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -16,17 +16,16 @@
#include "mozilla/dom/FontFaceSetLoadEvent.h"
#include "mozilla/dom/FontFaceSetLoadEventBinding.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/Logging.h"
#include "mozilla/Preferences.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/ServoUtils.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "mozilla/Telemetry.h"
#include "nsAutoPtr.h"
#include "nsContentPolicyUtils.h"
#include "nsCSSParser.h"
#include "nsDeviceContext.h"
#include "nsFontFaceLoader.h"
#include "nsIConsoleService.h"
--- a/media/libstagefright/binding/MP4Metadata.cpp
+++ b/media/libstagefright/binding/MP4Metadata.cpp
@@ -7,17 +7,16 @@
#include "media/stagefright/MediaDefs.h"
#include "media/stagefright/MediaSource.h"
#include "media/stagefright/MetaData.h"
#include "mozilla/Assertions.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/Logging.h"
#include "mozilla/RefPtr.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "mozilla/UniquePtr.h"
#include "VideoUtils.h"
#include "mp4_demuxer/MoofParser.h"
#include "mp4_demuxer/MP4Metadata.h"
#include "mp4_demuxer/Stream.h"
#include "MediaPrefs.h"
#include "mp4parse.h"
@@ -461,17 +460,17 @@ MP4Metadata::GetTrackIndice(mozilla::Tra
static inline MediaResult
ConvertIndex(FallibleTArray<Index::Indice>& aDest,
const nsTArray<stagefright::MediaSource::Indice>& aIndex,
int64_t aMediaTime)
{
if (!aDest.SetCapacity(aIndex.Length(), mozilla::fallible)) {
return MediaResult{NS_ERROR_OUT_OF_MEMORY,
- RESULT_DETAIL("Could not resize to %" PRIuSIZE " indices",
+ RESULT_DETAIL("Could not resize to %zu indices",
aIndex.Length())};
}
for (size_t i = 0; i < aIndex.Length(); i++) {
Index::Indice indice;
const stagefright::MediaSource::Indice& s_indice = aIndex[i];
indice.start_offset = s_indice.start_offset;
indice.end_offset = s_indice.end_offset;
indice.start_composition = s_indice.start_composition - aMediaTime;
--- a/media/libstagefright/binding/MoofParser.cpp
+++ b/media/libstagefright/binding/MoofParser.cpp
@@ -5,17 +5,16 @@
#include "mp4_demuxer/MoofParser.h"
#include "mp4_demuxer/Box.h"
#include "mp4_demuxer/SinfParser.h"
#include <limits>
#include "Intervals.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#if defined(MOZ_FMP4)
extern mozilla::LogModule* GetDemuxerLog();
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#define LOG(name, arg, ...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (TOSTRING(name) "(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
#else
@@ -613,17 +612,17 @@ Moof::ParseTrun(Box& aBox, Tfhd& aTfhd,
((flags & 4) ? sizeof(uint32_t) : 0);
uint16_t flag[] = { 0x100, 0x200, 0x400, 0x800, 0 };
for (size_t i = 0; flag[i]; i++) {
if (flags & flag[i]) {
need += sizeof(uint32_t) * sampleCount;
}
}
if (reader->Remaining() < need) {
- LOG(Moof, "Incomplete Box (have:%" PRIuSIZE " need:%" PRIuSIZE ")",
+ LOG(Moof, "Incomplete Box (have:%zu need:%zu)",
reader->Remaining(), need);
return false;
}
uint64_t offset = aTfhd.mBaseDataOffset + (flags & 1 ? reader->ReadU32() : 0);
uint32_t firstSampleFlags =
flags & 4 ? reader->ReadU32() : aTfhd.mDefaultSampleFlags;
uint64_t decodeTime = *aDecodeTime;
--- a/media/libstagefright/frameworks/av/media/libstagefright/MediaBuffer.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/MediaBuffer.cpp
@@ -131,18 +131,18 @@ size_t MediaBuffer::range_offset() const
}
size_t MediaBuffer::range_length() const {
return mRangeLength;
}
void MediaBuffer::set_range(size_t offset, size_t length) {
if ((mGraphicBuffer == NULL) && (offset + length > mSize)) {
- ALOGE("offset = %" PRIuSIZE ", length = %" PRIuSIZE
- ", mSize = %" PRIuSIZE,
+ ALOGE("offset = %zu, length = %zu"
+ ", mSize = %zu",
offset, length, mSize);
}
CHECK((mGraphicBuffer != NULL) || (offset + length <= mSize));
mRangeOffset = offset;
mRangeLength = length;
}
--- a/media/libstagefright/frameworks/av/media/libstagefright/MetaData.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/MetaData.cpp
@@ -23,17 +23,16 @@
#include <string.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AString.h>
#include <media/stagefright/foundation/hexdump.h>
#include <media/stagefright/MetaData.h>
#include "mozilla/Assertions.h"
-#include "mozilla/SizePrintfMacros.h"
#include <cinttypes>
namespace stagefright {
MetaData::MetaData() {
}
@@ -309,17 +308,17 @@ void MetaData::typed_data::freeStorage()
mSize = 0;
}
String8 MetaData::typed_data::asString() const {
String8 out;
const void *data = storage();
switch(mType) {
case TYPE_NONE:
- out = String8::format("no type, size %" PRIuSIZE ")", mSize);
+ out = String8::format("no type, size %zu)", mSize);
break;
case TYPE_C_STRING:
out = String8::format("(char*) %s", (const char *)data);
break;
case TYPE_INT32:
out = String8::format("(int32_t) %d", *(int32_t *)data);
break;
case TYPE_INT64:
@@ -335,17 +334,17 @@ String8 MetaData::typed_data::asString()
{
const Rect *r = (const Rect *)data;
out = String8::format("Rect(%d, %d, %d, %d)",
r->mLeft, r->mTop, r->mRight, r->mBottom);
break;
}
default:
- out = String8::format("(unknown type %" PRIu32 ", size %" PRIuSIZE ")",
+ out = String8::format("(unknown type %" PRIu32 ", size %zu)",
mType, mSize);
if (mSize <= 48) { // if it's less than three lines of hex data, dump it
AString foo;
hexdump(data, mSize, 0, &foo);
out.append("\n");
out.append(foo.c_str());
}
break;
--- a/media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp
@@ -23,17 +23,16 @@
#include "include/SampleIterator.h"
#include <arpa/inet.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/DataSource.h>
#include <media/stagefright/Utils.h>
-#include "mozilla/SizePrintfMacros.h"
#include <cinttypes>
#include <stdint.h>
namespace stagefright {
// static
const uint32_t SampleTable::kChunkOffsetType32 = FOURCC('s', 't', 'c', 'o');
@@ -560,17 +559,17 @@ SampleTable::setSampleAuxiliaryInformati
data_offset, mCencSizes.Elements(), mCencInfoCount)
< mCencInfoCount) {
return ERROR_IO;
}
data_offset += mCencInfoCount;
}
if (data_offset != data_end) {
- ALOGW("wrong saiz data size, expected %" PRIuSIZE ", actual %" PRIu64,
+ ALOGW("wrong saiz data size, expected %zu, actual %" PRIu64,
data_size, uint64_t(data_offset - (data_end - data_size)));
// Continue, assume extra data is not important.
// Parser will skip past the box end.
}
return parseSampleCencInfo();
}
@@ -630,17 +629,17 @@ SampleTable::setSampleAuxiliaryInformati
ALOGE("error reading cenc aux info offsets");
return ERROR_IO;
}
data_offset += 8;
}
}
if (data_offset != data_end) {
- ALOGW("wrong saio data size, expected %" PRIuSIZE ", actual %" PRIu64,
+ ALOGW("wrong saio data size, expected %zu, actual %" PRIu64,
data_size, uint64_t(data_offset - (data_end - data_size)));
// Continue, assume extra data is not important.
// Parser will skip past the box end.
}
return parseSampleCencInfo();
}
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
@@ -5,17 +5,16 @@
#include "WebrtcGmpVideoCodec.h"
#include <iostream>
#include <vector>
#include "mozilla/CheckedInt.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Move.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/SyncRunnable.h"
#include "VideoConduit.h"
#include "AudioConduit.h"
#include "runnable_utils.h"
#include "mozIGeckoMediaPluginService.h"
#include "nsServiceManagerUtils.h"
#include "GMPVideoDecoderProxy.h"
@@ -882,17 +881,17 @@ WebrtcGmpVideoDecoder::Decode_g(const we
// Bug XXXXXX: Set codecSpecific info
GMPCodecSpecificInfo info;
memset(&info, 0, sizeof(info));
info.mCodecType = kGMPVideoCodecH264;
info.mCodecSpecific.mH264.mSimulcastIdx = 0;
nsTArray<uint8_t> codecSpecificInfo;
codecSpecificInfo.AppendElements((uint8_t*)&info, sizeof(GMPCodecSpecificInfo));
- LOGD(("GMP Decode: %" PRIu64 ", len %" PRIuSIZE "%s", frame->TimeStamp(), aInputImage._length,
+ LOGD(("GMP Decode: %" PRIu64 ", len %zu%s", frame->TimeStamp(), aInputImage._length,
ft == kGMPKeyFrame ? ", KeyFrame" : ""));
nsresult rv = mGMP->Decode(Move(frame),
aMissingFrames,
codecSpecificInfo,
aRenderTimeMs);
if (NS_FAILED(rv)) {
return WEBRTC_VIDEO_CODEC_ERROR;
}
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -47,17 +47,16 @@
#include "mozilla/PeerIdentity.h"
#include "mozilla/Preferences.h"
#include "mozilla/TaskQueue.h"
#include "mozilla/gfx/Point.h"
#include "mozilla/gfx/Types.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/UniquePtrExtensions.h"
#include "mozilla/Sprintf.h"
-#include "mozilla/SizePrintfMacros.h"
#include "webrtc/common_types.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/common_video/include/video_frame_buffer.h"
#include "webrtc/base/bind.h"
#include "nsThreadUtils.h"
@@ -2073,17 +2072,17 @@ public:
principal_handle_);
// Handle track not actually added yet or removed/finished
if (source_->AppendToTrack(track_id_, &segment)) {
played_ticks_ += frames;
if (MOZ_LOG_TEST(AudioLogModule(), LogLevel::Debug)) {
if (played_ticks_ > last_log_ + WEBRTC_DEFAULT_SAMPLE_RATE) { // ~ 1 second
MOZ_LOG(AudioLogModule(), LogLevel::Debug,
- ("%p: Inserting %" PRIuSIZE " samples into track %d, total = %" PRIu64,
+ ("%p: Inserting %zu samples into track %d, total = %" PRIu64,
(void*) this, frames, track_id_, played_ticks_));
last_log_ = played_ticks_;
}
}
} else {
MOZ_MTLOG(ML_ERROR, "AppendToTrack failed");
// we can't un-read the data, but that's ok since we don't want to
// buffer - but don't i-loop!
--- a/media/webrtc/trunk/tools/gyp/test/win/rc-build/hello.cpp
+++ b/media/webrtc/trunk/tools/gyp/test/win/rc-build/hello.cpp
@@ -1,30 +1,30 @@
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <tchar.h>
-
-#include "resource.h"
-
-#define MAX_LOADSTRING 100
-
-TCHAR szTitle[MAX_LOADSTRING];
-TCHAR szWindowClass[MAX_LOADSTRING];
-
-int APIENTRY _tWinMain(
- HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPTSTR lpCmdLine,
- int nCmdShow) {
- // Make sure we can load some resources.
- int count = 0;
- LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
- if (szTitle[0] != 0) ++count;
- LoadString(hInstance, IDC_HELLO, szWindowClass, MAX_LOADSTRING);
- if (szWindowClass[0] != 0) ++count;
- if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SMALL)) != NULL) ++count;
- if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HELLO)) != NULL) ++count;
- return count;
-}
+// Copyright (c) 2012 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <tchar.h>
+
+#include "resource.h"
+
+#define MAX_LOADSTRING 100
+
+TCHAR szTitle[MAX_LOADSTRING];
+TCHAR szWindowClass[MAX_LOADSTRING];
+
+int APIENTRY _tWinMain(
+ HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPTSTR lpCmdLine,
+ int nCmdShow) {
+ // Make sure we can load some resources.
+ int count = 0;
+ LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
+ if (szTitle[0] != 0) ++count;
+ LoadString(hInstance, IDC_HELLO, szWindowClass, MAX_LOADSTRING);
+ if (szWindowClass[0] != 0) ++count;
+ if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SMALL)) != NULL) ++count;
+ if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HELLO)) != NULL) ++count;
+ return count;
+}
deleted file mode 100644
--- a/mfbt/SizePrintfMacros.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-/* Implements (nonstandard) PRI{ouxX}SIZE format macros for size_t types. */
-
-#ifndef mozilla_SizePrintfMacros_h_
-#define mozilla_SizePrintfMacros_h_
-
-/*
- * MSVC's libc does not support C99's %z format length modifier for size_t
- * types. Instead, we use Microsoft's nonstandard %I modifier for size_t, which
- * is unsigned __int32 on 32-bit platforms and unsigned __int64 on 64-bit
- * platforms:
- *
- * http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx
- */
-
-#if defined(XP_WIN) && !defined(__MINGW32__)
-# define PRIoSIZE "Io"
-# define PRIuSIZE "Iu"
-# define PRIxSIZE "Ix"
-# define PRIXSIZE "IX"
-#else
-# define PRIoSIZE "zo"
-# define PRIuSIZE "zu"
-# define PRIxSIZE "zx"
-# define PRIXSIZE "zX"
-#endif
-
-#endif /* mozilla_SizePrintfMacros_h_ */
--- a/mfbt/moz.build
+++ b/mfbt/moz.build
@@ -78,17 +78,16 @@ EXPORTS.mozilla = [
'Result.h',
'ReverseIterator.h',
'RollingMean.h',
'Saturate.h',
'Scoped.h',
'ScopeExit.h',
'SegmentedVector.h',
'SHA1.h',
- 'SizePrintfMacros.h',
'SmallPointerArray.h',
'Span.h',
'SplayTree.h',
'Sprintf.h',
'StaticAnalysisFunctions.h',
'TaggedAnonymousMemory.h',
'TemplateLib.h',
'ThreadLocal.h',
--- a/mozglue/linker/Mappable.cpp
+++ b/mozglue/linker/Mappable.cpp
@@ -9,17 +9,16 @@
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <string>
#include "Mappable.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/UniquePtr.h"
#ifdef ANDROID
#include <linux/ashmem.h>
#endif
#include <sys/stat.h>
#include <errno.h>
#include "ElfLoader.h"
--- a/mozglue/misc/Printf.h
+++ b/mozglue/misc/Printf.h
@@ -48,17 +48,16 @@
** %g - float; note that this is actually formatted using the
** system's native printf, and so the results may vary
*/
#include "mozilla/AllocPolicy.h"
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Types.h"
#include "mozilla/UniquePtr.h"
#include <stdarg.h>
#include <string.h>
namespace mozilla {
--- a/mozglue/tests/TestPrintf.cpp
+++ b/mozglue/tests/TestPrintf.cpp
@@ -1,16 +1,15 @@
/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Printf.h"
-#include "mozilla/SizePrintfMacros.h"
#include <cfloat>
#include <stdarg.h>
// A simple implementation of PrintfTarget, just for testing
// PrintfTarget::print.
class TestPrintfTarget : public mozilla::PrintfTarget
{
@@ -104,17 +103,17 @@ TestPrintfFormats()
MOZ_RELEASE_ASSERT(print_one("0xf0f0", "0x%lx", 0xf0f0ul));
MOZ_RELEASE_ASSERT(print_one("0", "%lld", 0ll));
MOZ_RELEASE_ASSERT(print_one("2305", "%lld", 2305ll));
MOZ_RELEASE_ASSERT(print_one("-2305", "%lld", -2305ll));
// A funny special case.
MOZ_RELEASE_ASSERT(print_one("", "%.*lld", 0, 0ll));
MOZ_RELEASE_ASSERT(print_one("0xF0F0", "0x%llX", 0xf0f0ull));
MOZ_RELEASE_ASSERT(print_one("27270", "%zu", (size_t) 27270));
- MOZ_RELEASE_ASSERT(print_one("27270", "%" PRIuSIZE, (size_t) 27270));
+ MOZ_RELEASE_ASSERT(print_one("27270", "%zu", (size_t) 27270));
MOZ_RELEASE_ASSERT(print_one("hello", "he%so", "ll"));
MOZ_RELEASE_ASSERT(print_one("(null)", "%s", zero()));
MOZ_RELEASE_ASSERT(print_one("hello ", "%-8s", "hello"));
MOZ_RELEASE_ASSERT(print_one(" hello", "%8s", "hello"));
MOZ_RELEASE_ASSERT(print_one("hello ", "%*s", -8, "hello"));
MOZ_RELEASE_ASSERT(print_one("hello", "%.*s", 5, "hello there"));
MOZ_RELEASE_ASSERT(print_one("", "%.*s", 0, "hello there"));
MOZ_RELEASE_ASSERT(print_one("%%", "%%%%"));
@@ -152,17 +151,17 @@ TestPrintfFormats()
(short) 10, 9, 8l, 7ll));
MOZ_RELEASE_ASSERT(print_one("0 ", "%2$p %1$n", &n1, zero()));
MOZ_RELEASE_ASSERT(n1 == 2);
MOZ_RELEASE_ASSERT(print_one("23 % 024", "%2$-3ld%%%1$4.3d", 24, 23l));
MOZ_RELEASE_ASSERT(print_one("23 1.5", "%2$d %1$g", 1.5, 23));
MOZ_RELEASE_ASSERT(print_one("ff number FF", "%3$llx %1$s %2$lX", "number", 255ul, 255ull));
- MOZ_RELEASE_ASSERT(print_one("7799 9977", "%2$" PRIuSIZE " %1$" PRIuSIZE,
+ MOZ_RELEASE_ASSERT(print_one("7799 9977", "%2$zu %1$zu",
(size_t) 9977, (size_t) 7799));
}
int main()
{
TestPrintfFormats();
TestPrintfTargetPrint();
--- a/netwerk/base/EventTokenBucket.cpp
+++ b/netwerk/base/EventTokenBucket.cpp
@@ -10,17 +10,16 @@
#include "nsIIOService.h"
#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsServiceManagerUtils.h"
#include "nsSocketTransportService2.h"
#ifdef DEBUG
#include "MainThreadUtils.h"
#endif
-#include "mozilla/SizePrintfMacros.h"
#ifdef XP_WIN
#include <windows.h>
#include <mmsystem.h>
#endif
namespace mozilla {
namespace net {
@@ -104,17 +103,17 @@ EventTokenBucket::EventTokenBucket(uint3
mTimer = do_CreateInstance("@mozilla.org/timer;1");
if (mTimer)
mTimer->SetTarget(sts);
SetRate(eventsPerSecond, burstSize);
}
EventTokenBucket::~EventTokenBucket()
{
- SOCKET_LOG(("EventTokenBucket::dtor %p events=%" PRIuSIZE "\n",
+ SOCKET_LOG(("EventTokenBucket::dtor %p events=%zu\n",
this, mEvents.GetSize()));
CleanupTimers();
// Complete any queued events to prevent hangs
while (mEvents.GetSize()) {
RefPtr<TokenBucketCancelable> cancelable =
dont_AddRef(static_cast<TokenBucketCancelable *>(mEvents.PopFront()));
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -2,17 +2,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "mozilla/Attributes.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/HoldDropJSObjects.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "nsSocketTransport2.h"
#include "nsUDPSocket.h"
#include "nsProxyRelease.h"
#include "nsAutoPtr.h"
#include "nsError.h"
#include "nsNetCID.h"
@@ -1040,17 +1039,17 @@ SocketListenerProxyBackground::OnPacketR
mMessage->GetFromAddr(getter_AddRefs(nsAddr));
nsAddr->GetNetAddr(&netAddr);
nsCOMPtr<nsIOutputStream> outputStream;
mMessage->GetOutputStream(getter_AddRefs(outputStream));
FallibleTArray<uint8_t>& data = mMessage->GetDataAsTArray();
- UDPSOCKET_LOG(("%s [this=%p], len %" PRIuSIZE, __FUNCTION__, this, data.Length()));
+ UDPSOCKET_LOG(("%s [this=%p], len %zu", __FUNCTION__, this, data.Length()));
nsCOMPtr<nsIUDPMessage> message = new UDPMessageProxy(&netAddr,
outputStream,
data);
mListener->OnPacketReceived(mSocket, message);
return NS_OK;
}
NS_IMETHODIMP
--- a/netwerk/cache2/CacheFileUtils.cpp
+++ b/netwerk/cache2/CacheFileUtils.cpp
@@ -1,17 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "CacheIndex.h"
#include "CacheLog.h"
#include "CacheFileUtils.h"
#include "LoadContextInfo.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Tokenizer.h"
#include "mozilla/Telemetry.h"
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsString.h"
#include <algorithm>
#include "mozilla/Unused.h"
@@ -314,17 +313,17 @@ ValidityPair::Merge(const ValidityPair&
mOffset = offset;
mLen = end - offset;
}
void
ValidityMap::Log() const
{
- LOG(("ValidityMap::Log() - number of pairs: %" PRIuSIZE, mMap.Length()));
+ LOG(("ValidityMap::Log() - number of pairs: %zu", mMap.Length()));
for (uint32_t i=0; i<mMap.Length(); i++) {
LOG((" (%u, %u)", mMap[i].Offset() + 0, mMap[i].Len() + 0));
}
}
uint32_t
ValidityMap::Length() const
{
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -28,17 +28,16 @@
#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsServiceManagerUtils.h"
#include "nsWeakReference.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/Services.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
namespace mozilla {
namespace net {
namespace {
void AppendMemoryStorageID(nsAutoCString &key)
{
@@ -291,17 +290,17 @@ private:
mCallback->OnCacheStorageInfo(mEntryArray.Length(), mSize,
CacheObserver::MemoryCacheCapacity(), nullptr);
if (!mVisitEntries)
return NS_OK; // done
mNotifyStorage = false;
} else {
- LOG((" entry [left=%" PRIuSIZE ", canceled=%d]", mEntryArray.Length(), (bool)mCancel));
+ LOG((" entry [left=%zu, canceled=%d]", mEntryArray.Length(), (bool)mCancel));
// Third, notify each entry until depleted or canceled
if (!mEntryArray.Length() || mCancel) {
mCallback->OnCacheEntryVisitCompleted();
return NS_OK; // done
}
// Grab the next entry
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -3,17 +3,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "mozilla/Attributes.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/Likely.h"
#include "mozilla/Printf.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "mozilla/net/CookieServiceChild.h"
#include "mozilla/net/NeckoCommon.h"
#include "nsCookieService.h"
#include "nsContentUtils.h"
#include "nsIServiceManager.h"
@@ -2909,17 +2908,17 @@ nsCookieService::EnsureReadDomain(const
}
rv = transaction.Commit();
MOZ_ASSERT(NS_SUCCEEDED(rv));
// Add it to the hashset of read entries, so we don't read it again.
mDefaultDBState->readSet.PutEntry(aKey);
COOKIE_LOGSTRING(LogLevel::Debug,
- ("EnsureReadDomain(): %" PRIuSIZE " cookies read for base domain %s, "
+ ("EnsureReadDomain(): %zu cookies read for base domain %s, "
" originAttributes = %s", array.Length(), aKey.mBaseDomain.get(),
suffix.get()));
}
void
nsCookieService::EnsureReadComplete()
{
NS_ASSERTION(!mDBState->dbConn || mDBState == mDefaultDBState,
@@ -3006,17 +3005,17 @@ nsCookieService::EnsureReadComplete()
}
rv = transaction.Commit();
MOZ_ASSERT(NS_SUCCEEDED(rv));
mDefaultDBState->syncConn = nullptr;
mDefaultDBState->readSet.Clear();
COOKIE_LOGSTRING(LogLevel::Debug,
- ("EnsureReadComplete(): %" PRIuSIZE " cookies read", array.Length()));
+ ("EnsureReadComplete(): %zu cookies read", array.Length()));
}
NS_IMETHODIMP
nsCookieService::ImportCookies(nsIFile *aCookieFile)
{
if (!mDBState) {
NS_WARNING("No DBState! Profile already closed?");
return NS_ERROR_NOT_AVAILABLE;
--- a/netwerk/protocol/http/ConnectionDiagnostics.cpp
+++ b/netwerk/protocol/http/ConnectionDiagnostics.cpp
@@ -12,17 +12,16 @@
#include "Http2Session.h"
#include "nsHttpHandler.h"
#include "nsIConsoleService.h"
#include "nsHttpRequestHead.h"
#include "nsServiceManagerUtils.h"
#include "nsSocketTransportService2.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
namespace mozilla {
namespace net {
void
nsHttpConnectionMgr::PrintDiagnostics()
{
nsresult rv = PostEvent(&nsHttpConnectionMgr::OnMsgPrintDiagnostics, 0, nullptr);
@@ -52,25 +51,25 @@ nsHttpConnectionMgr::OnMsgPrintDiagnosti
RefPtr<nsConnectionEntry> ent = iter.Data();
mLogData.AppendPrintf(" ent host = %s hashkey = %s\n",
ent->mConnInfo->Origin(), ent->mConnInfo->HashKey().get());
mLogData.AppendPrintf(" AtActiveConnectionLimit = %d\n",
AtActiveConnectionLimit(ent, NS_HTTP_ALLOW_KEEPALIVE));
mLogData.AppendPrintf(" RestrictConnections = %d\n",
RestrictConnections(ent));
- mLogData.AppendPrintf(" Pending Q Length = %" PRIuSIZE "\n",
+ mLogData.AppendPrintf(" Pending Q Length = %zu\n",
ent->PendingQLength());
- mLogData.AppendPrintf(" Active Conns Length = %" PRIuSIZE "\n",
+ mLogData.AppendPrintf(" Active Conns Length = %zu\n",
ent->mActiveConns.Length());
- mLogData.AppendPrintf(" Idle Conns Length = %" PRIuSIZE "\n",
+ mLogData.AppendPrintf(" Idle Conns Length = %zu\n",
ent->mIdleConns.Length());
- mLogData.AppendPrintf(" Half Opens Length = %" PRIuSIZE "\n",
+ mLogData.AppendPrintf(" Half Opens Length = %zu\n",
ent->mHalfOpens.Length());
- mLogData.AppendPrintf(" Coalescing Keys Length = %" PRIuSIZE "\n",
+ mLogData.AppendPrintf(" Coalescing Keys Length = %zu\n",
ent->mCoalescingKeys.Length());
mLogData.AppendPrintf(" Spdy using = %d\n", ent->mUsingSpdy);
uint32_t i;
for (i = 0; i < ent->mActiveConns.Length(); ++i) {
mLogData.AppendPrintf(" :: Active Connection #%u\n", i);
ent->mActiveConns[i]->PrintDiagnostics(mLogData);
}
@@ -173,17 +172,17 @@ Http2Session::PrintDiagnostics(nsCString
log.AppendPrintf(" roomformorestreams = %d roomformoreconcurrent = %d\n",
RoomForMoreStreams(), RoomForMoreConcurrent());
log.AppendPrintf(" transactionHashCount = %d streamIDHashCount = %d\n",
mStreamTransactionHash.Count(),
mStreamIDHash.Count());
- log.AppendPrintf(" Queued Stream Size = %" PRIuSIZE "\n", mQueuedStreams.GetSize());
+ log.AppendPrintf(" Queued Stream Size = %zu\n", mQueuedStreams.GetSize());
PRIntervalTime now = PR_IntervalNow();
log.AppendPrintf(" Ping Threshold = %ums\n",
PR_IntervalToMilliseconds(mPingThreshold));
log.AppendPrintf(" Ping Timeout = %ums\n",
PR_IntervalToMilliseconds(gHttpHandler->SpdyPingTimeout()));
log.AppendPrintf(" Idle for Any Activity (ping) = %ums\n",
PR_IntervalToMilliseconds(now - mLastReadEpoch));
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6,17 +6,16 @@
// HttpLog.h should generally be included first
#include "HttpLog.h"
#include <inttypes.h>
#include "mozilla/dom/nsCSPContext.h"
#include "mozilla/ScopeExit.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "nsHttp.h"
#include "nsHttpChannel.h"
#include "nsHttpHandler.h"
#include "nsIApplicationCacheService.h"
#include "nsIApplicationCacheContainer.h"
#include "nsICacheStorageService.h"
@@ -8409,17 +8408,17 @@ nsHttpChannel::WaitForRedirectCallback()
mWaitingForRedirectCallback = true;
return NS_OK;
}
NS_IMETHODIMP
nsHttpChannel::OnRedirectVerifyCallback(nsresult result)
{
LOG(("nsHttpChannel::OnRedirectVerifyCallback [this=%p] "
- "result=%" PRIx32 " stack=%" PRIuSIZE " mWaitingForRedirectCallback=%u\n",
+ "result=%" PRIx32 " stack=%zu mWaitingForRedirectCallback=%u\n",
this, static_cast<uint32_t>(result), mRedirectFuncStack.Length(),
mWaitingForRedirectCallback));
MOZ_ASSERT(mWaitingForRedirectCallback,
"Someone forgot to call WaitForRedirectCallback() ?!");
mWaitingForRedirectCallback = false;
if (mCanceled && NS_SUCCEEDED(result))
result = NS_BINDING_ABORTED;
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -28,17 +28,16 @@
#include "NullHttpTransaction.h"
#include "nsIDNSRecord.h"
#include "nsITransport.h"
#include "nsInterfaceRequestorAgg.h"
#include "nsIRequestContext.h"
#include "nsISocketTransportService.h"
#include <algorithm>
#include "mozilla/ChaosMode.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "nsIURI.h"
#include "mozilla/Move.h"
#include "mozilla/Telemetry.h"
namespace mozilla {
namespace net {
@@ -1112,33 +1111,33 @@ nsHttpConnectionMgr::PreparePendingQForD
remainingPendingQ,
maxFocusedWindowConnections - pendingQ.Length());
}
MOZ_ASSERT(pendingQ.Length() + remainingPendingQ.Length() <=
availableConnections);
LOG(("nsHttpConnectionMgr::PreparePendingQForDispatching "
- "focused window pendingQ.Length()=%" PRIuSIZE
- ", remainingPendingQ.Length()=%" PRIuSIZE "\n",
+ "focused window pendingQ.Length()=%zu"
+ ", remainingPendingQ.Length()=%zu\n",
pendingQ.Length(), remainingPendingQ.Length()));
// Append elements in |remainingPendingQ| to |pendingQ|. The order in
// |pendingQ| is like: [focusedWindowTrans...nonFocusedWindowTrans].
pendingQ.AppendElements(Move(remainingPendingQ));
}
bool
nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent, bool considerAll)
{
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
LOG(("nsHttpConnectionMgr::ProcessPendingQForEntry "
- "[ci=%s ent=%p active=%" PRIuSIZE " idle=%" PRIuSIZE " urgent-start-queue=%" PRIuSIZE
- " queued=%" PRIuSIZE "]\n",
+ "[ci=%s ent=%p active=%zu idle=%zu urgent-start-queue=%zu"
+ " queued=%zu]\n",
ent->mConnInfo->HashKey().get(), ent, ent->mActiveConns.Length(),
ent->mIdleConns.Length(), ent->mUrgentStartQ.Length(),
ent->PendingQLength()));
if (LOG_ENABLED()) {
LOG(("urgent queue ["));
for (auto info : ent->mUrgentStartQ) {
LOG((" %p", info->mTransaction.get()));
@@ -1479,17 +1478,17 @@ nsHttpConnectionMgr::TryDispatchTransact
PendingTransactionInfo *pendingTransInfo)
{
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
nsHttpTransaction *trans = pendingTransInfo->mTransaction;
LOG(("nsHttpConnectionMgr::TryDispatchTransaction without conn "
"[trans=%p halfOpen=%p conn=%p ci=%p ci=%s caps=%x tunnelprovider=%p "
- "onlyreused=%d active=%" PRIuSIZE " idle=%" PRIuSIZE "]\n", trans,
+ "onlyreused=%d active=%zu idle=%zu]\n", trans,
pendingTransInfo->mHalfOpen.get(),
pendingTransInfo->mActiveConn.get(), ent->mConnInfo.get(),
ent->mConnInfo->HashKey().get(),
uint32_t(trans->Caps()), trans->TunnelProvider(),
onlyReusedConnection, ent->mActiveConns.Length(),
ent->mIdleConns.Length()));
uint32_t caps = trans->Caps();
@@ -1879,23 +1878,23 @@ nsHttpConnectionMgr::ProcessNewTransacti
}
if (rv == NS_ERROR_NOT_AVAILABLE) {
if (!pendingTransInfo) {
pendingTransInfo = new PendingTransactionInfo(trans);
}
if (trans->Caps() & NS_HTTP_URGENT_START) {
LOG((" adding transaction to pending queue "
- "[trans=%p urgent-start-count=%" PRIuSIZE "]\n",
+ "[trans=%p urgent-start-count=%zu]\n",
trans, ent->mUrgentStartQ.Length() + 1));
// put this transaction on the urgent-start queue...
InsertTransactionSorted(ent->mUrgentStartQ, pendingTransInfo);
} else {
LOG((" adding transaction to pending queue "
- "[trans=%p pending-count=%" PRIuSIZE "]\n",
+ "[trans=%p pending-count=%zu]\n",
trans, ent->PendingQLength() + 1));
// put this transaction on the pending queue...
ent->InsertTransaction(pendingTransInfo);
}
return NS_OK;
}
LOG((" ProcessNewTransaction Hard Error trans=%p rv=%" PRIx32 "\n",
@@ -3452,19 +3451,19 @@ nsHttpConnectionMgr::TimeoutTick()
// Set it to the max value here, and the TimeoutTick()s can
// reduce it to their local needs.
mTimeoutTickNext = 3600; // 1hr
for (auto iter = mCT.Iter(); !iter.Done(); iter.Next()) {
RefPtr<nsConnectionEntry> ent = iter.Data();
LOG(("nsHttpConnectionMgr::TimeoutTick() this=%p host=%s "
- "idle=%" PRIuSIZE " active=%" PRIuSIZE
- " half-len=%" PRIuSIZE " pending=%" PRIuSIZE
- " urgentStart pending=%" PRIuSIZE "\n",
+ "idle=%zu active=%zu"
+ " half-len=%zu pending=%zu"
+ " urgentStart pending=%zu\n",
this, ent->mConnInfo->Origin(), ent->mIdleConns.Length(),
ent->mActiveConns.Length(), ent->mHalfOpens.Length(),
ent->PendingQLength(), ent->mUrgentStartQ.Length()));
// First call the tick handler for each active connection.
PRIntervalTime tickTime = PR_IntervalNow();
for (uint32_t index = 0; index < ent->mActiveConns.Length(); ++index) {
uint32_t connNextTimeout =
@@ -5061,17 +5060,17 @@ nsConnectionEntry::AppendPendingQForFocu
countToAppend;
result.InsertElementsAt(result.Length(),
infoArray->Elements(),
countToAppend);
infoArray->RemoveElementsAt(0, countToAppend);
LOG(("nsConnectionEntry::AppendPendingQForFocusedWindow [ci=%s], "
- "pendingQ count=%" PRIuSIZE " window.count=%" PRIuSIZE " for focused window (id=%" PRIu64 ")\n",
+ "pendingQ count=%zu window.count=%zu for focused window (id=%" PRIu64 ")\n",
mConnInfo->HashKey().get(), result.Length(), infoArray->Length(),
windowId));
}
void
nsHttpConnectionMgr::
nsConnectionEntry::AppendPendingQForNonFocusedWindows(
uint64_t windowId,
@@ -5101,17 +5100,17 @@ nsConnectionEntry::AppendPendingQForNonF
it.UserData()->RemoveElementsAt(0, count);
if (maxCount && totalCount == maxCount) {
break;
}
}
LOG(("nsConnectionEntry::AppendPendingQForNonFocusedWindows [ci=%s], "
- "pendingQ count=%" PRIuSIZE " for non focused window\n",
+ "pendingQ count=%zu for non focused window\n",
mConnInfo->HashKey().get(), result.Length()));
}
void
nsHttpConnectionMgr::nsConnectionEntry::RemoveEmptyPendingQ()
{
for (auto it = mPendingTransactionTable.Iter(); !it.Done(); it.Next()) {
if (it.UserData()->IsEmpty()) {
@@ -5143,22 +5142,22 @@ nsHttpConnectionMgr::MoveToWildCardConnE
nsConnectionEntry *wcEnt = GetOrCreateConnectionEntry(wildCardCI, true);
if (wcEnt == ent) {
// nothing to do!
return;
}
wcEnt->mUsingSpdy = true;
LOG(("nsHttpConnectionMgr::MakeConnEntryWildCard ent %p "
- "idle=%" PRIuSIZE " active=%" PRIuSIZE " half=%" PRIuSIZE " pending=%" PRIuSIZE "\n",
+ "idle=%zu active=%zu half=%zu pending=%zu\n",
ent, ent->mIdleConns.Length(), ent->mActiveConns.Length(),
ent->mHalfOpens.Length(), ent->PendingQLength()));
LOG(("nsHttpConnectionMgr::MakeConnEntryWildCard wc-ent %p "
- "idle=%" PRIuSIZE " active=%" PRIuSIZE " half=%" PRIuSIZE " pending=%" PRIuSIZE "\n",
+ "idle=%zu active=%zu half=%zu pending=%zu\n",
wcEnt, wcEnt->mIdleConns.Length(), wcEnt->mActiveConns.Length(),
wcEnt->mHalfOpens.Length(), wcEnt->PendingQLength()));
int32_t count = ent->mActiveConns.Length();
RefPtr<nsHttpConnection> deleteProtector(proxyConn);
for (int32_t i = 0; i < count; ++i) {
if (ent->mActiveConns[i] == proxyConn) {
ent->mActiveConns.RemoveElementAt(i);
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -31,17 +31,16 @@
#endif
#include "DataChannelLog.h"
#include "nsServiceManagerUtils.h"
#include "nsIObserverService.h"
#include "nsIObserver.h"
#include "mozilla/Services.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
#include "nsProxyRelease.h"
#include "nsThread.h"
#include "nsThreadUtils.h"
#include "nsAutoPtr.h"
#include "nsNetUtil.h"
#include "nsNetCID.h"
#include "mozilla/StaticPtr.h"
@@ -1099,23 +1098,23 @@ DataChannelConnection::SendDeferredMessa
if ((result = usrsctp_sendv(mSocket, data, len,
nullptr, 0,
(void *)spa, (socklen_t)sizeof(struct sctp_sendv_spa),
SCTP_SENDV_SPA,
0)) < 0) {
if (errno == EAGAIN || errno == EWOULDBLOCK) {
// leave queued for resend
failed_send = true;
- LOG(("queue full again when resending %" PRIuSIZE " bytes (%d)", len, result));
+ LOG(("queue full again when resending %zu bytes (%d)", len, result));
} else {
LOG(("error %d re-sending string", errno));
failed_send = true;
}
} else {
- LOG(("Resent buffer of %" PRIuSIZE " bytes (%d)", len, result));
+ LOG(("Resent buffer of %zu bytes (%d)", len, result));
// In theory this could underflow if >4GB was buffered and re
// truncated in GetBufferedAmount(), but this won't cause any problems.
buffered_amount -= channel->mBufferedData[0]->mLength;
channel->mBufferedData.RemoveElementAt(0);
// can never fire with default threshold of 0
if (was_over_threshold && buffered_amount < threshold) {
LOG(("%s: sending BUFFER_LOW_THRESHOLD for %s/%s: %u", __FUNCTION__,
channel->mLabel.get(), channel->mProtocol.get(), channel->mStream));
@@ -1155,23 +1154,23 @@ DataChannelConnection::HandleOpenRequest
RefPtr<DataChannel> channel;
uint32_t prValue;
uint16_t prPolicy;
uint32_t flags;
mLock.AssertCurrentThreadOwns();
if (length != (sizeof(*req) - 1) + ntohs(req->label_length) + ntohs(req->protocol_length)) {
- LOG(("%s: Inconsistent length: %" PRIuSIZE ", should be %" PRIuSIZE, __FUNCTION__, length,
+ LOG(("%s: Inconsistent length: %zu, should be %zu", __FUNCTION__, length,
(sizeof(*req) - 1) + ntohs(req->label_length) + ntohs(req->protocol_length)));
if (length < (sizeof(*req) - 1) + ntohs(req->label_length) + ntohs(req->protocol_length))
return;
}
- LOG(("%s: length %" PRIuSIZE ", sizeof(*req) = %" PRIuSIZE, __FUNCTION__, length, sizeof(*req)));
+ LOG(("%s: length %zu, sizeof(*req) = %zu", __FUNCTION__, length, sizeof(*req)));
switch (req->channel_type) {
case DATA_CHANNEL_RELIABLE:
case DATA_CHANNEL_RELIABLE_UNORDERED:
prPolicy = SCTP_PR_SCTP_NONE;
break;
case DATA_CHANNEL_PARTIAL_RELIABLE_REXMIT:
case DATA_CHANNEL_PARTIAL_RELIABLE_REXMIT_UNORDERED:
@@ -1205,17 +1204,17 @@ DataChannelConnection::HandleOpenRequest
"channel %u, policy %u/%u, value %u/%u, flags %x/%x",
stream, prPolicy, channel->mPrPolicy,
prValue, channel->mPrValue, flags, channel->mFlags));
}
}
return;
}
if (stream >= mStreams.Length()) {
- LOG(("%s: stream %u out of bounds (%" PRIuSIZE ")", __FUNCTION__, stream, mStreams.Length()));
+ LOG(("%s: stream %u out of bounds (%zu)", __FUNCTION__, stream, mStreams.Length()));
return;
}
nsCString label(nsDependentCSubstring(&req->label[0], ntohs(req->label_length)));
nsCString protocol(nsDependentCSubstring(&req->label[ntohs(req->label_length)],
ntohs(req->protocol_length)));
channel = new DataChannel(this,
@@ -1291,17 +1290,17 @@ DataChannelConnection::HandleOpenAckMess
channel->mFlags &= ~DATA_CHANNEL_FLAGS_WAITING_ACK;
}
void
DataChannelConnection::HandleUnknownMessage(uint32_t ppid, size_t length, uint16_t stream)
{
/* XXX: Send an error message? */
- LOG(("unknown DataChannel message received: %u, len %" PRIuSIZE " on stream %d", ppid, length, stream));
+ LOG(("unknown DataChannel message received: %u, len %zu on stream %d", ppid, length, stream));
// XXX Log to JS error console if possible
}
void
DataChannelConnection::HandleDataMessage(uint32_t ppid,
const void *data, size_t length,
uint16_t stream)
{
@@ -1321,17 +1320,17 @@ DataChannelConnection::HandleDataMessage
// response or ack). Also, with external negotiation, data can come in
// before we're told about the external negotiation. We need to buffer
// data until either a) Open comes in, if the ordering get messed up,
// or b) the app tells us this channel was externally negotiated. When
// these occur, we deliver the data.
// Since this is rare and non-performance, keep a single list of queued
// data messages to deliver once the channel opens.
- LOG(("Queuing data for stream %u, length %" PRIuSIZE, stream, length));
+ LOG(("Queuing data for stream %u, length %zu", stream, length));
// Copies data
mQueuedData.AppendElement(new QueuedDataMessage(stream, ppid, data, length));
return;
}
// XXX should this be a simple if, no warnings/debugbreaks?
NS_ENSURE_TRUE_VOID(channel->mState != CLOSED);
@@ -1348,23 +1347,23 @@ DataChannelConnection::HandleDataMessage
channel->mRecvBuffer.Truncate(0);
}
channel->mIsRecvBinary = is_binary;
switch (ppid) {
case DATA_CHANNEL_PPID_DOMSTRING:
case DATA_CHANNEL_PPID_BINARY:
channel->mRecvBuffer += recvData;
- LOG(("DataChannel: Partial %s message of length %" PRIuSIZE " (total %u) on channel id %u",
+ LOG(("DataChannel: Partial %s message of length %zu (total %u) on channel id %u",
is_binary ? "binary" : "string", length, channel->mRecvBuffer.Length(),
channel->mStream));
return; // Not ready to notify application
case DATA_CHANNEL_PPID_DOMSTRING_LAST:
- LOG(("DataChannel: String message received of length %" PRIuSIZE " on channel %u",
+ LOG(("DataChannel: String message received of length %zu on channel %u",
length, channel->mStream));
if (!channel->mRecvBuffer.IsEmpty()) {
channel->mRecvBuffer += recvData;
LOG(("%s: sending ON_DATA (string fragmented) for %p", __FUNCTION__, channel));
channel->SendOrQueue(new DataChannelOnMessageAvailable(
DataChannelOnMessageAvailable::ON_DATA, this,
channel, channel->mRecvBuffer, -1));
channel->mRecvBuffer.Truncate(0);
@@ -1372,17 +1371,17 @@ DataChannelConnection::HandleDataMessage
}
// else send using recvData normally
length = -1; // Flag for DOMString
// WebSockets checks IsUTF8() here; we can try to deliver it
break;
case DATA_CHANNEL_PPID_BINARY_LAST:
- LOG(("DataChannel: Received binary message of length %" PRIuSIZE " on channel id %u",
+ LOG(("DataChannel: Received binary message of length %zu on channel id %u",
length, channel->mStream));
if (!channel->mRecvBuffer.IsEmpty()) {
channel->mRecvBuffer += recvData;
LOG(("%s: sending ON_DATA (binary fragmented) for %p", __FUNCTION__, channel));
channel->SendOrQueue(new DataChannelOnMessageAvailable(
DataChannelOnMessageAvailable::ON_DATA, this,
channel, channel->mRecvBuffer,
channel->mRecvBuffer.Length()));
@@ -1438,17 +1437,17 @@ DataChannelConnection::HandleMessage(con
break;
case DATA_CHANNEL_PPID_DOMSTRING:
case DATA_CHANNEL_PPID_DOMSTRING_LAST:
case DATA_CHANNEL_PPID_BINARY:
case DATA_CHANNEL_PPID_BINARY_LAST:
HandleDataMessage(ppid, buffer, length, stream);
break;
default:
- LOG(("Message of length %" PRIuSIZE ", PPID %u on stream %u received.",
+ LOG(("Message of length %zu, PPID %u on stream %u received.",
length, ppid, stream));
break;
}
}
void
DataChannelConnection::HandleAssociationChangeEvent(const struct sctp_assoc_change *sac)
{
@@ -1648,17 +1647,17 @@ DataChannelConnection::HandleSendFailedE
}
}
void
DataChannelConnection::ClearResets()
{
// Clear all pending resets
if (!mStreamsResetting.IsEmpty()) {
- LOG(("Clearing resets for %" PRIuSIZE " streams", mStreamsResetting.Length()));
+ LOG(("Clearing resets for %zu streams", mStreamsResetting.Length()));
}
for (uint32_t i = 0; i < mStreamsResetting.Length(); ++i) {
RefPtr<DataChannel> channel;
channel = FindChannelByStream(mStreamsResetting[i]);
if (channel) {
LOG(("Forgetting channel %u (%p) with pending reset",channel->mStream, channel.get()));
mStreams[channel->mStream] = nullptr;
@@ -1686,17 +1685,17 @@ DataChannelConnection::ResetOutgoingStre
void
DataChannelConnection::SendOutgoingStreamReset()
{
struct sctp_reset_streams *srs;
uint32_t i;
size_t len;
- LOG(("Connection %p: Sending outgoing stream reset for %" PRIuSIZE " streams",
+ LOG(("Connection %p: Sending outgoing stream reset for %zu streams",
(void *) this, mStreamsResetting.Length()));
mLock.AssertCurrentThreadOwns();
if (mStreamsResetting.IsEmpty()) {
LOG(("No streams to reset"));
return;
}
len = sizeof(sctp_assoc_t) + (2 + mStreamsResetting.Length()) * sizeof(uint16_t);
srs = static_cast<struct sctp_reset_streams *> (moz_xmalloc(len)); // infallible malloc
@@ -1764,67 +1763,67 @@ DataChannelConnection::HandleStreamReset
LOG(("Can't find incoming channel %d",i));
}
}
}
}
// Process any pending resets now:
if (!mStreamsResetting.IsEmpty()) {
- LOG(("Sending %" PRIuSIZE " pending resets", mStreamsResetting.Length()));
+ LOG(("Sending %zu pending resets", mStreamsResetting.Length()));
SendOutgoingStreamReset();
}
}
void
DataChannelConnection::HandleStreamChangeEvent(const struct sctp_stream_change_event *strchg)
{
uint16_t stream;
RefPtr<DataChannel> channel;
if (strchg->strchange_flags == SCTP_STREAM_CHANGE_DENIED) {
- LOG(("*** Failed increasing number of streams from %" PRIuSIZE " (%u/%u)",
+ LOG(("*** Failed increasing number of streams from %zu (%u/%u)",
mStreams.Length(),
strchg->strchange_instrms,
strchg->strchange_outstrms));
// XXX FIX! notify pending opens of failure
return;
}
if (strchg->strchange_instrms > mStreams.Length()) {
- LOG(("Other side increased streams from %" PRIuSIZE " to %u",
+ LOG(("Other side increased streams from %zu to %u",
mStreams.Length(), strchg->strchange_instrms));
}
if (strchg->strchange_outstrms > mStreams.Length() ||
strchg->strchange_instrms > mStreams.Length()) {
uint16_t old_len = mStreams.Length();
uint16_t new_len = std::max(strchg->strchange_outstrms,
strchg->strchange_instrms);
LOG(("Increasing number of streams from %u to %u - adding %u (in: %u)",
old_len, new_len, new_len - old_len,
strchg->strchange_instrms));
// make sure both are the same length
mStreams.AppendElements(new_len - old_len);
- LOG(("New length = %" PRIuSIZE " (was %d)", mStreams.Length(), old_len));
+ LOG(("New length = %zu (was %d)", mStreams.Length(), old_len));
for (size_t i = old_len; i < mStreams.Length(); ++i) {
mStreams[i] = nullptr;
}
// Re-process any channels waiting for streams.
// Linear search, but we don't increase channels often and
// the array would only get long in case of an app error normally
// Make sure we request enough streams if there's a big jump in streams
// Could make a more complex API for OpenXxxFinish() and avoid this loop
size_t num_needed = mPending.GetSize();
- LOG(("%" PRIuSIZE " of %d new streams already needed", num_needed,
+ LOG(("%zu of %d new streams already needed", num_needed,
new_len - old_len));
num_needed -= (new_len - old_len); // number we added
if (num_needed > 0) {
if (num_needed < 16)
num_needed = 16;
- LOG(("Not enough new streams, asking for %" PRIuSIZE " more", num_needed));
+ LOG(("Not enough new streams, asking for %zu more", num_needed));
RequestMoreStreams(num_needed);
} else if (strchg->strchange_outstrms < strchg->strchange_instrms) {
LOG(("Requesting %d output streams to match partner",
strchg->strchange_instrms - strchg->strchange_outstrms));
RequestMoreStreams(strchg->strchange_instrms - strchg->strchange_outstrms);
}
ProcessQueuedOpens();
@@ -2223,30 +2222,30 @@ DataChannelConnection::SendMsgInternal(D
// Must lock before empty check for similar reasons!
MutexAutoLock lock(mLock);
if (channel->mBufferedData.IsEmpty()) {
result = usrsctp_sendv(mSocket, data, length,
nullptr, 0,
(void *)&spa, (socklen_t)sizeof(struct sctp_sendv_spa),
SCTP_SENDV_SPA, 0);
- LOG(("Sent buffer (len=%" PRIuSIZE "), result=%d", length, result));
+ LOG(("Sent buffer (len=%zu), result=%d", length, result));
} else {
// Fake EAGAIN if we're already buffering data
result = -1;
errno = EAGAIN;
}
if (result < 0) {
if (errno == EAGAIN || errno == EWOULDBLOCK) {
// queue data for resend! And queue any further data for the stream until it is...
auto *buffered = new BufferedMsg(spa, data, length); // infallible malloc
channel->mBufferedData.AppendElement(buffered); // owned by mBufferedData array
channel->mFlags |= DATA_CHANNEL_FLAGS_SEND_DATA;
- LOG(("Queued %" PRIuSIZE " buffers (len=%" PRIuSIZE ")",
+ LOG(("Queued %zu buffers (len=%zu)",
channel->mBufferedData.Length(), length));
return 0;
}
LOG(("error %d sending string", errno));
}
return result;
}
@@ -2270,29 +2269,29 @@ DataChannelConnection::SendBinary(DataCh
// We *really* don't want to do this from main thread! - and SendMsgInternal
// avoids blocking.
// This MUST be reliable and in-order for the reassembly to work
if (len > DATA_CHANNEL_MAX_BINARY_FRAGMENT &&
channel->mPrPolicy == DATA_CHANNEL_RELIABLE &&
!(channel->mFlags & DATA_CHANNEL_FLAGS_OUT_OF_ORDER_ALLOWED)) {
int32_t sent=0;
uint32_t origlen = len;
- LOG(("Sending binary message length %" PRIuSIZE " in chunks", len));
+ LOG(("Sending binary message length %zu in chunks", len));
// XXX check flags for out-of-order, or force in-order for large binary messages
while (len > 0) {
size_t sendlen = std::min<size_t>(len, DATA_CHANNEL_MAX_BINARY_FRAGMENT);
uint32_t ppid;
len -= sendlen;
ppid = len > 0 ? ppid_partial : ppid_final;
- LOG(("Send chunk of %" PRIuSIZE " bytes, ppid %u", sendlen, ppid));
+ LOG(("Send chunk of %zu bytes, ppid %u", sendlen, ppid));
// Note that these might end up being deferred and queued.
sent += SendMsgInternal(channel, data, sendlen, ppid);
data += sendlen;
}
- LOG(("Sent %d buffers for %u bytes, %d sent immediately, %" PRIuSIZE " buffers queued",
+ LOG(("Sent %d buffers for %u bytes, %d sent immediately, %zu buffers queued",
(origlen+DATA_CHANNEL_MAX_BINARY_FRAGMENT-1)/DATA_CHANNEL_MAX_BINARY_FRAGMENT,
origlen, sent,
channel->mBufferedData.Length()));
return sent;
}
NS_WARNING_ASSERTION(len <= DATA_CHANNEL_MAX_BINARY_FRAGMENT,
"Sending too-large data on unreliable channel!");
--- a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
+++ b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
@@ -13,17 +13,16 @@
#include "nsIStreamListener.h"
#include "nsCRT.h"
#include "nsIChannel.h"
#include "nsIURI.h"
#include "ParseFTPList.h"
#include <algorithm>
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/UniquePtrExtensions.h"
#include "mozilla/Unused.h"
//
// Log module for FTP dir listing stream converter logging...
//
// To enable logging (see prlog.h for full details):
//
@@ -131,17 +130,17 @@ nsFTPDirListingConv::OnDataAvailable(nsI
line = DigestBufferLines(line, indexFormat);
MOZ_LOG(gFTPDirListConvLog, LogLevel::Debug, ("::OnData() sending the following %d bytes...\n\n%s\n\n",
indexFormat.Length(), indexFormat.get()) );
// if there's any data left over, buffer it.
if (line && *line) {
mBuffer.Append(line);
- MOZ_LOG(gFTPDirListConvLog, LogLevel::Debug, ("::OnData() buffering the following %" PRIuSIZE " bytes...\n\n%s\n\n",
+ MOZ_LOG(gFTPDirListConvLog, LogLevel::Debug, ("::OnData() buffering the following %zu bytes...\n\n%s\n\n",
strlen(line), line) );
}
// send the converted data out.
nsCOMPtr<nsIInputStream> inputData;
rv = NS_NewCStringInputStream(getter_AddRefs(inputData), indexFormat);
NS_ENSURE_SUCCESS(rv, rv);
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -10,17 +10,16 @@
#include "nsCOMPtr.h"
#include "nsError.h"
#include "nsStreamUtils.h"
#include "nsStringStream.h"
#include "nsComponentManagerUtils.h"
#include "nsThreadUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsIForcePendingChannel.h"
#include "nsIRequest.h"
// brotli headers
#include "state.h"
#include "decode.h"
namespace mozilla {
@@ -196,25 +195,25 @@ nsHTTPCompressConv::BrotliHandler(nsIInp
return self->mBrotli->mStatus;
}
do {
outSize = kOutSize;
outPtr = outBuffer.get();
// brotli api is documented in brotli/dec/decode.h and brotli/dec/decode.c
- LOG(("nsHttpCompresssConv %p brotlihandler decompress %" PRIuSIZE "\n", self, avail));
+ LOG(("nsHttpCompresssConv %p brotlihandler decompress %zu\n", self, avail));
size_t totalOut = self->mBrotli->mTotalOut;
res = ::BrotliDecompressStream(
&avail, reinterpret_cast<const unsigned char **>(&dataIn),
&outSize, &outPtr, &totalOut, &self->mBrotli->mState);
outSize = kOutSize - outSize;
self->mBrotli->mTotalOut = totalOut;
self->mBrotli->mBrotliStateIsStreamEnd = BrotliStateIsStreamEnd(&self->mBrotli->mState);
- LOG(("nsHttpCompresssConv %p brotlihandler decompress rv=%" PRIx32 " out=%" PRIuSIZE "\n",
+ LOG(("nsHttpCompresssConv %p brotlihandler decompress rv=%" PRIx32 " out=%zu\n",
self, static_cast<uint32_t>(res), outSize));
if (res == BROTLI_RESULT_ERROR) {
LOG(("nsHttpCompressConv %p marking invalid encoding", self));
self->mBrotli->mStatus = NS_ERROR_INVALID_CONTENT_ENCODING;
return self->mBrotli->mStatus;
}
--- a/parser/htmlparser/nsExpatDriver.cpp
+++ b/parser/htmlparser/nsExpatDriver.cpp
@@ -24,17 +24,16 @@
#include "nsContentPolicyUtils.h"
#include "nsError.h"
#include "nsXPCOMCIDInternal.h"
#include "nsUnicharInputStream.h"
#include "nsContentUtils.h"
#include "NullPrincipal.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
using mozilla::fallible;
using mozilla::LogLevel;
#define kExpatSeparatorChar 0xFFFF
static const char16_t kUTF16[] = { 'U', 'T', 'F', '-', '1', '6', '\0' };
@@ -1053,17 +1052,17 @@ nsExpatDriver::ConsumeToken(nsScanner& a
start.advance(mExpatBuffered);
// This is the end of the last buffer (at this point, more data could come in
// later).
nsScannerIterator end;
aScanner.EndReading(end);
MOZ_LOG(gExpatDriverLog, LogLevel::Debug,
- ("Remaining in expat's buffer: %i, remaining in scanner: %" PRIuSIZE ".",
+ ("Remaining in expat's buffer: %i, remaining in scanner: %zu.",
mExpatBuffered, Distance(start, end)));
// We want to call Expat if we have more buffers, or if we know there won't
// be more buffers (and so we want to flush the remaining data), or if we're
// currently blocked and there's data in Expat's buffer.
while (start != end || (mIsFinalChunk && !mMadeFinalCallToExpat) ||
(BlockedOrInterrupted() && mExpatBuffered > 0)) {
bool noMoreBuffers = start == end && mIsFinalChunk;
@@ -1201,17 +1200,17 @@ nsExpatDriver::ConsumeToken(nsScanner& a
// to compensate.
aScanner.EndReading(end);
}
aScanner.SetPosition(currentExpatPosition, true);
aScanner.Mark();
MOZ_LOG(gExpatDriverLog, LogLevel::Debug,
- ("Remaining in expat's buffer: %i, remaining in scanner: %" PRIuSIZE ".",
+ ("Remaining in expat's buffer: %i, remaining in scanner: %zu.",
mExpatBuffered, Distance(currentExpatPosition, end)));
return NS_SUCCEEDED(mInternalState) ? NS_ERROR_HTMLPARSER_EOF : NS_OK;
}
NS_IMETHODIMP
nsExpatDriver::WillBuildModel(const CParserContext& aParserContext,
nsITokenizer* aTokenizer,
--- a/security/manager/ssl/RootCertificateTelemetryUtils.cpp
+++ b/security/manager/ssl/RootCertificateTelemetryUtils.cpp
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "RootCertificateTelemetryUtils.h"
#include "mozilla/Logging.h"
#include "RootHashes.inc" // Note: Generated by genRootCAHashes.js
#include "ScopedNSSTypes.h"
#include "mozilla/ArrayUtils.h"
-#include "mozilla/SizePrintfMacros.h"
namespace mozilla { namespace psm {
mozilla::LazyLogModule gPublicKeyPinningTelemetryLog("PublicKeyPinningTelemetryService");
// Used in the BinarySearch method, this does a memcmp between the pointer
// provided to its construtor and whatever the binary search is looking for.
//
@@ -59,17 +58,17 @@ RootCABinNumber(const SECItem* cert)
digest.get().data[0], digest.get().data[1], digest.get().data[2], digest.get().data[3]));
if (mozilla::BinarySearchIf(ROOT_TABLE, 0, ArrayLength(ROOT_TABLE),
BinaryHashSearchArrayComparator(static_cast<uint8_t*>(digest.get().data),
digest.get().len),
&idx)) {
MOZ_LOG(gPublicKeyPinningTelemetryLog, LogLevel::Debug,
- ("pkpinTelem: Telemetry index was %" PRIuSIZE ", bin is %d\n",
+ ("pkpinTelem: Telemetry index was %zu, bin is %d\n",
idx, ROOT_TABLE[idx].binNumber));
return (int32_t) ROOT_TABLE[idx].binNumber;
}
// Didn't match.
return ROOT_CERTIFICATE_UNKNOWN;
}
--- a/toolkit/components/downloads/ApplicationReputation.cpp
+++ b/toolkit/components/downloads/ApplicationReputation.cpp
@@ -28,17 +28,16 @@
#include "nsIX509CertList.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/ErrorNames.h"
#include "mozilla/LoadContext.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/intl/LocaleService.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsDebug.h"
#include "nsDependentSubstring.h"
@@ -1332,17 +1331,17 @@ PendingLookup::SendRemoteQueryInternal()
// Serialize the protocol buffer to a string. This can only fail if we are
// out of memory, or if the protocol buffer req is missing required fields
// (only the URL for now).
std::string serialized;
if (!mRequest.SerializeToString(&serialized)) {
return NS_ERROR_UNEXPECTED;
}
- LOG(("Serialized protocol buffer [this = %p]: (length=%" PRIuSIZE ") %s", this,
+ LOG(("Serialized protocol buffer [this = %p]: (length=%zu) %s", this,
serialized.length(), serialized.c_str()));
// Set the input stream to the serialized protocol buffer
nsCOMPtr<nsIStringInputStream> sstream =
do_CreateInstance("@mozilla.org/io/string-input-stream;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = sstream->SetData(serialized.c_str(), serialized.length());
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -3,17 +3,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include <stdio.h>
#include "mozilla/DebugOnly.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsNavHistory.h"
#include "mozIPlacesAutoComplete.h"
#include "nsNavBookmarks.h"
#include "nsAnnotationService.h"
#include "nsFaviconService.h"
#include "nsPlacesMacros.h"
--- a/toolkit/components/url-classifier/Classifier.cpp
+++ b/toolkit/components/url-classifier/Classifier.cpp
@@ -16,17 +16,16 @@
#include "nsPrintfCString.h"
#include "nsThreadUtils.h"
#include "mozilla/Telemetry.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Logging.h"
#include "mozilla/SyncRunnable.h"
#include "mozilla/Base64.h"
#include "mozilla/Unused.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/UniquePtr.h"
#include "nsIUrlClassifierUtils.h"
#include "nsUrlClassifierDBService.h"
// MOZ_LOG=UrlClassifierDbService:5
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
@@ -809,17 +808,17 @@ Classifier::ApplyUpdatesBackground(nsTAr
rv = CopyInUseDirForUpdate(); // i.e. mUpdatingDirectory will be setup.
if (NS_FAILED(rv)) {
LOG(("Failed to copy in-use directory for update."));
return rv;
}
}
- LOG(("Applying %" PRIuSIZE " table updates.", aUpdates->Length()));
+ LOG(("Applying %zu table updates.", aUpdates->Length()));
for (uint32_t i = 0; i < aUpdates->Length(); i++) {
// Previous UpdateHashStore() may have consumed this update..
if ((*aUpdates)[i]) {
// Run all updates for one table
nsCString updateTable(aUpdates->ElementAt(i)->TableName());
// Check point 2: Processing downloaded data takes time.
@@ -874,17 +873,17 @@ Classifier::ApplyUpdatesForeground(nsres
ResetTables(Clear_All, nsTArray<nsCString> { nsCString(aFailedTableName) });
}
return aBackgroundRv;
}
nsresult
Classifier::ApplyFullHashes(nsTArray<TableUpdate*>* aUpdates)
{
- LOG(("Applying %" PRIuSIZE " table gethashes.", aUpdates->Length()));
+ LOG(("Applying %zu table gethashes.", aUpdates->Length()));
ScopedUpdatesClearer scopedUpdatesClearer(aUpdates);
for (uint32_t i = 0; i < aUpdates->Length(); i++) {
TableUpdate *update = aUpdates->ElementAt(i);
nsresult rv = UpdateCache(update);
NS_ENSURE_SUCCESS(rv, rv);
@@ -1249,40 +1248,40 @@ Classifier::UpdateHashStore(nsTArray<Tab
NS_ENSURE_SUCCESS(rv, rv);
applied++;
auto updateV2 = TableUpdate::Cast<TableUpdateV2>(update);
if (updateV2) {
LOG(("Applied update to table %s:", store.TableName().get()));
LOG((" %d add chunks", updateV2->AddChunks().Length()));
- LOG((" %" PRIuSIZE " add prefixes", updateV2->AddPrefixes().Length()));
- LOG((" %" PRIuSIZE " add completions", updateV2->AddCompletes().Length()));
+ LOG((" %zu add prefixes", updateV2->AddPrefixes().Length()));
+ LOG((" %zu add completions", updateV2->AddCompletes().Length()));
LOG((" %d sub chunks", updateV2->SubChunks().Length()));
- LOG((" %" PRIuSIZE " sub prefixes", updateV2->SubPrefixes().Length()));
- LOG((" %" PRIuSIZE " sub completions", updateV2->SubCompletes().Length()));
+ LOG((" %zu sub prefixes", updateV2->SubPrefixes().Length()));
+ LOG((" %zu sub completions", updateV2->SubCompletes().Length()));
LOG((" %d add expirations", updateV2->AddExpirations().Length()));
LOG((" %d sub expirations", updateV2->SubExpirations().Length()));
}
aUpdates->ElementAt(i) = nullptr;
}
LOG(("Applied %d update(s) to %s.", applied, store.TableName().get()));
rv = store.Rebuild();
NS_ENSURE_SUCCESS(rv, rv);
LOG(("Table %s now has:", store.TableName().get()));
LOG((" %d add chunks", store.AddChunks().Length()));
- LOG((" %" PRIuSIZE " add prefixes", store.AddPrefixes().Length()));
- LOG((" %" PRIuSIZE " add completions", store.AddCompletes().Length()));
+ LOG((" %zu add prefixes", store.AddPrefixes().Length()));
+ LOG((" %zu add completions", store.AddCompletes().Length()));
LOG((" %d sub chunks", store.SubChunks().Length()));
- LOG((" %" PRIuSIZE " sub prefixes", store.SubPrefixes().Length()));
- LOG((" %" PRIuSIZE " sub completions", store.SubCompletes().Length()));
+ LOG((" %zu sub prefixes", store.SubPrefixes().Length()));
+ LOG((" %zu sub completions", store.SubCompletes().Length()));
rv = store.WriteFile();
NS_ENSURE_SUCCESS(rv, rv);
// At this point the store is updated and written out to disk, but
// the data is still in memory. Build our quick-lookup table here.
rv = lookupCache->Build(store.AddPrefixes(), store.AddCompletes());
NS_ENSURE_SUCCESS(rv, NS_ERROR_UC_UPDATE_BUILD_PREFIX_FAILURE);
--- a/toolkit/components/url-classifier/HashStore.cpp
+++ b/toolkit/components/url-classifier/HashStore.cpp
@@ -33,17 +33,16 @@
#include "nsICryptoHash.h"
#include "nsISeekableStream.h"
#include "nsIStreamConverterService.h"
#include "nsNetUtil.h"
#include "nsCheckSummedOutputStream.h"
#include "prio.h"
#include "mozilla/Logging.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
#include "zlib.h"
#include "Classifier.h"
#include "nsUrlClassifierDBService.h"
#include "mozilla/Telemetry.h"
// Main store for SafeBrowsing protocol data. We store
// known add/sub chunks, prefixes and completions in memory
// during an update, and serialize to disk.
@@ -186,17 +185,17 @@ TableUpdateV4::NewPrefixes(int32_t aSize
}
LOG(("* The last 10 (maximum) fixed-length prefixes: "));
for (int i = std::max(0, numOfPrefixes - 10); i < numOfPrefixes; i++) {
uint8_t* c = (uint8_t*)&p[i];
LOG(("%.2X%.2X%.2X%.2X", c[0], c[1], c[2], c[3]));
}
- LOG(("---- %" PRIuSIZE " fixed-length prefixes in total.", aPrefixes.size() / aSize));
+ LOG(("---- %zu fixed-length prefixes in total.", aPrefixes.size() / aSize));
}
PrefixStdString* prefix = new PrefixStdString(aPrefixes);
mPrefixesMap.Put(aSize, prefix);
}
void
TableUpdateV4::NewRemovalIndices(const uint32_t* aIndices, size_t aNumOfIndices)
@@ -1186,17 +1185,17 @@ HashStore::ProcessSubs()
return NS_OK;
}
nsresult
HashStore::AugmentAdds(const nsTArray<uint32_t>& aPrefixes)
{
uint32_t cnt = aPrefixes.Length();
if (cnt != mAddPrefixes.Length()) {
- LOG(("Amount of prefixes in cache not consistent with store (%" PRIuSIZE " vs %" PRIuSIZE ")",
+ LOG(("Amount of prefixes in cache not consistent with store (%zu vs %zu)",
aPrefixes.Length(), mAddPrefixes.Length()));
return NS_ERROR_FAILURE;
}
for (uint32_t i = 0; i < cnt; i++) {
mAddPrefixes[i].prefix.FromUint32(aPrefixes[i]);
}
return NS_OK;
}
--- a/toolkit/components/url-classifier/ProtocolParser.cpp
+++ b/toolkit/components/url-classifier/ProtocolParser.cpp
@@ -12,17 +12,16 @@
#include "nsUrlClassifierDBService.h"
#include "nsUrlClassifierUtils.h"
#include "nsPrintfCString.h"
#include "mozilla/Base64.h"
#include "RiceDeltaDecoder.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/SizePrintfMacros.h"
// MOZ_LOG=UrlClassifierProtocolParser:5
mozilla::LazyLogModule gUrlClassifierProtocolParserLog("UrlClassifierProtocolParser");
#define PARSER_LOG(args) MOZ_LOG(gUrlClassifierProtocolParserLog, mozilla::LogLevel::Debug, args)
namespace mozilla {
namespace safebrowsing {
@@ -932,17 +931,17 @@ ProtocolParserProtobuf::ProcessRawAdditi
}
auto prefixes = rawHashes.raw_hashes();
if (4 == rawHashes.prefix_size()) {
// Process fixed length prefixes separately.
uint32_t* fixedLengthPrefixes = (uint32_t*)prefixes.c_str();
size_t numOfFixedLengthPrefixes = prefixes.size() / 4;
PARSER_LOG(("* Raw addition (4 bytes)"));
- PARSER_LOG((" - # of prefixes: %" PRIuSIZE, numOfFixedLengthPrefixes));
+ PARSER_LOG((" - # of prefixes: %zu", numOfFixedLengthPrefixes));
PARSER_LOG((" - Memory address: 0x%p", fixedLengthPrefixes));
} else {
// TODO: Process variable length prefixes including full hashes.
// See Bug 1283009.
PARSER_LOG((" Raw addition (%d bytes)", rawHashes.prefix_size()));
}
if (!rawHashes.mutable_raw_hashes()) {
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -30,17 +30,16 @@
#include "nsThreadUtils.h"
#include "nsProxyRelease.h"
#include "nsString.h"
#include "mozilla/Atomics.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/ErrorNames.h"
#include "mozilla/Mutex.h"
#include "mozilla/Preferences.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Logging.h"
#include "prnetdb.h"
#include "Entries.h"
#include "HashStore.h"
#include "Classifier.h"
#include "ProtocolParser.h"
@@ -184,17 +183,17 @@ nsUrlClassifierDBServiceWorker::DoLocalL
if (!mClassifier) {
return NS_ERROR_NOT_AVAILABLE;
}
// We ignore failures from Check because we'd rather return the
// results that were found than fail.
mClassifier->Check(spec, tables, *results);
- LOG(("Found %" PRIuSIZE " results.", results->Length()));
+ LOG(("Found %zu results.", results->Length()));
return NS_OK;
}
static nsresult
ProcessLookupResults(LookupResultArray* results, nsTArray<nsCString>& tables)
{
// Build the result array.
for (uint32_t i = 0; i < results->Length(); i++) {
@@ -241,17 +240,17 @@ nsUrlClassifierDBServiceWorker::DoLookup
}
nsresult rv = DoLocalLookup(spec, tables, results);
if (NS_FAILED(rv)) {
c->LookupComplete(nullptr);
return rv;
}
- LOG(("Found %" PRIuSIZE " results.", results->Length()));
+ LOG(("Found %zu results.", results->Length()));
if (LOG_ENABLED()) {
PRIntervalTime clockEnd = PR_IntervalNow();
LOG(("query took %dms\n",
PR_IntervalToMilliseconds(clockEnd - clockStart)));
}
@@ -1252,17 +1251,17 @@ nsUrlClassifierLookupCallback::HandleRes
if (!mResults) {
// No results, this URI is clean.
LOG(("nsUrlClassifierLookupCallback::HandleResults [%p, no results]", this));
return mCallback->HandleEvent(NS_LITERAL_CSTRING(""));
}
MOZ_ASSERT(mPendingCompletions == 0, "HandleResults() should never be "
"called while there are pending completions");
- LOG(("nsUrlClassifierLookupCallback::HandleResults [%p, %" PRIuSIZE " results]",
+ LOG(("nsUrlClassifierLookupCallback::HandleResults [%p, %zu results]",
this, mResults->Length()));
nsCOMPtr<nsIUrlClassifierClassifyCallback> classifyCallback =
do_QueryInterface(mCallback);
nsTArray<nsCString> tables;
// Build a stringified list of result tables.
for (uint32_t i = 0; i < mResults->Length(); i++) {
--- a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
@@ -15,17 +15,16 @@
#include "nsToolkitCompsCID.h"
#include "nsTArray.h"
#include "nsThreadUtils.h"
#include "nsNetUtil.h"
#include "nsISeekableStream.h"
#include "nsIBufferedStreams.h"
#include "nsIFileStreams.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "mozilla/FileUtils.h"
#include "mozilla/Logging.h"
#include "mozilla/Unused.h"
#include <algorithm>
using namespace mozilla;
@@ -132,17 +131,17 @@ nsUrlClassifierPrefixSet::MakePrefixSet(
}
mIndexDeltas.LastElement().Compact();
mIndexDeltas.Compact();
mIndexPrefixes.Compact();
LOG(("Total number of indices: %d", aLength));
LOG(("Total number of deltas: %d", totalDeltas));
- LOG(("Total number of delta chunks: %" PRIuSIZE, mIndexDeltas.Length()));
+ LOG(("Total number of delta chunks: %zu", mIndexDeltas.Length()));
return NS_OK;
}
nsresult
nsUrlClassifierPrefixSet::GetPrefixesNative(FallibleTArray<uint32_t>& outArray)
{
MutexAutoLock lock(mLock);
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -99,17 +99,16 @@
#ifdef XP_WIN
#include "nsWindowsHelpers.h"
#endif
#ifdef MOZ_WIDGET_ANDROID
#include "FennecJNIWrappers.h"
#endif
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Preferences.h"
#include "mozilla/ipc/URIUtils.h"
using namespace mozilla;
using namespace mozilla::ipc;
// Download Folder location constants
#define NS_PREF_DOWNLOAD_DIR "browser.download.dir"
@@ -2028,17 +2027,17 @@ nsExternalAppHandler::OnSaveComplete(nsI
nsCOMPtr<nsIChannel> channel = do_QueryInterface(mRequest);
if (channel) {
nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
if (loadInfo) {
nsresult rv = NS_OK;
nsCOMPtr<nsIMutableArray> redirectChain =
do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
- LOG(("nsExternalAppHandler: Got %" PRIuSIZE " redirects\n",
+ LOG(("nsExternalAppHandler: Got %zu redirects\n",
loadInfo->RedirectChain().Length()));
for (nsIRedirectHistoryEntry* entry : loadInfo->RedirectChain()) {
redirectChain->AppendElement(entry, false);
}
mRedirects = redirectChain;
}
}
--- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
@@ -33,17 +33,16 @@
#include "nsProxyRelease.h"
#include "nsIConsoleService.h"
#include "mozilla/Logging.h"
#include "nsIAsyncVerifyRedirectCallback.h"
#include "mozilla/Preferences.h"
#include "mozilla/Attributes.h"
#include "nsContentUtils.h"
#include "nsIPrincipal.h"
-#include "mozilla/SizePrintfMacros.h"
#include "nsXULAppAPI.h"
using namespace mozilla;
static const uint32_t kRescheduleLimit = 3;
// Max number of retries for every entry of pinned app.
static const uint32_t kPinnedEntryRetriesLimit = 3;
@@ -1888,17 +1887,17 @@ nsOfflineCacheUpdate::AddExistingItems(u
}
nsresult
nsOfflineCacheUpdate::ProcessNextURI()
{
// Keep the object alive through a Finish() call.
nsCOMPtr<nsIOfflineCacheUpdate> kungFuDeathGrip(this);
- LOG(("nsOfflineCacheUpdate::ProcessNextURI [%p, inprogress=%d, numItems=%" PRIuSIZE "]",
+ LOG(("nsOfflineCacheUpdate::ProcessNextURI [%p, inprogress=%d, numItems=%zu]",
this, mItemsInProgress, mItems.Length()));
if (mState != STATE_DOWNLOADING) {
LOG((" should only be called from the DOWNLOADING state, ignoring"));
return NS_ERROR_UNEXPECTED;
}
nsOfflineCacheUpdateItem * runItem = nullptr;
--- a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp
@@ -33,17 +33,16 @@
#include "nsServiceManagerUtils.h"
#include "nsStreamUtils.h"
#include "nsThreadUtils.h"
#include "nsProxyRelease.h"
#include "mozilla/Logging.h"
#include "nsIAsyncVerifyRedirectCallback.h"
#include "mozilla/Preferences.h"
#include "mozilla/Attributes.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "nsIDiskSpaceWatcher.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDocShellTreeOwner.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "nsContentUtils.h"
@@ -392,17 +391,17 @@ nsOfflineCacheUpdateService::UpdateFinis
//-----------------------------------------------------------------------------
// nsOfflineCacheUpdateService <private>
//-----------------------------------------------------------------------------
nsresult
nsOfflineCacheUpdateService::ProcessNextUpdate()
{
- LOG(("nsOfflineCacheUpdateService::ProcessNextUpdate [%p, num=%" PRIuSIZE "]",
+ LOG(("nsOfflineCacheUpdateService::ProcessNextUpdate [%p, num=%zu]",
this, mUpdates.Length()));
if (mDisabled)
return NS_ERROR_ABORT;
if (mUpdateRunning)
return NS_OK;
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -7,17 +7,16 @@
#include "mozilla/ContentCache.h"
#include "mozilla/IMEStateManager.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Logging.h"
#include "mozilla/Move.h"
#include "mozilla/RefPtr.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TextComposition.h"
#include "mozilla/TextEvents.h"
#include "mozilla/dom/TabParent.h"
#include "nsIWidget.h"
namespace mozilla {
using namespace dom;
@@ -461,18 +460,18 @@ ContentCacheInChild::CacheTextRects(nsIW
"couldn't retrieve first char rect", this));
} else {
mFirstCharRect = charRect;
}
}
MOZ_LOG(sContentCacheLog, LogLevel::Info,
("0x%p CacheTextRects(), Succeeded, "
- "mText.Length()=%x, mTextRectArray={ mStart=%u, mRects.Length()=%"
- PRIuSIZE " }, mSelection={ mAnchor=%u, mAnchorCharRects[eNextCharRect]=%s, "
+ "mText.Length()=%x, mTextRectArray={ mStart=%u, mRects.Length()=%zu"
+ " }, mSelection={ mAnchor=%u, mAnchorCharRects[eNextCharRect]=%s, "
"mAnchorCharRects[ePrevCharRect]=%s, mFocus=%u, "
"mFocusCharRects[eNextCharRect]=%s, mFocusCharRects[ePrevCharRect]=%s, "
"mRect=%s }, mFirstCharRect=%s",
this, mText.Length(), mTextRectArray.mStart,
mTextRectArray.mRects.Length(), mSelection.mAnchor,
GetRectText(mSelection.mAnchorCharRects[eNextCharRect]).get(),
GetRectText(mSelection.mAnchorCharRects[ePrevCharRect]).get(),
mSelection.mFocus,
@@ -571,17 +570,17 @@ ContentCacheInParent::AssignContent(cons
MOZ_LOG(sContentCacheLog, LogLevel::Info,
("0x%p AssignContent(aNotification=%s), "
"Succeeded, mText.Length()=%u, mSelection={ mAnchor=%u, mFocus=%u, "
"mWritingMode=%s, mAnchorCharRects[eNextCharRect]=%s, "
"mAnchorCharRects[ePrevCharRect]=%s, mFocusCharRects[eNextCharRect]=%s, "
"mFocusCharRects[ePrevCharRect]=%s, mRect=%s }, "
"mFirstCharRect=%s, mCaret={ mOffset=%u, mRect=%s }, mTextRectArray={ "
- "mStart=%u, mRects.Length()=%" PRIuSIZE " }, mWidgetHasComposition=%s, "
+ "mStart=%u, mRects.Length()=%zu }, mWidgetHasComposition=%s, "
"mPendingCompositionCount=%u, mCompositionStart=%u, "
"mPendingCommitLength=%u, mEditorRect=%s",
this, GetNotificationName(aNotification),
mText.Length(), mSelection.mAnchor, mSelection.mFocus,
GetWritingModeName(mSelection.mWritingMode).get(),
GetRectText(mSelection.mAnchorCharRects[eNextCharRect]).get(),
GetRectText(mSelection.mAnchorCharRects[ePrevCharRect]).get(),
GetRectText(mSelection.mFocusCharRects[eNextCharRect]).get(),
@@ -869,17 +868,17 @@ ContentCacheInParent::HandleQueryContent
bool
ContentCacheInParent::GetTextRect(uint32_t aOffset,
bool aRoundToExistingOffset,
LayoutDeviceIntRect& aTextRect) const
{
MOZ_LOG(sContentCacheLog, LogLevel::Info,
("0x%p GetTextRect(aOffset=%u, "
"aRoundToExistingOffset=%s), "
- "mTextRectArray={ mStart=%u, mRects.Length()=%" PRIuSIZE " }, "
+ "mTextRectArray={ mStart=%u, mRects.Length()=%zu }, "
"mSelection={ mAnchor=%u, mFocus=%u }",
this, aOffset, GetBoolName(aRoundToExistingOffset),
mTextRectArray.mStart, mTextRectArray.mRects.Length(),
mSelection.mAnchor, mSelection.mFocus));
if (!aOffset) {
NS_WARNING_ASSERTION(!mFirstCharRect.IsEmpty(), "empty rect");
aTextRect = mFirstCharRect;
@@ -938,17 +937,17 @@ ContentCacheInParent::GetUnionTextRects(
uint32_t aOffset,
uint32_t aLength,
bool aRoundToExistingOffset,
LayoutDeviceIntRect& aUnionTextRect) const
{
MOZ_LOG(sContentCacheLog, LogLevel::Info,
("0x%p GetUnionTextRects(aOffset=%u, "
"aLength=%u, aRoundToExistingOffset=%s), mTextRectArray={ "
- "mStart=%u, mRects.Length()=%" PRIuSIZE " }, "
+ "mStart=%u, mRects.Length()=%zu }, "
"mSelection={ mAnchor=%u, mFocus=%u }",
this, aOffset, aLength, GetBoolName(aRoundToExistingOffset),
mTextRectArray.mStart, mTextRectArray.mRects.Length(),
mSelection.mAnchor, mSelection.mFocus));
CheckedInt<uint32_t> endOffset =
CheckedInt<uint32_t>(aOffset) + aLength;
if (!endOffset.isValid()) {
@@ -1043,17 +1042,17 @@ bool
ContentCacheInParent::GetCaretRect(uint32_t aOffset,
bool aRoundToExistingOffset,
LayoutDeviceIntRect& aCaretRect) const
{
MOZ_LOG(sContentCacheLog, LogLevel::Info,
("0x%p GetCaretRect(aOffset=%u, "
"aRoundToExistingOffset=%s), "
"mCaret={ mOffset=%u, mRect=%s, IsValid()=%s }, mTextRectArray={ "
- "mStart=%u, mRects.Length()=%" PRIuSIZE " }, mSelection={ mAnchor=%u, mFocus=%u, "
+ "mStart=%u, mRects.Length()=%zu }, mSelection={ mAnchor=%u, mFocus=%u, "
"mWritingMode=%s, mAnchorCharRects[eNextCharRect]=%s, "
"mAnchorCharRects[ePrevCharRect]=%s, mFocusCharRects[eNextCharRect]=%s, "
"mFocusCharRects[ePrevCharRect]=%s }, mFirstCharRect=%s",
this, aOffset, GetBoolName(aRoundToExistingOffset),
mCaret.mOffset, GetRectText(mCaret.mRect).get(),
GetBoolName(mCaret.IsValid()), mTextRectArray.mStart,
mTextRectArray.mRects.Length(), mSelection.mAnchor, mSelection.mFocus,
GetWritingModeName(mSelection.mWritingMode).get(),
@@ -1097,17 +1096,17 @@ ContentCacheInParent::GetCaretRect(uint3
return true;
}
bool
ContentCacheInParent::OnCompositionEvent(const WidgetCompositionEvent& aEvent)
{
MOZ_LOG(sContentCacheLog, LogLevel::Info,
("0x%p OnCompositionEvent(aEvent={ "
- "mMessage=%s, mData=\"%s\" (Length()=%u), mRanges->Length()=%" PRIuSIZE " }), "
+ "mMessage=%s, mData=\"%s\" (Length()=%u), mRanges->Length()=%zu }), "
"mPendingEventsNeedingAck=%u, mWidgetHasComposition=%s, "
"mPendingCompositionCount=%u, mCommitStringByRequest=0x%p",
this, ToChar(aEvent.mMessage),
GetEscapedUTF8String(aEvent.mData).get(), aEvent.mData.Length(),
aEvent.mRanges ? aEvent.mRanges->Length() : 0, mPendingEventsNeedingAck,
GetBoolName(mWidgetHasComposition), mPendingCompositionCount,
mCommitStringByRequest));
--- a/widget/cocoa/NativeKeyBindings.mm
+++ b/widget/cocoa/NativeKeyBindings.mm
@@ -3,17 +3,16 @@
* 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/. */
#include "NativeKeyBindings.h"
#include "nsTArray.h"
#include "nsCocoaUtils.h"
#include "mozilla/Logging.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TextEvents.h"
namespace mozilla {
namespace widget {
static LazyLogModule gNativeKeyBindingsLog("NativeKeyBindings");
NativeKeyBindings* NativeKeyBindings::sInstanceForSingleLineEditor = nullptr;
@@ -218,17 +217,17 @@ NativeKeyBindings::GetEditCommands(const
MOZ_LOG(gNativeKeyBindingsLog, LogLevel::Info,
("%p NativeKeyBindings::GetEditCommands, interpreting", this));
AutoTArray<KeyBindingsCommand, 2> bindingCommands;
nsCocoaUtils::GetCommandsFromKeyEvent(cocoaEvent, bindingCommands);
MOZ_LOG(gNativeKeyBindingsLog, LogLevel::Info,
- ("%p NativeKeyBindings::GetEditCommands, bindingCommands=%" PRIuSIZE,
+ ("%p NativeKeyBindings::GetEditCommands, bindingCommands=%zu",
this, bindingCommands.Length()));
for (uint32_t i = 0; i < bindingCommands.Length(); i++) {
SEL selector = bindingCommands[i].selector;
if (MOZ_LOG_TEST(gNativeKeyBindingsLog, LogLevel::Info)) {
NSString* selectorString = NSStringFromSelector(selector);
nsAutoString nsSelectorString;
--- a/widget/cocoa/TextInputHandler.mm
+++ b/widget/cocoa/TextInputHandler.mm
@@ -7,17 +7,16 @@
#include "TextInputHandler.h"
#include "mozilla/Logging.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/AutoRestore.h"
#include "mozilla/MiscEvents.h"
#include "mozilla/MouseEvents.h"
-#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TextEventDispatcher.h"
#include "mozilla/TextEvents.h"
#include "nsChildView.h"
#include "nsObjCExceptions.h"
#include "nsBidiUtils.h"
#include "nsToolkit.h"
#include "nsCocoaUtils.h"
@@ -364,17 +363,17 @@ TISInputSourceWrapper::TranslateToString
UniCharCount len;
UniChar chars[5];
OSStatus err = ::UCKeyTranslate(UCKey, aKeyCode,
kUCKeyActionDown, aModifiers >> 8,
aKbType, kUCKeyTranslateNoDeadKeysMask,
&deadKeyState, 5, &len, chars);
MOZ_LOG(gLog, LogLevel::Info,
- ("%p TISInputSourceWrapper::TranslateToString, err=0x%X, len=%" PRIuSIZE,
+ ("%p TISInputSourceWrapper::TranslateToString, err=0x%X, len=%zu",
this, static_cast<int>(err), len));
NS_ENSURE_TRUE(err == noErr, false);
if (len == 0) {
return true;
}
NS_ENSURE_TRUE(EnsureStringLength(aStr, len), false);
NS_ASSERTION(sizeof(char16_t) == sizeof(UniChar),
@@ -427,17 +426,17 @@ TISInputSourceWrapper::IsDeadKey(UInt32
UniChar chars[5];
OSStatus err = ::UCKeyTranslate(UCKey, aKeyCode,
kUCKeyActionDown, aModifiers >> 8,
aKbType, 0,
&deadKeyState, 5, &len, chars);
MOZ_LOG(gLog, LogLevel::Info,
("%p TISInputSourceWrapper::IsDeadKey, err=0x%X, "
- "len=%" PRIuSIZE ", deadKeyState=%u",
+ "len=%zu, deadKeyState=%u",
this, static_cast<int>(err), len, deadKeyState));
if (NS_WARN_IF(err != noErr)) {
return false;
}
return deadKeyState != 0;
}