Bug 726416 - Fix some content/ build warnings; r=mounir

This commit is contained in:
Ms2ger 2012-02-21 10:34:01 +01:00
Родитель fba40a3061
Коммит 052141e960
4 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -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++;
}