зеркало из https://github.com/mozilla/gecko-dev.git
Bug 726416 - Fix some content/ build warnings; r=mounir
This commit is contained in:
Родитель
fba40a3061
Коммит
052141e960
|
@ -8120,7 +8120,7 @@ nsIDocument::ScheduleFrameRequestCallback(nsIFrameRequestCallback* aCallback,
|
|||
PRInt32 newHandle = ++mFrameRequestCallbackCounter;
|
||||
|
||||
bool alreadyRegistered = !mFrameRequestCallbacks.IsEmpty();
|
||||
FrameRequest *request =
|
||||
DebugOnly<FrameRequest*> request =
|
||||
mFrameRequestCallbacks.AppendElement(FrameRequest(aCallback, newHandle));
|
||||
NS_ASSERTION(request, "This is supposed to be infallible!");
|
||||
if (!alreadyRegistered && mPresShell && IsEventHandlingEnabled()) {
|
||||
|
@ -8303,11 +8303,8 @@ nsDocument::RemoveImage(imgIRequest* aImage)
|
|||
NS_ENSURE_ARG_POINTER(aImage);
|
||||
|
||||
// Get the old count. It should exist and be > 0.
|
||||
PRUint32 count;
|
||||
#ifdef DEBUG
|
||||
bool found =
|
||||
#endif
|
||||
mImageTracker.Get(aImage, &count);
|
||||
PRUint32 count = 0;
|
||||
DebugOnly<bool> found = mImageTracker.Get(aImage, &count);
|
||||
NS_ABORT_IF_FALSE(found, "Removing image that wasn't in the tracker!");
|
||||
NS_ABORT_IF_FALSE(count > 0, "Entry in the cache tracker with count 0!");
|
||||
|
||||
|
|
|
@ -349,7 +349,8 @@ class MMListenerRemover
|
|||
{
|
||||
public:
|
||||
MMListenerRemover(nsFrameMessageManager* aMM)
|
||||
: mMM(aMM), mWasHandlingMessage(aMM->mHandlingMessage)
|
||||
: mWasHandlingMessage(aMM->mHandlingMessage)
|
||||
, mMM(aMM)
|
||||
{
|
||||
mMM->mHandlingMessage = true;
|
||||
}
|
||||
|
|
|
@ -327,7 +327,9 @@ nsresult nsBuiltinDecoder::Seek(double aTime)
|
|||
PRInt32 range = 0;
|
||||
if (!IsInRanges(seekable, aTime, range)) {
|
||||
if (range != -1) {
|
||||
if (range + 1 < length) {
|
||||
// |range + 1| can't be negative, because the only possible negative value
|
||||
// for |range| is -1.
|
||||
if (PRUint32(range + 1) < length) {
|
||||
double leftBound, rightBound;
|
||||
res = seekable.End(range, &leftBound);
|
||||
NS_ENSURE_SUCCESS(res, NS_OK);
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StdInt.h"
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::layers;
|
||||
|
@ -307,9 +308,8 @@ void StateMachineTracker::EnsureGlobalStateMachine()
|
|||
ReentrantMonitorAutoEnter mon(mMonitor);
|
||||
if (mStateMachineCount == 0) {
|
||||
NS_ASSERTION(!mStateMachineThread, "Should have null state machine thread!");
|
||||
nsresult res = NS_NewThread(&mStateMachineThread,
|
||||
nsnull);
|
||||
NS_ABORT_IF_FALSE(NS_SUCCEEDED(res), "Can't create media state machine thread");
|
||||
DebugOnly<nsresult> rv = NS_NewThread(&mStateMachineThread, nsnull);
|
||||
NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv), "Can't create media state machine thread");
|
||||
}
|
||||
mStateMachineCount++;
|
||||
}
|
||||
|
@ -866,11 +866,11 @@ void nsBuiltinDecoderStateMachine::AudioLoop()
|
|||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
PRInt64 unplayedFrames = audioDuration % minWriteFrames;
|
||||
if (minWriteFrames > 1 && unplayedFrames > 0) {
|
||||
// Sound is written by libsydneyaudio to the hardware in blocks of
|
||||
// frames of size minWriteFrames. So if the number of frames we've
|
||||
// written isn't an exact multiple of minWriteFrames, we'll have
|
||||
// left over audio data which hasn't yet been written to the hardware,
|
||||
// and so that audio will not start playing. Write silence to ensure
|
||||
// Sound is written by libsydneyaudio to the hardware in blocks of
|
||||
// frames of size minWriteFrames. So if the number of frames we've
|
||||
// written isn't an exact multiple of minWriteFrames, we'll have
|
||||
// left over audio data which hasn't yet been written to the hardware,
|
||||
// and so that audio will not start playing. Write silence to ensure
|
||||
// the last block gets pushed to hardware, so that playback starts.
|
||||
PRInt64 framesToWrite = minWriteFrames - unplayedFrames;
|
||||
if (framesToWrite < PR_UINT32_MAX / channels) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче