Skip to content

Commit

Permalink
Bug 1381253 - Remove redundant control flow declarations rs=ehsan
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: FFxP4aMCbOL
  • Loading branch information
sylvestre committed Jul 15, 2017
1 parent 84d2527 commit ada1edb
Show file tree
Hide file tree
Showing 101 changed files with 1 addition and 176 deletions.
3 changes: 0 additions & 3 deletions dom/base/CustomElementRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ CustomElementRegistry::RegisterUnresolvedElement(Element* aElement, nsIAtom* aTy
nsWeakPtr* elem = unresolved->AppendElement();
*elem = do_GetWeakReference(aElement);
aElement->AddStates(NS_EVENT_STATE_UNRESOLVED);

return;
}

void
Expand Down Expand Up @@ -773,7 +771,6 @@ CustomElementRegistry::Get(JSContext* aCx, const nsAString& aName,
}

aRetVal.setObject(*data->mConstructor);
return;
}

already_AddRefed<Promise>
Expand Down
2 changes: 0 additions & 2 deletions dom/base/DOMException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ NSResultToNameAndMessage(nsresult aNSResult,
}

NS_WARNING("Huh, someone is throwing non-DOM errors using the DOM module!");

return;
}

nsresult
Expand Down
1 change: 0 additions & 1 deletion dom/base/DocumentFragment.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ class DocumentFragment : public FragmentOrElement,
virtual void UnbindFromTree(bool aDeep, bool aNullParent) override
{
NS_ASSERTION(false, "Trying to unbind a fragment from a tree");
return;
}

virtual Element* GetNameSpaceElement() override
Expand Down
5 changes: 0 additions & 5 deletions dom/base/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,6 @@ Element::SetAttribute(const nsAString& aName,

aError = SetAttr(name->NamespaceID(), name->LocalName(), name->GetPrefix(),
aValue, true);
return;
}

void
Expand Down Expand Up @@ -2726,8 +2725,6 @@ Element::PreIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
return;
}
RemoveFromIdTable();

return;
}

void
Expand All @@ -2746,8 +2743,6 @@ Element::PostIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
} else {
ClearHasID();
}

return;
}

EventListenerManager*
Expand Down
1 change: 0 additions & 1 deletion dom/base/nsAttrValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,6 @@ nsAttrValue::ParseAtomArray(const nsAString& aValue)
}

SetMiscAtomOrString(&aValue);
return;
}

void
Expand Down
1 change: 0 additions & 1 deletion dom/base/nsGlobalWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4900,7 +4900,6 @@ nsGlobalWindow::GetContentOuter(JSContext* aCx,
}

aRetval.set(nullptr);
return;
}

void
Expand Down
1 change: 0 additions & 1 deletion dom/canvas/WebGL2ContextQueries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ WebGLContext::GetQuery(JSContext* cx, GLenum target, GLenum pname,
}

ErrorInvalidEnum("%s: Bad pname.", funcName);
return;
}

void
Expand Down
1 change: 0 additions & 1 deletion dom/canvas/WebGLTexelConversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ class WebGLImageConverter
}

mSuccess = true;
return;
}

template<WebGLTexelFormat SrcFormat,
Expand Down
2 changes: 0 additions & 2 deletions dom/html/HTMLFieldSetElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ HTMLFieldSetElement::UpdateValidity(bool aElementValidity)
if (mFieldSet) {
mFieldSet->UpdateValidity(aElementValidity);
}

return;
}

EventStates
Expand Down
1 change: 0 additions & 1 deletion dom/html/HTMLInputElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3418,7 +3418,6 @@ HTMLInputElement::Focus(ErrorResult& aError)
}
}

return;
}

#if !defined(ANDROID) && !defined(XP_MACOSX)
Expand Down
2 changes: 0 additions & 2 deletions dom/html/HTMLLinkElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,6 @@ HTMLLinkElement::GetStyleSheetInfo(nsAString& aTitle,
// If we get here we assume that we're loading a css file, so set the
// type to 'text/css'
aType.AssignLiteral("text/css");

return;
}

CORSMode
Expand Down
3 changes: 0 additions & 3 deletions dom/html/nsHTMLDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,8 @@ nsHTMLDocument::TryHintCharset(nsIContentViewer* aCv,
aCharsetSource = requestCharsetSource;
aEncoding = WrapNotNull(requestCharset);
}
return;
}
}
return;
}


Expand Down Expand Up @@ -836,7 +834,6 @@ nsHTMLDocument::StopDocumentLoad()

nsDocument::StopDocumentLoad();
UnblockOnload(false);
return;
}

void
Expand Down
2 changes: 0 additions & 2 deletions dom/jsurl/nsJSProtocolHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,6 @@ nsJSChannel::EvaluateScript()
} else if (mIsAsync) {
NotifyListener();
}

return;
}

void
Expand Down
1 change: 0 additions & 1 deletion dom/media/MediaFormatReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2533,7 +2533,6 @@ MediaFormatReader::SkipVideoDemuxToNextKeyFrame(TimeUnit aTimeThreshold)
&MediaFormatReader::OnVideoSkipCompleted,
&MediaFormatReader::OnVideoSkipFailed)
->Track(mSkipRequest);
return;
}

void
Expand Down
2 changes: 0 additions & 2 deletions dom/media/MediaRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,9 +1418,7 @@ MediaRecorder::NotifyError(nsresult aRv)
rv = DispatchDOMEvent(nullptr, event, nullptr, nullptr);
if (NS_FAILED(rv)) {
NS_ERROR("Failed to dispatch the error event!!!");
return;
}
return;
}

void
Expand Down
1 change: 0 additions & 1 deletion dom/media/gmp-plugin/gmp-test-output-protection.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ TestOuputProtectionAPIs()
{
RunOutputProtectionAPITests();
FakeDecryptor::Message("OP tests completed");
return;
}

} // namespace gmptest
Expand Down
1 change: 0 additions & 1 deletion dom/media/mediasource/TrackBuffersManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,6 @@ TrackBuffersManager::CreateDemuxerforMIMEType()
}
#endif
NS_WARNING("Not supported (yet)");
return;
}

// We reset the demuxer by creating a new one and initializing it.
Expand Down
2 changes: 0 additions & 2 deletions dom/media/webaudio/ScriptProcessorNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,12 @@ class ScriptProcessorNode final : public AudioNode
if (aChannelCount != ChannelCount()) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
}
return;
}
void SetChannelCountModeValue(ChannelCountMode aMode, ErrorResult& aRv) override
{
if (aMode != ChannelCountMode::Explicit) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
}
return;
}

uint32_t BufferSize() const
Expand Down
7 changes: 0 additions & 7 deletions dom/media/webrtc/MediaEngineDefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ void
MediaEngineDefaultVideoSource::GetName(nsAString& aName) const
{
aName.AssignLiteral(u"Default Video Device");
return;
}

void
MediaEngineDefaultVideoSource::GetUUID(nsACString& aUUID) const
{
aUUID.AssignLiteral("1041FCBD-3F12-4F7B-9E9B-1EC556DD5676");
return;
}

uint32_t
Expand Down Expand Up @@ -382,14 +380,12 @@ void
MediaEngineDefaultAudioSource::GetName(nsAString& aName) const
{
aName.AssignLiteral(u"Default Audio Device");
return;
}

void
MediaEngineDefaultAudioSource::GetUUID(nsACString& aUUID) const
{
aUUID.AssignLiteral("B7CBD7C1-53EF-42F9-8353-73F61C70C092");
return;
}

uint32_t
Expand Down Expand Up @@ -533,8 +529,6 @@ MediaEngineDefault::EnumerateVideoDevices(dom::MediaSourceEnum aMediaSource,
RefPtr<MediaEngineVideoSource> newSource = new MediaEngineDefaultVideoSource();
mVSources.AppendElement(newSource);
aVSources->AppendElement(newSource);

return;
}

void
Expand All @@ -559,7 +553,6 @@ MediaEngineDefault::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
mASources.AppendElement(newSource);
aASources->AppendElement(newSource);
}
return;
}

} // namespace mozilla
3 changes: 0 additions & 3 deletions dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ MediaEngineRemoteVideoSource::Init()
SetUUID(uniqueId);

mInitDone = true;

return;
}

void
Expand Down Expand Up @@ -99,7 +97,6 @@ MediaEngineRemoteVideoSource::Shutdown()

MOZ_ASSERT(mState == kReleased);
mInitDone = false;
return;
}

nsresult
Expand Down
3 changes: 0 additions & 3 deletions dom/media/webrtc/MediaEngineWebRTCAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,12 @@ void
MediaEngineWebRTCMicrophoneSource::GetName(nsAString& aName) const
{
aName.Assign(mDeviceName);
return;
}

void
MediaEngineWebRTCMicrophoneSource::GetUUID(nsACString& aUUID) const
{
aUUID.Assign(mDeviceUUID);
return;
}

// GetBestFitnessDistance returns the best distance the capture device can offer
Expand Down Expand Up @@ -942,7 +940,6 @@ MediaEngineWebRTCMicrophoneSource::Process(int channel,

uint32_t channels = isStereo ? 2 : 1;
InsertInGraph<int16_t>(audio10ms, length, channels);
return;
}

void
Expand Down
3 changes: 0 additions & 3 deletions dom/media/webspeech/recognition/SpeechGrammar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ void
SpeechGrammar::GetSrc(nsString& aRetVal, ErrorResult& aRv) const
{
aRetVal = mSrc;
return;
}

void
SpeechGrammar::SetSrc(const nsAString& aArg, ErrorResult& aRv)
{
mSrc = aArg;
return;
}

float
Expand All @@ -74,7 +72,6 @@ void
SpeechGrammar::SetWeight(float aArg, ErrorResult& aRv)
{
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return;
}

} // namespace dom
Expand Down
2 changes: 0 additions & 2 deletions dom/media/webspeech/recognition/SpeechGrammarList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ SpeechGrammarList::AddFromURI(const nsAString& aSrc,
ErrorResult& aRv)
{
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return;
}

void
Expand All @@ -82,7 +81,6 @@ SpeechGrammarList::AddFromString(const nsAString& aString,
SpeechGrammar* speechGrammar = new SpeechGrammar(mParent);
speechGrammar->SetSrc(aString, aRv);
mItems.AppendElement(speechGrammar);
return;
}

already_AddRefed<SpeechGrammar>
Expand Down
Loading

0 comments on commit ada1edb

Please sign in to comment.