Bug 741333 - Remove PRBool/PR_TRUE/PR_FALSE that crept in r=Ms2ger

This commit is contained in:
Veeraya Pupatwibul 2012-04-04 11:15:10 +02:00
Родитель 7741551caa
Коммит 344b2b1753
27 изменённых файлов: 56 добавлений и 56 удалений

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

@ -1642,7 +1642,7 @@ public:
// declaration of nsINode::SizeOfIncludingThis.
virtual void DocSizeOfIncludingThis(nsWindowSizes* aWindowSizes) const;
PRBool MayHaveDOMMutationObservers()
bool MayHaveDOMMutationObservers()
{
return mMayHaveDOMMutationObservers;
}

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

@ -515,7 +515,7 @@ bool nsWebMReader::DecodeAudioPacket(nestegg_packet* aPacket, PRInt64 aOffset)
if (!time.valid()) {
NS_WARNING("Int overflow adding total_duration and tstamp_usecs");
nestegg_free_packet(aPacket);
return PR_FALSE;
return false;
};
total_frames += frames;

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

@ -131,7 +131,7 @@ DOMRequest::FireEvent(const nsAString& aType)
return;
}
rv = event->SetTrusted(PR_TRUE);
rv = event->SetTrusted(true);
if (NS_FAILED(rv)) {
return;
}

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

@ -10740,7 +10740,7 @@ nsDOMConstructorSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx
// NewResolve hooks.
JSBool found;
if (!JS_HasPropertyById(cx, nativePropsObj, id, &found)) {
*_retval = PR_FALSE;
*_retval = false;
return NS_OK;
}

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

@ -3575,8 +3575,8 @@ SetMemoryMaxPrefChangedCallback(const char* aPrefName, void* aClosure)
static int
SetMemoryGCModePrefChangedCallback(const char* aPrefName, void* aClosure)
{
PRBool enableCompartmentGC = Preferences::GetBool("javascript.options.mem.gc_per_compartment");
PRBool enableIncrementalGC = Preferences::GetBool("javascript.options.mem.gc_incremental");
bool enableCompartmentGC = Preferences::GetBool("javascript.options.mem.gc_per_compartment");
bool enableIncrementalGC = Preferences::GetBool("javascript.options.mem.gc_incremental");
JSGCMode mode;
if (enableIncrementalGC) {
mode = JSGC_MODE_INCREMENTAL;

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

@ -138,7 +138,7 @@ Connection::DispatchTrustedEventToSelf(const nsAString& aEventName)
nsresult rv = event->InitEvent(aEventName, false, false);
NS_ENSURE_SUCCESS(rv, rv);
rv = event->SetTrusted(PR_TRUE);
rv = event->SetTrusted(true);
NS_ENSURE_SUCCESS(rv, rv);
bool dummy;

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

@ -114,7 +114,7 @@ SmsRequestManager::DispatchTrustedEventToRequest(const nsAString& aEventName,
nsresult rv = event->InitEvent(aEventName, false, false);
NS_ENSURE_SUCCESS(rv, rv);
rv = event->SetTrusted(PR_TRUE);
rv = event->SetTrusted(true);
NS_ENSURE_SUCCESS(rv, rv);
bool dummy;

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

@ -694,7 +694,7 @@ public:
return (mFlags & nsIPlaintextEditor::eEditorDontEchoPassword) != 0;
}
PRBool ShouldSkipSpellCheck() const
bool ShouldSkipSpellCheck() const
{
return (mFlags & nsIPlaintextEditor::eEditorSkipSpellCheck) != 0;
}

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

@ -569,7 +569,7 @@ gfxUserFontSet::LoadNext(gfxProxyFontEntry *aProxyEntry)
} else {
// otherwise load font async
rv = StartLoad(aProxyEntry, &currSrc);
PRBool loadOK = NS_SUCCEEDED(rv);
bool loadOK = NS_SUCCEEDED(rv);
if (loadOK) {
#ifdef PR_LOGGING

10
netwerk/cache/nsCacheEntryDescriptor.cpp поставляемый
Просмотреть файл

@ -736,7 +736,7 @@ nsDecompressInputStreamWrapper::InitZstream()
if (inflateInit(&mZstream) != Z_OK) {
return NS_ERROR_FAILURE;
}
mStreamInitialized = PR_TRUE;
mStreamInitialized = true;
return NS_OK;
}
@ -745,7 +745,7 @@ nsDecompressInputStreamWrapper::EndZstream()
{
if (mStreamInitialized && !mStreamEnded) {
inflateEnd(&mZstream);
mStreamEnded = PR_TRUE;
mStreamEnded = true;
}
return NS_OK;
}
@ -916,7 +916,7 @@ nsCompressOutputStreamWrapper::Write(const char * buf,
zerr = deflate(&mZstream, Z_NO_FLUSH);
if (zerr == Z_STREAM_ERROR) {
deflateEnd(&mZstream);
mStreamInitialized = PR_FALSE;
mStreamInitialized = false;
return NS_ERROR_FAILURE;
}
// Note: Z_BUF_ERROR is non-fatal and sometimes expected here.
@ -927,7 +927,7 @@ nsCompressOutputStreamWrapper::Write(const char * buf,
rv = WriteBuffer();
if (NS_FAILED(rv)) {
deflateEnd(&mZstream);
mStreamInitialized = PR_FALSE;
mStreamInitialized = false;
return rv;
}
}
@ -997,7 +997,7 @@ nsCompressOutputStreamWrapper::InitZstream()
mZstream.next_in = Z_NULL;
mZstream.avail_in = 0;
mStreamInitialized = PR_TRUE;
mStreamInitialized = true;
return NS_OK;
}

12
netwerk/cache/nsCacheEntryDescriptor.h поставляемый
Просмотреть файл

@ -137,8 +137,8 @@ private:
unsigned char* mReadBuffer;
PRUint32 mReadBufferLen;
z_stream mZstream;
PRBool mStreamInitialized;
PRBool mStreamEnded;
bool mStreamInitialized;
bool mStreamEnded;
public:
NS_DECL_ISUPPORTS
@ -147,8 +147,8 @@ private:
: nsInputStreamWrapper(desc, off)
, mReadBuffer(0)
, mReadBufferLen(0)
, mStreamInitialized(PR_FALSE)
, mStreamEnded(PR_FALSE)
, mStreamInitialized(false)
, mStreamEnded(false)
{
}
virtual ~nsDecompressInputStreamWrapper()
@ -209,7 +209,7 @@ private:
unsigned char* mWriteBuffer;
PRUint32 mWriteBufferLen;
z_stream mZstream;
PRBool mStreamInitialized;
bool mStreamInitialized;
PRUint32 mUncompressedCount;
public:
NS_DECL_ISUPPORTS
@ -219,7 +219,7 @@ private:
: nsOutputStreamWrapper(desc, off)
, mWriteBuffer(0)
, mWriteBufferLen(0)
, mStreamInitialized(PR_FALSE)
, mStreamInitialized(false)
, mUncompressedCount(0)
{
}

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

@ -981,7 +981,7 @@ nsresult
nsFtpState::S_cwd() {
// Don't cache the connection if PWD command failed
if (mPwd.IsEmpty())
mCacheConnection = PR_FALSE;
mCacheConnection = false;
nsCAutoString cwdStr;
if (mAction != PUT)

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

@ -164,7 +164,7 @@ NS_IMETHODIMP nsFileResult::GetMatchCount(PRUint32 *aMatchCount)
NS_IMETHODIMP nsFileResult::GetTypeAheadResult(bool *aTypeAheadResult)
{
NS_ENSURE_ARG_POINTER(aTypeAheadResult);
*aTypeAheadResult = PR_FALSE;
*aTypeAheadResult = false;
return NS_OK;
}

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

@ -844,7 +844,7 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(input);
if (isPwmgrInput || (formControl &&
formControl->IsSingleLineTextControl(PR_TRUE) &&
formControl->IsSingleLineTextControl(true) &&
(hasList || autocomplete) && !isReadOnly)) {
StartControllingInput(input);
}

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

@ -54,7 +54,7 @@ extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, 4)
#else
#define LOG(args)
#define LOG_ENABLED() (PR_FALSE)
#define LOG_ENABLED() (false)
#endif
namespace mozilla {
@ -210,7 +210,7 @@ Classifier::Reset()
rv = entries->GetNext(getter_AddRefs(file));
NS_ENSURE_SUCCESS(rv, rv);
rv = file->Remove(PR_FALSE);
rv = file->Remove(false);
NS_ENSURE_SUCCESS(rv, rv);
}
NS_ENSURE_SUCCESS(rv, rv);

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

@ -95,7 +95,7 @@ extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, 4)
#else
#define LOG(args)
#define LOG_ENABLED() (PR_FALSE)
#define LOG_ENABLED() (false)
#endif
namespace mozilla {
@ -162,7 +162,7 @@ HashStore::Reset()
rv = storeFile->AppendNative(mTableName + NS_LITERAL_CSTRING(".sbstore"));
NS_ENSURE_SUCCESS(rv, rv);
rv = storeFile->Remove(PR_FALSE);
rv = storeFile->Remove(false);
NS_ENSURE_SUCCESS(rv, rv);
Clear();
@ -384,7 +384,7 @@ HashStore::CalculateChecksum(nsCAutoString& aChecksum, bool aChecksumPresent)
}
NS_ENSURE_SUCCESS(rv, rv);
rv = hash->Finish(PR_FALSE, aChecksum);
rv = hash->Finish(false, aChecksum);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;

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

@ -55,7 +55,7 @@ extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, 4)
#else
#define LOG(args)
#define LOG_ENABLED() (PR_FALSE)
#define LOG_ENABLED() (false)
#endif
namespace mozilla {
@ -186,7 +186,7 @@ ProtocolParser::FinishHMAC()
}
nsCAutoString clientMAC;
mHMAC->Finish(PR_TRUE, clientMAC);
mHMAC->Finish(true, clientMAC);
if (clientMAC != mServerMAC) {
NS_WARNING("Invalid update MAC!");

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

@ -1103,7 +1103,7 @@ nsXREDirProvider::GetUserDataDirectoryHome(nsILocalFile** aFile, bool aLocal)
rv = NS_NewNativeLocalFile(nsDependentCString(appDir), true, getter_AddRefs(localDir));
}
#elif defined(MOZ_WIDGET_GONK)
rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), PR_TRUE,
rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true,
getter_AddRefs(localDir));
#elif defined(XP_UNIX)
const char* homeDir = getenv("HOME");

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

@ -1316,7 +1316,7 @@ namespace mozilla {
return NS_OK;
AndroidBridge::Bridge()->FireAndWaitForTracerEvent();
mHasRun = PR_TRUE;
mHasRun = true;
mTracerCondVar->Notify();
return NS_OK;
}
@ -1325,7 +1325,7 @@ namespace mozilla {
if (!mTracerLock || !mTracerCondVar)
return false;
MutexAutoLock lock(*mTracerLock);
mHasRun = PR_FALSE;
mHasRun = false;
mMainThread->Dispatch(this, NS_DISPATCH_NORMAL);
while (!mHasRun)
mTracerCondVar->Wait();
@ -1334,13 +1334,13 @@ namespace mozilla {
void Signal() {
MutexAutoLock lock(*mTracerLock);
mHasRun = PR_TRUE;
mHasRun = true;
mTracerCondVar->Notify();
}
private:
Mutex* mTracerLock;
CondVar* mTracerCondVar;
PRBool mHasRun;
bool mHasRun;
nsCOMPtr<nsIThread> mMainThread;
};

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

@ -390,7 +390,7 @@ AndroidGeckoEvent::ReadCharactersExtraField(JNIEnv *jenv)
{
jstring s = (jstring) jenv->GetObjectField(wrapped_obj, jCharactersExtraField);
if (!s) {
mCharactersExtra.SetIsVoid(PR_TRUE);
mCharactersExtra.SetIsVoid(true);
return;
}

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

@ -1445,21 +1445,21 @@ bool nsWindow::OnMultitouchEvent(AndroidGeckoEvent *ae)
switch (ae->Action() & AndroidMotionEvent::ACTION_MASK) {
case AndroidMotionEvent::ACTION_DOWN:
case AndroidMotionEvent::ACTION_POINTER_DOWN: {
nsTouchEvent event(PR_TRUE, NS_TOUCH_START, this);
nsTouchEvent event(true, NS_TOUCH_START, this);
return DispatchMultitouchEvent(event, ae);
}
case AndroidMotionEvent::ACTION_MOVE: {
nsTouchEvent event(PR_TRUE, NS_TOUCH_MOVE, this);
nsTouchEvent event(true, NS_TOUCH_MOVE, this);
return DispatchMultitouchEvent(event, ae);
}
case AndroidMotionEvent::ACTION_UP:
case AndroidMotionEvent::ACTION_POINTER_UP: {
nsTouchEvent event(PR_TRUE, NS_TOUCH_END, this);
nsTouchEvent event(true, NS_TOUCH_END, this);
return DispatchMultitouchEvent(event, ae);
}
case AndroidMotionEvent::ACTION_OUTSIDE:
case AndroidMotionEvent::ACTION_CANCEL: {
nsTouchEvent event(PR_TRUE, NS_TOUCH_CANCEL, this);
nsTouchEvent event(true, NS_TOUCH_CANCEL, this);
return DispatchMultitouchEvent(event, ae);
}
}
@ -1610,10 +1610,10 @@ nsWindow::DispatchMotionEvent(nsInputEvent &event, AndroidGeckoEvent *ae,
{
nsIntPoint offset = WidgetToScreenOffset();
event.isShift = PR_FALSE;
event.isControl = PR_FALSE;
event.isMeta = PR_FALSE;
event.isAlt = PR_FALSE;
event.isShift = false;
event.isControl = false;
event.isMeta = false;
event.isAlt = false;
event.time = ae->Time();
// XXX possibly bound the range of event.refPoint here.

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

@ -814,7 +814,7 @@ KeymapWrapper::GetKeyLevel(GdkEventKey *aGdkKeyEvent)
return level;
}
/* static */ PRBool
/* static */ bool
KeymapWrapper::IsBasicLatinLetterOrNumeral(PRUint32 aCharCode)
{
return (aCharCode >= 'a' && aCharCode <= 'z') ||
@ -871,7 +871,7 @@ KeymapWrapper::InitKeypressEvent(nsKeyEvent& aKeyEvent,
// unshifted charcode of current keyboard layout.
altCharCodes.mUnshiftedCharCode =
GetCharCodeFor(aGdkKeyEvent, baseState, aGdkKeyEvent->group);
PRBool isLatin = (altCharCodes.mUnshiftedCharCode <= 0xFF);
bool isLatin = (altCharCodes.mUnshiftedCharCode <= 0xFF);
// shifted charcode of current keyboard layout.
altCharCodes.mShiftedCharCode =
GetCharCodeFor(aGdkKeyEvent,
@ -882,7 +882,7 @@ KeymapWrapper::InitKeypressEvent(nsKeyEvent& aKeyEvent,
aKeyEvent.alternativeCharCodes.AppendElement(altCharCodes);
}
PRBool needLatinKeyCodes = !isLatin;
bool needLatinKeyCodes = !isLatin;
if (!needLatinKeyCodes) {
needLatinKeyCodes =
(IS_ASCII_ALPHABETICAL(altCharCodes.mUnshiftedCharCode) !=

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

@ -274,7 +274,7 @@ protected:
* @return TRUE if aCharCode is an alphabet or a numeric
* in ASCII range. Otherwise, FALSE.
*/
static PRBool IsBasicLatinLetterOrNumeral(PRUint32 aCharCode);
static bool IsBasicLatinLetterOrNumeral(PRUint32 aCharCode);
/**
* InitKeypressEvent() intializes keyCode, charCode and

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

@ -106,7 +106,7 @@ struct ScopedCanberraFile {
~ScopedCanberraFile() {
if (mFile) {
mFile->Remove(PR_FALSE);
mFile->Remove(false);
}
}
@ -188,7 +188,7 @@ ca_finish_cb(ca_context *c,
{
nsILocalFile *file = reinterpret_cast<nsILocalFile *>(userdata);
if (file) {
file->Remove(PR_FALSE);
file->Remove(false);
NS_RELEASE(file);
}
}

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

@ -299,7 +299,7 @@ CreateDIBSectionHook(HDC aDC,
// a small amount of memory.
// If aSection is non-null, CreateDIBSection won't allocate any new memory.
PRBool doCheck = PR_FALSE;
bool doCheck = false;
if (!aSection && aBitmapInfo) {
PRUint16 bitCount = aBitmapInfo->bmiHeader.biBitCount;
if (bitCount == 0) {
@ -321,7 +321,7 @@ CreateDIBSectionHook(HDC aDC,
// the allocation.
if (size > 1024 * 1024 * 8) {
LOG3("CreateDIBSectionHook: Large allocation (size=", size, ")");
doCheck = PR_TRUE;
doCheck = true;
}
}

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

@ -100,7 +100,7 @@ PrefChanged(const char*, void*)
#ifdef REPORT_CHROME_HANGS
// Monitor chrome hangs on the profiling branch if Telemetry enabled
if (newval == 0) {
PRBool telemetryEnabled = Preferences::GetBool(kTelemetryPrefName);
bool telemetryEnabled = Preferences::GetBool(kTelemetryPrefName);
if (telemetryEnabled) {
newval = DEFAULT_CHROME_HANG_INTERVAL;
}

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

@ -100,8 +100,8 @@ TimerObserverRunnable::Run()
nsCOMPtr<nsIObserverService> observerService =
mozilla::services::GetObserverService();
if (observerService) {
observerService->AddObserver(mObserver, "sleep_notification", PR_FALSE);
observerService->AddObserver(mObserver, "wake_notification", PR_FALSE);
observerService->AddObserver(mObserver, "sleep_notification", false);
observerService->AddObserver(mObserver, "wake_notification", false);
}
return NS_OK;
}