Bug 824397 - Use NS_ENSURE_{TRUE,FALSE,SUCCESS}_VOID(foo) instead of NS_ENSURE_{TRUE,FALSE,SUCCESS}(foo, ). r=derf.

This commit is contained in:
Nicholas Nethercote 2012-12-23 20:45:57 -08:00
parent b0c7421ff1
commit 4a4db06c69
22 changed files with 71 additions and 70 deletions

View File

@ -1426,7 +1426,7 @@ nsTextEditorState::UnbindFromFrame(nsTextControlFrame* aFrame)
// If it was, however, it should be unbounded from the same frame.
NS_ASSERTION(!aFrame || aFrame == mBoundFrame, "Unbinding from the wrong frame");
NS_ENSURE_TRUE(!aFrame || aFrame == mBoundFrame, );
NS_ENSURE_TRUE_VOID(!aFrame || aFrame == mBoundFrame);
// We need to start storing the value outside of the editor if we're not
// going to use it anymore, so retrieve it for now.

View File

@ -974,7 +974,7 @@ void MediaDecoder::NotifyPrincipalChanged()
void MediaDecoder::NotifyBytesConsumed(int64_t aBytes)
{
NS_ENSURE_TRUE(mDecoderStateMachine, );
NS_ENSURE_TRUE_VOID(mDecoderStateMachine);
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
MOZ_ASSERT(OnStateMachineThread() || mDecoderStateMachine->OnDecodeThread());
if (!mIgnoreProgressData) {
@ -1206,7 +1206,7 @@ void MediaDecoder::SetDuration(double aDuration)
void MediaDecoder::SetMediaDuration(int64_t aDuration)
{
NS_ENSURE_TRUE(GetStateMachine(), );
NS_ENSURE_TRUE_VOID(GetStateMachine());
GetStateMachine()->SetDuration(aDuration);
}
@ -1274,7 +1274,7 @@ void MediaDecoder::SetFragmentEndTime(double aTime)
void MediaDecoder::SetMediaEndTime(int64_t aTime)
{
NS_ENSURE_TRUE(GetStateMachine(), );
NS_ENSURE_TRUE_VOID(GetStateMachine());
GetStateMachine()->SetMediaEndTime(aTime);
}

View File

@ -235,7 +235,7 @@ DASHDecoder::NotifyDownloadEnded(nsresult aStatus)
// Create reader thread for |ChannelMediaResource|::|Read|.
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethod(this, &DASHDecoder::ReadMPDBuffer);
NS_ENSURE_TRUE(event, );
NS_ENSURE_TRUE_VOID(event);
nsresult rv = NS_NewNamedThread("DASH MPD Reader",
getter_AddRefs(mMPDReaderThread),
@ -792,12 +792,12 @@ DASHDecoder::Shutdown()
// Call parent class shutdown.
MediaDecoder::Shutdown();
NS_ENSURE_TRUE(mShuttingDown, );
NS_ENSURE_TRUE_VOID(mShuttingDown);
// Shutdown reader thread if not already done.
if (mMPDReaderThread) {
nsresult rv = mMPDReaderThread->Shutdown();
NS_ENSURE_SUCCESS(rv, );
NS_ENSURE_SUCCESS_VOID(rv);
mMPDReaderThread = nullptr;
}

View File

@ -97,7 +97,7 @@ void
DASHReader::AddAudioReader(DASHRepReader* aAudioReader)
{
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
NS_ENSURE_TRUE(aAudioReader, );
NS_ENSURE_TRUE_VOID(aAudioReader);
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
@ -111,7 +111,7 @@ void
DASHReader::AddVideoReader(DASHRepReader* aVideoReader)
{
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
NS_ENSURE_TRUE(aVideoReader, );
NS_ENSURE_TRUE_VOID(aVideoReader);
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
@ -504,8 +504,8 @@ DASHReader::PossiblySwitchVideoReaders()
}
// Only switch if we reached a switch access point.
NS_ENSURE_TRUE(0 <= mSwitchCount, );
NS_ENSURE_TRUE((uint32_t)mSwitchCount < mSwitchToVideoSubsegmentIndexes.Length(), );
NS_ENSURE_TRUE_VOID(0 <= mSwitchCount);
NS_ENSURE_TRUE_VOID((uint32_t)mSwitchCount < mSwitchToVideoSubsegmentIndexes.Length());
uint32_t switchIdx = mSwitchToVideoSubsegmentIndexes[mSwitchCount];
if (!mVideoReader->HasReachedSubsegment(switchIdx)) {
return;
@ -514,12 +514,12 @@ DASHReader::PossiblySwitchVideoReaders()
// Get Representation index to switch to.
DASHDecoder* dashDecoder = static_cast<DASHDecoder*>(mDecoder);
int32_t toReaderIdx = dashDecoder->GetRepIdxForVideoSubsegmentLoad(switchIdx);
NS_ENSURE_TRUE(0 <= toReaderIdx, );
NS_ENSURE_TRUE((uint32_t)toReaderIdx < mVideoReaders.Length(), );
NS_ENSURE_TRUE_VOID(0 <= toReaderIdx);
NS_ENSURE_TRUE_VOID((uint32_t)toReaderIdx < mVideoReaders.Length());
DASHRepReader* fromReader = mVideoReader;
DASHRepReader* toReader = mVideoReaders[toReaderIdx];
NS_ENSURE_TRUE(fromReader != toReader, );
NS_ENSURE_TRUE_VOID(fromReader != toReader);
LOG("Switching video readers now from [%p] to [%p] at subsegment [%d]: "
"mSwitchCount [%d].",
@ -538,8 +538,8 @@ DASHReader::PossiblySwitchVideoReaders()
fromReader = toReader;
toReaderIdx = dashDecoder->GetRepIdxForVideoSubsegmentLoad(switchIdx);
toReader = mVideoReaders[toReaderIdx];
NS_ENSURE_TRUE((uint32_t)toReaderIdx < mVideoReaders.Length(), );
NS_ENSURE_TRUE(fromReader != toReader, );
NS_ENSURE_TRUE_VOID((uint32_t)toReaderIdx < mVideoReaders.Length());
NS_ENSURE_TRUE_VOID(fromReader != toReader);
// Tell the SWITCH FROM reader when it should stop reading.
fromReader->RequestSwitchAtSubsegment(switchIdx, toReader);

View File

@ -178,7 +178,7 @@ public:
mDecoderStateMachine = nullptr;
// Call parent class shutdown.
MediaDecoder::Shutdown();
NS_ENSURE_TRUE(mShuttingDown, );
NS_ENSURE_TRUE_VOID(mShuttingDown);
// Cleanup ref to main decoder.
mMainDecoder = nullptr;
}

View File

@ -1030,10 +1030,10 @@ WebMReader::RequestSwitchAtSubsegment(int32_t aSubsegmentIdx,
if (mSwitchingCluster != -1) {
return;
}
NS_ENSURE_TRUE((uint32_t)aSubsegmentIdx < mClusterByteRanges.Length(), );
NS_ENSURE_TRUE_VOID((uint32_t)aSubsegmentIdx < mClusterByteRanges.Length());
mSwitchingCluster = aSubsegmentIdx;
NS_ENSURE_TRUE(aNextReader, );
NS_ENSURE_TRUE(aNextReader != this, );
NS_ENSURE_TRUE_VOID(aNextReader);
NS_ENSURE_TRUE_VOID(aNextReader != this);
mNextReader = static_cast<WebMReader*>(aNextReader);
}
@ -1053,7 +1053,7 @@ WebMReader::RequestSeekToSubsegment(uint32_t aIdx)
if (mSeekToCluster != -1) {
return;
}
NS_ENSURE_TRUE(aIdx < mClusterByteRanges.Length(), );
NS_ENSURE_TRUE_VOID(aIdx < mClusterByteRanges.Length());
mSeekToCluster = aIdx;
// XXX Hack to get the resource to seek to the correct offset if the decode
@ -1080,12 +1080,12 @@ WebMReader::SeekToCluster(uint32_t aIdx)
{
NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
NS_ASSERTION(0 <= mSeekToCluster, "mSeekToCluster should be set.");
NS_ENSURE_TRUE(aIdx < mClusterByteRanges.Length(), );
NS_ENSURE_TRUE_VOID(aIdx < mClusterByteRanges.Length());
LOG(PR_LOG_DEBUG, ("Reader [%p] for Decoder [%p]: seeking to "
"subsegment [%lld] at offset [%lld]",
this, mDecoder, aIdx, mClusterByteRanges[aIdx].mStart));
int r = nestegg_offset_seek(mContext, mClusterByteRanges[aIdx].mStart);
NS_ENSURE_TRUE(r == 0, );
NS_ENSURE_TRUE_VOID(r == 0);
mSeekToCluster = -1;
}

View File

@ -65,7 +65,7 @@ WMFReader::OnDecodeThreadStart()
{
NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
HRESULT hr = CoInitializeEx(0, COINIT_MULTITHREADED);
NS_ENSURE_TRUE(SUCCEEDED(hr), );
NS_ENSURE_TRUE_VOID(SUCCEEDED(hr));
}
void

View File

@ -986,7 +986,7 @@ void nsCaret::DrawCaret(bool aInvalidate)
// Can we draw the caret now?
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell);
NS_ENSURE_TRUE(presShell, /**/);
NS_ENSURE_TRUE_VOID(presShell);
{
if (presShell->IsPaintingSuppressed())
{

View File

@ -637,7 +637,7 @@ nsObjectFrame::FixupWindow(const nsSize& aSize)
NPWindow *window;
mInstanceOwner->GetWindow(window);
NS_ENSURE_TRUE(window, /**/);
NS_ENSURE_TRUE_VOID(window);
#ifdef XP_MACOSX
nsWeakFrame weakFrame(this);

View File

@ -464,7 +464,7 @@ nsHTMLStyleSheet::UniqueMappedAttributes(nsMappedAttributes* aMapped)
void
nsHTMLStyleSheet::DropMappedAttributes(nsMappedAttributes* aMapped)
{
NS_ENSURE_TRUE(aMapped, /**/);
NS_ENSURE_TRUE_VOID(aMapped);
NS_ASSERTION(mMappedAttrTable.ops, "table uninitialized");
#ifdef DEBUG

View File

@ -572,7 +572,7 @@ PeerConnectionImpl::NotifyDataChannel(mozilla::DataChannel *aChannel)
nsCOMPtr<nsIDOMDataChannel> domchannel;
nsresult rv = NS_NewDOMDataChannel(aChannel, mWindow,
getter_AddRefs(domchannel));
NS_ENSURE_SUCCESS(rv,);
NS_ENSURE_SUCCESS_VOID(rv);
RUN_ON_THREAD(mThread,
WrapRunnableNM(NotifyDataChannel_m,

View File

@ -79,7 +79,7 @@ AdaptationSet::GetMIMEType(nsAString& aMIMEType) const
void
AdaptationSet::SetMIMEType(nsAString const &aMIMEType)
{
NS_ENSURE_FALSE(aMIMEType.IsEmpty(),);
NS_ENSURE_FALSE_VOID(aMIMEType.IsEmpty());
mMIMEType = aMIMEType;
}
@ -93,7 +93,7 @@ AdaptationSet::GetRepresentation(uint32_t aIndex) const
void
AdaptationSet::AddRepresentation(Representation* aRep)
{
NS_ENSURE_TRUE(aRep,);
NS_ENSURE_TRUE_VOID(aRep);
// Only add if it's not already in the array.
if (!mRepresentations.Contains(aRep)) {
mRepresentations.InsertElementSorted(aRep, CompareRepresentationBitrates());

View File

@ -50,7 +50,7 @@ namespace net {
void
MPD::AddPeriod(Period* aPeriod)
{
NS_ENSURE_TRUE(aPeriod,);
NS_ENSURE_TRUE_VOID(aPeriod);
// Only add |Period| if it's not in the array already.
if (!mPeriods.Contains(aPeriod)) {
mPeriods.AppendElement(aPeriod);
@ -73,7 +73,7 @@ MPD::GetNumPeriods() const
void
MPD::AddBaseUrl(nsAString const& aUrl)
{
NS_ENSURE_FALSE(aUrl.IsEmpty(),);
NS_ENSURE_FALSE_VOID(aUrl.IsEmpty());
// Only add |BaseUrl| string if it's not in the array already.
if (!mBaseUrls.Contains(aUrl)) {
mBaseUrls.AppendElement(aUrl);

View File

@ -57,7 +57,7 @@ Period::GetAdaptationSet(uint32_t aIndex) const
void
Period::AddAdaptationSet(AdaptationSet* aAdaptationSet)
{
NS_ENSURE_TRUE(aAdaptationSet,);
NS_ENSURE_TRUE_VOID(aAdaptationSet);
// Only add |AdaptationSet| ptr if it's not in the array already.
if (!mAdaptationSets.Contains(aAdaptationSet)) {
mAdaptationSets.AppendElement(aAdaptationSet);

View File

@ -85,7 +85,7 @@ Representation::GetHeight() const
void
Representation::AddBaseUrl(nsAString const& aUrl)
{
NS_ENSURE_FALSE(aUrl.IsEmpty(),);
NS_ENSURE_FALSE_VOID(aUrl.IsEmpty());
// Only add if it's not already in the array.
if (!mBaseUrls.Contains(aUrl)) {
mBaseUrls.AppendElement(aUrl);
@ -108,7 +108,7 @@ Representation::GetSegmentBase() const
void
Representation::SetSegmentBase(SegmentBase* aBase)
{
NS_ENSURE_TRUE(aBase,);
NS_ENSURE_TRUE_VOID(aBase);
// Don't reassign if the ptrs or contents are equal.
if (mSegmentBase != aBase
|| (mSegmentBase && (*mSegmentBase != *aBase))) {

View File

@ -49,8 +49,8 @@ namespace net {
void
SegmentBase::GetIndexRange(int64_t* aStartBytes, int64_t* aEndBytes) const
{
NS_ENSURE_TRUE(aStartBytes, );
NS_ENSURE_TRUE(aEndBytes, );
NS_ENSURE_TRUE_VOID(aStartBytes);
NS_ENSURE_TRUE_VOID(aEndBytes);
*aStartBytes = mIndexRangeStart;
*aEndBytes = mIndexRangeEnd;
}
@ -58,8 +58,8 @@ SegmentBase::GetIndexRange(int64_t* aStartBytes, int64_t* aEndBytes) const
void
SegmentBase::GetInitRange(int64_t* aStartBytes, int64_t* aEndBytes) const
{
NS_ENSURE_TRUE(aStartBytes, );
NS_ENSURE_TRUE(aEndBytes, );
NS_ENSURE_TRUE_VOID(aStartBytes);
NS_ENSURE_TRUE_VOID(aEndBytes);
*aStartBytes = mInitRangeStart;
*aEndBytes = mInitRangeEnd;
}
@ -81,7 +81,7 @@ SegmentBase::SetRange(nsAString const &aRangeStr,
int64_t &aStart,
int64_t &aEnd)
{
NS_ENSURE_TRUE(!aRangeStr.IsEmpty(), );
NS_ENSURE_TRUE_VOID(!aRangeStr.IsEmpty());
nsAString::const_iterator start, end, dashStart, dashEnd;
@ -94,11 +94,11 @@ SegmentBase::SetRange(nsAString const &aRangeStr,
nsAutoString temp(Substring(start, dashStart));
nsresult rv;
aStart = temp.ToInteger64(&rv);
NS_ENSURE_SUCCESS(rv, );
NS_ENSURE_SUCCESS_VOID(rv);
temp = Substring(dashEnd, end);
aEnd = temp.ToInteger64(&rv);
NS_ENSURE_SUCCESS(rv, );
NS_ENSURE_SUCCESS_VOID(rv);
}
}

View File

@ -136,29 +136,29 @@ nsDASHMPDParser::PrintDOMElement(nsIDOMElement* aElem, int32_t offset)
ss.Append(NS_LITERAL_STRING(" "));
// Tag name.
nsAutoString tagName;
NS_ENSURE_SUCCESS(aElem->GetTagName(tagName),);
NS_ENSURE_SUCCESS_VOID(aElem->GetTagName(tagName));
ss += NS_LITERAL_STRING("<");
ss += tagName;
// Attributes.
nsCOMPtr<nsIDOMNamedNodeMap> attributes;
NS_ENSURE_SUCCESS(aElem->GetAttributes(getter_AddRefs(attributes)),);
NS_ENSURE_SUCCESS_VOID(aElem->GetAttributes(getter_AddRefs(attributes)));
uint32_t count;
NS_ENSURE_SUCCESS(attributes->GetLength(&count),);
NS_ENSURE_SUCCESS_VOID(attributes->GetLength(&count));
for(uint32_t i = 0; i < count; i++)
{
ss += NS_LITERAL_STRING(" ");
nsCOMPtr<nsIDOMNode> node;
NS_ENSURE_SUCCESS(attributes->Item(i, getter_AddRefs(node)), );
NS_ENSURE_SUCCESS_VOID(attributes->Item(i, getter_AddRefs(node)));
nsAutoString nodeName;
NS_ENSURE_SUCCESS(node->GetNodeName(nodeName),);
NS_ENSURE_SUCCESS_VOID(node->GetNodeName(nodeName));
ss += nodeName;
nsAutoString nodeValue;
NS_ENSURE_SUCCESS(node->GetNodeValue(nodeValue),);
NS_ENSURE_SUCCESS_VOID(node->GetNodeValue(nodeValue));
if(!nodeValue.IsEmpty()) {
ss += NS_LITERAL_STRING("=");
ss += nodeValue;
@ -171,12 +171,12 @@ nsDASHMPDParser::PrintDOMElement(nsIDOMElement* aElem, int32_t offset)
// Print for each child.
nsCOMPtr<nsIDOMElement> child;
NS_ENSURE_SUCCESS(aElem->GetFirstElementChild(getter_AddRefs(child)),);
NS_ENSURE_SUCCESS_VOID(aElem->GetFirstElementChild(getter_AddRefs(child)));
while(child)
{
PrintDOMElement(child, offset);
NS_ENSURE_SUCCESS(child->GetNextElementSibling(getter_AddRefs(child)),);
NS_ENSURE_SUCCESS_VOID(child->GetNextElementSibling(getter_AddRefs(child)));
}
}
@ -184,10 +184,10 @@ nsDASHMPDParser::PrintDOMElement(nsIDOMElement* aElem, int32_t offset)
void
nsDASHMPDParser::PrintDOMElements(nsIDOMElement* aRoot)
{
NS_ENSURE_TRUE(aRoot, );
NS_ENSURE_TRUE_VOID(aRoot);
DASHMPDProfile profile;
NS_ENSURE_SUCCESS(GetProfile(aRoot, profile), );
NS_ENSURE_SUCCESS_VOID(GetProfile(aRoot, profile));
LOG("Profile Is %d",(int32_t)profile);
PrintDOMElement(aRoot, 0);
}

View File

@ -57,7 +57,7 @@ static PRLogModuleInfo* gnsDASHWebMODManagerLog = nullptr;
nsDASHWebMODManager::nsDASHWebMODManager(MPD* aMpd)
{
MOZ_COUNT_CTOR(nsDASHWebMODManager);
NS_ENSURE_TRUE(aMpd,);
NS_ENSURE_TRUE_VOID(aMpd);
mMpd = aMpd;
#if defined(PR_LOGGING)
if(!gnsDASHWebMODManagerLog)

View File

@ -346,7 +346,7 @@ DataChannelConnection::StartDefer()
if (!mTimerRunning) {
rv = mDeferredTimer->InitWithCallback(this, mDeferTimeout,
nsITimer::TYPE_ONE_SHOT);
NS_ENSURE_TRUE(rv == NS_OK, /* */);
NS_ENSURE_TRUE_VOID(rv == NS_OK);
mTimerRunning = true;
}
@ -1058,15 +1058,15 @@ DataChannelConnection::HandleOpenResponseMessage(const struct rtcweb_datachannel
streamOut = ntohs(rsp->reverse_stream);
channel = FindChannelByStreamOut(streamOut);
NS_ENSURE_TRUE(channel, /* */);
NS_ENSURE_TRUE(channel->mState == CONNECTING, /* */);
NS_ENSURE_TRUE_VOID(channel);
NS_ENSURE_TRUE_VOID(channel->mState == CONNECTING);
if (rsp->error) {
LOG(("%s: error in response to open of channel %d (%s)",
__FUNCTION__, streamOut, channel->mLabel.get()));
} else {
NS_ENSURE_TRUE(!FindChannelByStreamIn(streamIn), /* */);
NS_ENSURE_TRUE_VOID(!FindChannelByStreamIn(streamIn));
channel->mStreamIn = streamIn;
channel->mState = OPEN;
@ -1096,8 +1096,8 @@ DataChannelConnection::HandleOpenAckMessage(const struct rtcweb_datachannel_ack
channel = FindChannelByStreamIn(streamIn);
NS_ENSURE_TRUE(channel, /* */);
NS_ENSURE_TRUE(channel->mState == CONNECTING, /* */);
NS_ENSURE_TRUE_VOID(channel);
NS_ENSURE_TRUE_VOID(channel->mState == CONNECTING);
channel->mState = channel->mReady ? DataChannel::OPEN : DataChannel::WAITING_TO_OPEN;
if (channel->mState == OPEN) {
@ -1131,11 +1131,11 @@ DataChannelConnection::HandleDataMessage(uint32_t ppid,
channel = FindChannelByStreamIn(streamIn);
// XXX A closed channel may trip this... check
NS_ENSURE_TRUE(channel, /* */);
NS_ENSURE_TRUE(channel->mState != CONNECTING, /* */);
NS_ENSURE_TRUE_VOID(channel);
NS_ENSURE_TRUE_VOID(channel->mState != CONNECTING);
// XXX should this be a simple if, no warnings/debugbreaks?
NS_ENSURE_TRUE(channel->mState != CLOSED, /* */);
NS_ENSURE_TRUE_VOID(channel->mState != CLOSED);
{
nsAutoCString recvData(buffer, length);
@ -1211,19 +1211,19 @@ DataChannelConnection::HandleMessage(const void *buffer, size_t length, uint32_t
switch (ppid) {
case DATA_CHANNEL_PPID_CONTROL:
NS_ENSURE_TRUE(length >= sizeof(*ack), /* */); // Ack is the smallest
NS_ENSURE_TRUE_VOID(length >= sizeof(*ack)); // Ack is the smallest
msg = static_cast<const struct rtcweb_datachannel_ack *>(buffer);
switch (msg->msg_type) {
case DATA_CHANNEL_OPEN_REQUEST:
LOG(("length %u, sizeof(*req) = %u", length, sizeof(*req)));
NS_ENSURE_TRUE(length >= sizeof(*req), /* */);
NS_ENSURE_TRUE_VOID(length >= sizeof(*req));
req = static_cast<const struct rtcweb_datachannel_open_request *>(buffer);
HandleOpenRequestMessage(req, length, streamIn);
break;
case DATA_CHANNEL_OPEN_RESPONSE:
NS_ENSURE_TRUE(length >= sizeof(*rsp), /* */);
NS_ENSURE_TRUE_VOID(length >= sizeof(*rsp));
rsp = static_cast<const struct rtcweb_datachannel_open_response *>(buffer);
HandleOpenResponseMessage(rsp, length, streamIn);

View File

@ -1188,7 +1188,7 @@ void
KeymapWrapper::InitKeypressEvent(nsKeyEvent& aKeyEvent,
GdkEventKey* aGdkKeyEvent)
{
NS_ENSURE_TRUE(aKeyEvent.message == NS_KEY_PRESS, );
NS_ENSURE_TRUE_VOID(aKeyEvent.message == NS_KEY_PRESS);
aKeyEvent.charCode = GetCharCodeFor(aGdkKeyEvent);
if (!aKeyEvent.charCode) {

View File

@ -3251,7 +3251,8 @@ nsWindow::SetSoftwareKeyboardState(bool aOpen,
const InputContextAction& aAction)
{
if (aOpen) {
NS_ENSURE_TRUE(mInputContext.mIMEState.mEnabled != IMEState::DISABLED,);
NS_ENSURE_TRUE_VOID(mInputContext.mIMEState.mEnabled !=
IMEState::DISABLED);
// Ensure that opening the virtual keyboard is allowed for this specific
// InputContext depending on the content.ime.strict.policy pref

View File

@ -211,12 +211,12 @@ public:
void RemoveAnonTempFileFiles() {
nsCOMPtr<nsIFile> tmpDir;
nsresult rv = GetTempDir(getter_AddRefs(tmpDir));
NS_ENSURE_SUCCESS(rv,);
NS_ENSURE_SUCCESS_VOID(rv);
// Remove the directory recursively.
// Remove the directory recursively.
tmpDir->Remove(true);
}
private:
nsCOMPtr<nsITimer> mTimer;
};