Bug 1381253 - Remove redundant control flow declarations rs=ehsan
authorSylvestre Ledru <sledru@mozilla.com>
Sat, 15 Jul 2017 19:03:04 +0200
changeset 613537 d72854694b360ce5051f37256518c3b3a8e69237
parent 613536 0f982575910610a111df61783db775661f421d79
child 613538 2513f47a01eae7797edcea19ca09036cecce02c1
push id69815
push usermozilla@noorenberghe.ca
push dateSat, 22 Jul 2017 01:34:42 +0000
reviewersehsan
bugs1381253
milestone56.0a1
Bug 1381253 - Remove redundant control flow declarations rs=ehsan MozReview-Commit-ID: FFxP4aMCbOL
dom/base/CustomElementRegistry.cpp
dom/base/DOMException.cpp
dom/base/DocumentFragment.h
dom/base/Element.cpp
dom/base/nsAttrValue.cpp
dom/base/nsGlobalWindow.cpp
dom/canvas/WebGL2ContextQueries.cpp
dom/canvas/WebGLTexelConversions.cpp
dom/html/HTMLFieldSetElement.cpp
dom/html/HTMLInputElement.cpp
dom/html/HTMLLinkElement.cpp
dom/html/nsHTMLDocument.cpp
dom/jsurl/nsJSProtocolHandler.cpp
dom/media/MediaFormatReader.cpp
dom/media/MediaRecorder.cpp
dom/media/gmp-plugin/gmp-test-output-protection.h
dom/media/mediasource/TrackBuffersManager.cpp
dom/media/webaudio/ScriptProcessorNode.h
dom/media/webrtc/MediaEngineDefault.cpp
dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
dom/media/webspeech/recognition/SpeechGrammar.cpp
dom/media/webspeech/recognition/SpeechGrammarList.cpp
dom/media/webspeech/recognition/SpeechRecognition.cpp
dom/media/webspeech/synth/SpeechSynthesis.cpp
dom/plugins/base/nsPluginStreamListenerPeer.cpp
dom/plugins/ipc/BrowserStreamParent.cpp
dom/plugins/ipc/PluginModuleChild.cpp
dom/svg/SVGLength.cpp
dom/svg/SVGStyleElement.cpp
dom/svg/nsSVGAngle.cpp
dom/svg/nsSVGLength2.cpp
dom/workers/WorkerPrivate.cpp
dom/xbl/nsXBLContentSink.cpp
dom/xml/XMLStylesheetProcessingInstruction.cpp
dom/xml/nsXMLFragmentContentSink.cpp
editor/libeditor/SelectionState.cpp
extensions/universalchardet/src/base/JpCntx.cpp
extensions/universalchardet/src/base/nsUniversalDetector.cpp
gfx/2d/DrawTargetRecording.cpp
gfx/2d/DrawTargetWrapAndRecord.cpp
gfx/2d/Path.cpp
gfx/gl/GLContext.cpp
gfx/ipc/GPUProcessManager.cpp
gfx/layers/composite/AsyncCompositionManager.cpp
gfx/layers/composite/LayerManagerComposite.cpp
gfx/layers/wr/WebRenderTextureHost.cpp
gfx/src/X11Util.cpp
ipc/glue/CrossProcessSemaphore_posix.cpp
js/src/gc/Nursery.cpp
js/src/irregexp/RegExpEngine.h
js/src/jit/shared/Lowering-shared-inl.h
js/src/jit/x86-shared/AtomicOperations-x86-shared.h
js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
js/src/vm/Debugger.cpp
js/src/vm/ForOfIterator.cpp
js/src/vm/Unicode.cpp
js/src/wasm/WasmCode.cpp
layout/generic/ReflowInput.cpp
layout/generic/nsFrameSelection.cpp
layout/generic/nsTextFrame.cpp
layout/inspector/inDOMUtils.cpp
layout/style/nsCSSRuleProcessor.cpp
layout/tables/nsTableFrame.cpp
layout/xul/nsXULTooltipListener.cpp
media/mtransport/nricectx.cpp
media/webrtc/signaling/src/common/browser_logging/WebRtcLog.cpp
media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
mfbt/LinkedList.h
mfbt/SplayTree.h
mozglue/misc/TimeStamp_posix.cpp
netwerk/base/nsURLParsers.cpp
netwerk/cookie/CookieServiceParent.cpp
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/http/Http2Compression.cpp
netwerk/protocol/http/Http2Stream.cpp
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/TunnelUtils.cpp
netwerk/protocol/http/nsAHttpConnection.h
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/sctp/datachannel/DataChannel.cpp
netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
netwerk/streamconv/converters/nsUnknownDecoder.cpp
parser/html/nsHtml5Parser.cpp
parser/html/nsHtml5StreamParser.cpp
parser/html/nsHtml5Tokenizer.cpp
parser/html/nsHtml5TreeBuilder.cpp
parser/html/nsHtml5TreeBuilderCppSupplement.h
security/manager/ssl/nsKeygenThread.cpp
toolkit/components/ctypes/tests/jsctypes-test.cpp
toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp
toolkit/components/perfmonitoring/nsPerformanceStats.cpp
toolkit/components/telemetry/tests/modules-test.cpp
toolkit/components/url-classifier/LookupCache.cpp
toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
widget/WidgetEventImpl.cpp
widget/gtkxtbin/gtk2xtbin.c
xpcom/components/nsComponentManager.cpp
xpcom/tests/gtest/TestSTLWrappers.cpp
xpcom/threads/SchedulerGroup.cpp
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -242,18 +242,16 @@ CustomElementRegistry::RegisterUnresolve
   if (mCustomDefinitions.Get(typeName)) {
     return;
   }
 
   nsTArray<nsWeakPtr>* unresolved = mCandidatesMap.LookupOrAdd(typeName);
   nsWeakPtr* elem = unresolved->AppendElement();
   *elem = do_GetWeakReference(aElement);
   aElement->AddStates(NS_EVENT_STATE_UNRESOLVED);
-
-  return;
 }
 
 void
 CustomElementRegistry::SetupCustomElement(Element* aElement,
                                           const nsAString* aTypeExtension)
 {
   nsCOMPtr<nsIAtom> tagAtom = aElement->NodeInfo()->NameAtom();
   nsCOMPtr<nsIAtom> typeAtom = aTypeExtension ?
@@ -768,17 +766,16 @@ CustomElementRegistry::Get(JSContext* aC
   CustomElementDefinition* data = mCustomDefinitions.Get(nameAtom);
 
   if (!data) {
     aRetVal.setUndefined();
     return;
   }
 
   aRetVal.setObject(*data->mConstructor);
-  return;
 }
 
 already_AddRefed<Promise>
 CustomElementRegistry::WhenDefined(const nsAString& aName, ErrorResult& aRv)
 {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(mWindow);
   RefPtr<Promise> promise = Promise::Create(global, aRv);
 
--- a/dom/base/DOMException.cpp
+++ b/dom/base/DOMException.cpp
@@ -109,18 +109,16 @@ NSResultToNameAndMessage(nsresult aNSRes
       aMessage.Rebind(sDOMErrorMsgMap[idx].mMessage,
                    strlen(sDOMErrorMsgMap[idx].mMessage));
       *aCode = sDOMErrorMsgMap[idx].mCode;
       return;
     }
   }
 
   NS_WARNING("Huh, someone is throwing non-DOM errors using the DOM module!");
-
-  return;
 }
 
 nsresult
 NS_GetNameAndMessageForDOMNSResult(nsresult aNSResult, nsACString& aName,
                                    nsACString& aMessage, uint16_t* aCode)
 {
   nsCString name;
   nsCString message;
--- a/dom/base/DocumentFragment.h
+++ b/dom/base/DocumentFragment.h
@@ -108,17 +108,16 @@ public:
   {
     NS_ASSERTION(false, "Trying to bind a fragment to a tree");
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
   virtual void UnbindFromTree(bool aDeep, bool aNullParent) override
   {
     NS_ASSERTION(false, "Trying to unbind a fragment from a tree");
-    return;
   }
 
   virtual Element* GetNameSpaceElement() override
   {
     return nullptr;
   }
 
   nsIContent* GetHost() const
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1300,17 +1300,16 @@ Element::SetAttribute(const nsAString& a
       return;
     }
     aError = SetAttr(kNameSpaceID_None, nameAtom, aValue, true);
     return;
   }
 
   aError = SetAttr(name->NamespaceID(), name->LocalName(), name->GetPrefix(),
                    aValue, true);
-  return;
 }
 
 void
 Element::RemoveAttribute(const nsAString& aName, ErrorResult& aError)
 {
   const nsAttrName* name = InternalGetAttrNameFromQName(aName);
 
   if (!name) {
@@ -2721,18 +2720,16 @@ Element::BeforeSetAttr(int32_t aNamespac
 void
 Element::PreIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
                           const nsAttrValueOrString* aValue)
 {
   if (aNamespaceID != kNameSpaceID_None || aName != nsGkAtoms::id) {
     return;
   }
   RemoveFromIdTable();
-
-  return;
 }
 
 void
 Element::PostIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
                            const nsAttrValue* aValue)
 {
   if (aNamespaceID != kNameSpaceID_None || aName != nsGkAtoms::id) {
     return;
@@ -2741,18 +2738,16 @@ Element::PostIdMaybeChange(int32_t aName
   // id="" means that the element has no id, not that it has an empty
   // string as the id.
   if (aValue && !aValue->IsEmptyString()) {
     SetHasID();
     AddToIdTable(aValue->GetAtomValue());
   } else {
     ClearHasID();
   }
-
-  return;
 }
 
 EventListenerManager*
 Element::GetEventListenerManagerForAttr(nsIAtom* aAttrName,
                                         bool* aDefer)
 {
   *aDefer = true;
   return GetOrCreateListenerManager();
--- a/dom/base/nsAttrValue.cpp
+++ b/dom/base/nsAttrValue.cpp
@@ -1325,17 +1325,16 @@ nsAttrValue::ParseAtomArray(const nsAStr
 
     // skip whitespace
     while (iter != end && nsContentUtils::IsHTMLWhitespace(*iter)) {
       ++iter;
     }
   }
 
   SetMiscAtomOrString(&aValue);
-  return;
 }
 
 void
 nsAttrValue::ParseStringOrAtom(const nsAString& aValue)
 {
   uint32_t len = aValue.Length();
   // Don't bother with atoms if it's an empty string since
   // we can store those efficently anyway.
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -4895,17 +4895,16 @@ nsGlobalWindow::GetContentOuter(JSContex
       return;
     }
 
     aRetval.set(&val.toObject());
     return;
   }
 
   aRetval.set(nullptr);
-  return;
 }
 
 void
 nsGlobalWindow::GetContent(JSContext* aCx,
                            JS::MutableHandle<JSObject*> aRetval,
                            CallerType aCallerType,
                            ErrorResult& aError)
 {
--- a/dom/canvas/WebGL2ContextQueries.cpp
+++ b/dom/canvas/WebGL2ContextQueries.cpp
@@ -203,17 +203,16 @@ WebGLContext::GetQuery(JSContext* cx, GL
         }
         return;
 
     default:
         break;
     }
 
     ErrorInvalidEnum("%s: Bad pname.", funcName);
-    return;
 }
 
 void
 WebGLContext::GetQueryParameter(JSContext*, const WebGLQuery& query, GLenum pname,
                                 JS::MutableHandleValue retval, const char* funcName)
 {
     if (!funcName) {
         funcName = "getQueryParameter";
--- a/dom/canvas/WebGLTexelConversions.cpp
+++ b/dom/canvas/WebGLTexelConversions.cpp
@@ -214,17 +214,16 @@ class WebGLImageConverter
                 srcPtr += NumElementsPerSrcTexel;
                 dstPtr += NumElementsPerDstTexel;
             }
             srcRowStart += srcStrideInElements;
             dstRowStart += dstStrideInElements;
         }
 
         mSuccess = true;
-        return;
     }
 
     template<WebGLTexelFormat SrcFormat,
              WebGLTexelFormat DstFormat>
     void run(WebGLTexelPremultiplicationOp premultiplicationOp)
     {
         #define WEBGLIMAGECONVERTER_CASE_PREMULTIPLICATIONOP(PremultiplicationOp) \
             case PremultiplicationOp: \
--- a/dom/html/HTMLFieldSetElement.cpp
+++ b/dom/html/HTMLFieldSetElement.cpp
@@ -340,18 +340,16 @@ HTMLFieldSetElement::UpdateValidity(bool
   if (!mInvalidElementsCount || (mInvalidElementsCount == 1 && !aElementValidity)) {
     UpdateState(true);
   }
 
   // We should propagate the change to the fieldset parent chain.
   if (mFieldSet) {
     mFieldSet->UpdateValidity(aElementValidity);
   }
-
-  return;
 }
 
 EventStates
 HTMLFieldSetElement::IntrinsicState() const
 {
   EventStates state = nsGenericHTMLFormElement::IntrinsicState();
 
   if (mInvalidElementsCount) {
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3413,17 +3413,16 @@ HTMLInputElement::Focus(ErrorResult& aEr
         if (fm && element) {
           fm->SetFocus(element, 0);
         }
         break;
       }
     }
   }
 
-  return;
 }
 
 #if !defined(ANDROID) && !defined(XP_MACOSX)
 bool
 HTMLInputElement::IsNodeApzAwareInternal() const
 {
   // Tell APZC we may handle mouse wheel event and do preventDefault when input
   // type is number.
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -489,18 +489,16 @@ HTMLLinkElement::GetStyleSheetInfo(nsASt
   nsContentUtils::SplitMimeType(aType, mimeType, notUsed);
   if (!mimeType.IsEmpty() && !mimeType.LowerCaseEqualsLiteral("text/css")) {
     return;
   }
 
   // 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
 HTMLLinkElement::GetCORSMode() const
 {
   return AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin));
 }
 
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -291,20 +291,18 @@ nsHTMLDocument::TryHintCharset(nsIConten
 
       if (requestCharsetSource <= aCharsetSource)
         return;
 
       if (requestCharset && IsAsciiCompatible(requestCharset)) {
         aCharsetSource = requestCharsetSource;
         aEncoding = WrapNotNull(requestCharset);
       }
-      return;
     }
   }
-  return;
 }
 
 
 void
 nsHTMLDocument::TryUserForcedCharset(nsIContentViewer* aCv,
                                      nsIDocShell*  aDocShell,
                                      int32_t& aCharsetSource,
                                      NotNull<const Encoding*>& aEncoding)
@@ -831,17 +829,16 @@ nsHTMLDocument::StopDocumentLoad()
   // Remove the wyciwyg channel request from the document load group
   // that we added in Open() if Open() was called on this doc.
   RemoveWyciwygChannel();
   NS_ASSERTION(!mWyciwygChannel, "nsHTMLDocument::StopDocumentLoad(): "
                "nsIWyciwygChannel could not be removed!");
 
   nsDocument::StopDocumentLoad();
   UnblockOnload(false);
-  return;
 }
 
 void
 nsHTMLDocument::BeginLoad()
 {
   if (IsEditingOn()) {
     // Reset() blows away all event listeners in the document, and our
     // editor relies heavily on those. Midas is turned on, to make it
--- a/dom/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/jsurl/nsJSProtocolHandler.cpp
@@ -786,18 +786,16 @@ nsJSChannel::EvaluateScript()
             // cancelled if needed, and that call just canceled us if it
             // failed.  We'll still get notified by the stream channel when it
             // finishes.
         }
 
     } else if (mIsAsync) {
         NotifyListener();
     }
-
-    return;
 }
 
 void
 nsJSChannel::NotifyListener()
 {
     mListener->OnStartRequest(this, nullptr);
     mListener->OnStopRequest(this, nullptr, mStatus);
 
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -2528,17 +2528,16 @@ MediaFormatReader::SkipVideoDemuxToNextK
   // samples.
   DropDecodedSamples(TrackInfo::kVideoTrack);
 
   mVideo.mTrackDemuxer->SkipToNextRandomAccessPoint(aTimeThreshold)
     ->Then(OwnerThread(), __func__, this,
            &MediaFormatReader::OnVideoSkipCompleted,
            &MediaFormatReader::OnVideoSkipFailed)
     ->Track(mSkipRequest);
-  return;
 }
 
 void
 MediaFormatReader::VideoSkipReset(uint32_t aSkipped)
 {
   MOZ_ASSERT(OnTaskQueue());
 
   // Some frames may have been output by the decoder since we initiated the
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -1413,19 +1413,17 @@ MediaRecorder::NotifyError(nsresult aRv)
 
   RefPtr<RecordErrorEvent> event =
     RecordErrorEvent::Constructor(this, NS_LITERAL_STRING("error"), init);
   event->SetTrusted(true);
 
   rv = DispatchDOMEvent(nullptr, event, nullptr, nullptr);
   if (NS_FAILED(rv)) {
     NS_ERROR("Failed to dispatch the error event!!!");
-    return;
   }
-  return;
 }
 
 void
 MediaRecorder::RemoveSession(Session* aSession)
 {
   LOG(LogLevel::Debug, ("MediaRecorder.RemoveSession (%p)", aSession));
   mSessions.RemoveElement(aSession);
 }
--- a/dom/media/gmp-plugin/gmp-test-output-protection.h
+++ b/dom/media/gmp-plugin/gmp-test-output-protection.h
@@ -118,13 +118,12 @@ RunOutputProtectionAPITests()
 #endif
 }
 
 static void
 TestOuputProtectionAPIs()
 {
   RunOutputProtectionAPITests();
   FakeDecryptor::Message("OP tests completed");
-  return;
 }
 
 } // namespace gmptest
 } // namespace mozilla
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -835,17 +835,16 @@ TrackBuffersManager::CreateDemuxerforMIM
 #ifdef MOZ_FMP4
   if (mType.Type() == MEDIAMIMETYPE("video/mp4")
       || mType.Type() == MEDIAMIMETYPE("audio/mp4")) {
     mInputDemuxer = new MP4Demuxer(mCurrentInputBuffer);
     return;
   }
 #endif
   NS_WARNING("Not supported (yet)");
-  return;
 }
 
 // We reset the demuxer by creating a new one and initializing it.
 void
 TrackBuffersManager::ResetDemuxingState()
 {
   MOZ_ASSERT(mParser && mParser->HasInitData());
   RecreateParser(true);
--- a/dom/media/webaudio/ScriptProcessorNode.h
+++ b/dom/media/webaudio/ScriptProcessorNode.h
@@ -98,24 +98,22 @@ public:
     AudioNode::Disconnect(aDestination, aOutput, aRv);
     UpdateConnectedStatus();
   }
   void SetChannelCount(uint32_t aChannelCount, ErrorResult& aRv) override
   {
     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
   {
     return mBufferSize;
   }
 
   uint32_t NumberOfOutputChannels() const
--- a/dom/media/webrtc/MediaEngineDefault.cpp
+++ b/dom/media/webrtc/MediaEngineDefault.cpp
@@ -53,24 +53,22 @@ MediaEngineDefaultVideoSource::MediaEngi
 
 MediaEngineDefaultVideoSource::~MediaEngineDefaultVideoSource()
 {}
 
 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
 MediaEngineDefaultVideoSource::GetBestFitnessDistance(
     const nsTArray<const NormalizedConstraintSet*>& aConstraintSets,
     const nsString& aDeviceId) const
 {
   uint32_t distance = 0;
@@ -377,24 +375,22 @@ MediaEngineDefaultAudioSource::MediaEngi
 
 MediaEngineDefaultAudioSource::~MediaEngineDefaultAudioSource()
 {}
 
 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
 MediaEngineDefaultAudioSource::GetBestFitnessDistance(
     const nsTArray<const NormalizedConstraintSet*>& aConstraintSets,
     const nsString& aDeviceId) const
 {
   uint32_t distance = 0;
@@ -528,18 +524,16 @@ MediaEngineDefault::EnumerateVideoDevice
   }
 
   // We once had code here to find a VideoSource with the same settings and re-use that.
   // This no longer is possible since the resolution is being set in Allocate().
 
   RefPtr<MediaEngineVideoSource> newSource = new MediaEngineDefaultVideoSource();
   mVSources.AppendElement(newSource);
   aVSources->AppendElement(newSource);
-
-  return;
 }
 
 void
 MediaEngineDefault::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
                                           nsTArray<RefPtr<MediaEngineAudioSource> >* aASources) {
   MutexAutoLock lock(mMutex);
   int32_t len = mASources.Length();
 
@@ -554,12 +548,11 @@ MediaEngineDefault::EnumerateAudioDevice
 
   // All streams are currently busy, just make a new one.
   if (aASources->Length() == 0) {
     RefPtr<MediaEngineAudioSource> newSource =
       new MediaEngineDefaultAudioSource();
     mASources.AppendElement(newSource);
     aASources->AppendElement(newSource);
   }
-  return;
 }
 
 } // namespace mozilla
--- a/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
@@ -56,18 +56,16 @@ MediaEngineRemoteVideoSource::Init()
     LOG(("Error initializing RemoteVideoSource (GetCaptureDevice)"));
     return;
   }
 
   SetName(NS_ConvertUTF8toUTF16(deviceName));
   SetUUID(uniqueId);
 
   mInitDone = true;
-
-  return;
 }
 
 void
 MediaEngineRemoteVideoSource::Shutdown()
 {
   LOG((__PRETTY_FUNCTION__));
   if (!mInitDone) {
     return;
@@ -94,17 +92,16 @@ MediaEngineRemoteVideoSource::Shutdown()
 
   for (auto& registered : mRegisteredHandles) {
     MOZ_ASSERT(mState == kAllocated || mState == kStopped);
     Deallocate(registered.get());
   }
 
   MOZ_ASSERT(mState == kReleased);
   mInitDone = false;
-  return;
 }
 
 nsresult
 MediaEngineRemoteVideoSource::Allocate(
     const dom::MediaTrackConstraints& aConstraints,
     const MediaEnginePrefs& aPrefs,
     const nsString& aDeviceId,
     const mozilla::ipc::PrincipalInfo& aPrincipalInfo,
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -204,24 +204,22 @@ MediaEngineWebRTCMicrophoneSource::Media
   mSettings->mChannelCount.Construct(0);
   // We'll init lazily as needed
 }
 
 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
 // as a whole, given an accumulated number of ConstraintSets.
 // Ideal values are considered in the first ConstraintSet only.
 // Plain values are treated as Ideal in the first ConstraintSet.
 // Plain values are treated as Exact in subsequent ConstraintSets.
 // Infinity = UINT32_MAX e.g. device cannot satisfy accumulated ConstraintSets.
@@ -937,17 +935,16 @@ MediaEngineWebRTCMicrophoneSource::Proce
   }
 
   MonitorAutoLock lock(mMonitor);
   if (mState != kStarted)
     return;
 
   uint32_t channels = isStereo ? 2 : 1;
   InsertInGraph<int16_t>(audio10ms, length, channels);
-  return;
 }
 
 void
 MediaEngineWebRTCAudioCaptureSource::GetName(nsAString &aName) const
 {
   aName.AssignLiteral("AudioCapture");
 }
 
--- a/dom/media/webspeech/recognition/SpeechGrammar.cpp
+++ b/dom/media/webspeech/recognition/SpeechGrammar.cpp
@@ -48,34 +48,31 @@ SpeechGrammar::WrapObject(JSContext* aCx
 {
   return SpeechGrammarBinding::Wrap(aCx, this, aGivenProto);
 }
 
 void
 SpeechGrammar::GetSrc(nsString& aRetVal, ErrorResult& aRv) const
 {
   aRetVal = mSrc;
-  return;
 }
 
 void
 SpeechGrammar::SetSrc(const nsAString& aArg, ErrorResult& aRv)
 {
   mSrc = aArg;
-  return;
 }
 
 float
 SpeechGrammar::GetWeight(ErrorResult& aRv) const
 {
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
   return 0;
 }
 
 void
 SpeechGrammar::SetWeight(float aArg, ErrorResult& aRv)
 {
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
-  return;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/media/webspeech/recognition/SpeechGrammarList.cpp
+++ b/dom/media/webspeech/recognition/SpeechGrammarList.cpp
@@ -66,28 +66,26 @@ SpeechGrammarList::Item(uint32_t aIndex,
 }
 
 void
 SpeechGrammarList::AddFromURI(const nsAString& aSrc,
                               const Optional<float>& aWeight,
                               ErrorResult& aRv)
 {
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
-  return;
 }
 
 void
 SpeechGrammarList::AddFromString(const nsAString& aString,
                                  const Optional<float>& aWeight,
                                  ErrorResult& aRv)
 {
   SpeechGrammar* speechGrammar = new SpeechGrammar(mParent);
   speechGrammar->SetSrc(aString, aRv);
   mItems.AppendElement(speechGrammar);
-  return;
 }
 
 already_AddRefed<SpeechGrammar>
 SpeechGrammarList::IndexedGetter(uint32_t aIndex, bool& aPresent,
                                  ErrorResult& aRv)
 {
   if (aIndex >= Length()) {
     aPresent = false;
--- a/dom/media/webspeech/recognition/SpeechRecognition.cpp
+++ b/dom/media/webspeech/recognition/SpeechRecognition.cpp
@@ -142,17 +142,16 @@ SpeechRecognition::StateBetween(FSMState
   return mCurrentState >= begin && mCurrentState <= end;
 }
 
 void
 SpeechRecognition::SetState(FSMState state)
 {
   mCurrentState = state;
   SR_LOG("Transitioned to state %s", GetName(mCurrentState));
-  return;
 }
 
 JSObject*
 SpeechRecognition::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return SpeechRecognitionBinding::Wrap(aCx, this, aGivenProto);
 }
 
@@ -370,18 +369,16 @@ SpeechRecognition::Transition(SpeechEven
           MOZ_CRASH();
         case EVENT_COUNT:
           MOZ_CRASH("Invalid event EVENT_COUNT");
       }
       break;
     case STATE_COUNT:
       MOZ_CRASH("Invalid state STATE_COUNT");
   }
-
-  return;
 }
 
 /*
  * Handle a segment of recorded audio data.
  * Returns the number of samples that were processed.
  */
 uint32_t
 SpeechRecognition::ProcessAudioSegment(AudioSegment* aSegment, TrackRate aTrackRate)
@@ -554,18 +551,16 @@ SpeechRecognition::AbortError(SpeechEven
 
 void
 SpeechRecognition::NotifyError(SpeechEvent* aEvent)
 {
   aEvent->mError->SetTrusted(true);
 
   bool defaultActionEnabled;
   this->DispatchEvent(aEvent->mError, &defaultActionEnabled);
-
-  return;
 }
 
 /**************************************
  * Event triggers and other functions *
  **************************************/
 NS_IMETHODIMP
 SpeechRecognition::StartRecording(DOMMediaStream* aDOMStream)
 {
@@ -636,18 +631,16 @@ SpeechRecognition::ProcessTestEventReque
                   NS_LITERAL_STRING("AUDIO_ERROR test event"));
   } else {
     NS_ASSERTION(MediaPrefs::WebSpeechFakeRecognitionService(),
                  "Got request for fake recognition service event, but "
                  TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE " is unset");
 
     // let the fake recognition service handle the request
   }
-
-  return;
 }
 
 already_AddRefed<SpeechGrammarList>
 SpeechRecognition::Grammars() const
 {
   RefPtr<SpeechGrammarList> speechGrammarList = mSpeechGrammarList;
   return speechGrammarList.forget();
 }
@@ -676,57 +669,52 @@ SpeechRecognition::GetContinuous(ErrorRe
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
   return false;
 }
 
 void
 SpeechRecognition::SetContinuous(bool aArg, ErrorResult& aRv)
 {
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
-  return;
 }
 
 bool
 SpeechRecognition::InterimResults() const
 {
   return mInterimResults;
 }
 
 void
 SpeechRecognition::SetInterimResults(bool aArg)
 {
   mInterimResults = aArg;
-  return;
 }
 
 uint32_t
 SpeechRecognition::MaxAlternatives() const
 {
   return mMaxAlternatives;
 }
 
 void
 SpeechRecognition::SetMaxAlternatives(uint32_t aArg)
 {
   mMaxAlternatives = aArg;
-  return;
 }
 
 void
 SpeechRecognition::GetServiceURI(nsString& aRetVal, ErrorResult& aRv) const
 {
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
-  return;
 }
 
 void
 SpeechRecognition::SetServiceURI(const nsAString& aArg, ErrorResult& aRv)
 {
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
-  return;
 }
 
 void
 SpeechRecognition::Start(const Optional<NonNull<DOMMediaStream>>& aStream,
                          CallerType aCallerType,
                          ErrorResult& aRv)
 {
   if (mCurrentState != STATE_IDLE) {
@@ -992,18 +980,16 @@ SpeechRecognition::FeedAudioData(already
   }
 
   AudioSegment* segment = CreateAudioSegment(chunksToSend);
   RefPtr<SpeechEvent> event = new SpeechEvent(this, EVENT_AUDIO_DATA);
   event->mAudioSegment = segment;
   event->mProvider = aProvider;
   event->mTrackRate = aTrackRate;
   NS_DispatchToMainThread(event);
-
-  return;
 }
 
 const char*
 SpeechRecognition::GetName(FSMState aId)
 {
   static const char* names[] = {
     "STATE_IDLE",
     "STATE_STARTING",
--- a/dom/media/webspeech/synth/SpeechSynthesis.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesis.cpp
@@ -177,18 +177,16 @@ SpeechSynthesis::AdvanceQueue()
   }
 
   mCurrentTask =
     nsSynthVoiceRegistry::GetInstance()->SpeakUtterance(*utterance, docLang);
 
   if (mCurrentTask) {
     mCurrentTask->SetSpeechSynthesis(this);
   }
-
-  return;
 }
 
 void
 SpeechSynthesis::Cancel()
 {
   if (!mSpeechQueue.IsEmpty() &&
       mSpeechQueue.ElementAt(0)->GetState() == SpeechSynthesisUtterance::STATE_SPEAKING) {
     // Remove all queued utterances except for current one, we will remove it
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -653,17 +653,16 @@ nsPluginStreamListenerPeer::MakeByteRang
     requestCnt++;
   }
 
   // get rid of possible trailing comma
   string.Trim(",", false);
 
   rangeRequest = string;
   *numRequests  = requestCnt;
-  return;
 }
 
 // XXX: Converting the channel within nsPluginStreamListenerPeer
 // to use asyncOpen2() and do not want to touch the fragile logic
 // of byte range requests. Hence we just introduce this lightweight
 // wrapper to proxy the context.
 class PluginContextProxy final : public nsIStreamListener
 {
--- a/dom/plugins/ipc/BrowserStreamParent.cpp
+++ b/dom/plugins/ipc/BrowserStreamParent.cpp
@@ -157,13 +157,12 @@ BrowserStreamParent::StreamAsFile(const 
   // been destroyed (until RecvStreamDestroyed() is called).  Since we retain
   // mStreamPeer at most once, we won't get in trouble if StreamAsFile() is
   // called more than once.
   if (!mStreamPeer) {
     nsNPAPIPlugin::RetainStream(mStream, getter_AddRefs(mStreamPeer));
   }
 
   Unused << SendNPP_StreamAsFile(nsCString(fname));
-  return;
 }
 
 } // namespace plugins
 } // namespace mozilla
--- a/dom/plugins/ipc/PluginModuleChild.cpp
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -2398,17 +2398,16 @@ PluginModuleChild::NPN_ReleaseObject(NPO
     int32_t refCnt = PR_ATOMIC_DECREMENT((int32_t*)&aNPObj->referenceCount);
     NS_LOG_RELEASE(aNPObj, refCnt, "NPObject");
 
     if (refCnt == 0) {
         DeallocNPObject(aNPObj);
         if (doe)
             doe->mDeleted = true;
     }
-    return;
 }
 
 void
 PluginModuleChild::DeallocNPObject(NPObject* aNPObj)
 {
     if (aNPObj->_class && aNPObj->_class->deallocate) {
         aNPObj->_class->deallocate(aNPObj);
     } else {
--- a/dom/svg/SVGLength.cpp
+++ b/dom/svg/SVGLength.cpp
@@ -208,17 +208,16 @@ GetUnitString(nsAString& unit, uint16_t 
 {
   if (SVGLength::IsValidUnitType(unitType)) {
     if (unitMap[unitType]) {
       (*unitMap[unitType])->ToString(unit);
     }
     return;
   }
   NS_NOTREACHED("Unknown unit type"); // Someone's using an SVGLength with an invalid unit?
-  return;
 }
 
 static uint16_t
 GetUnitTypeForString(const nsAString& unitStr)
 {
   if (unitStr.IsEmpty())
     return nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER;
 
--- a/dom/svg/SVGStyleElement.cpp
+++ b/dom/svg/SVGStyleElement.cpp
@@ -290,18 +290,16 @@ SVGStyleElement::GetStyleSheetInfo(nsASt
 
   GetAttr(kNameSpaceID_None, nsGkAtoms::type, aType);
   if (aType.IsEmpty()) {
     aType.AssignLiteral("text/css");
   }
 
   *aIsScoped = HasAttr(kNameSpaceID_None, nsGkAtoms::scoped) &&
                OwnerDoc()->IsScopedStyleEnabled();
-
-  return;
 }
 
 CORSMode
 SVGStyleElement::GetCORSMode() const
 {
   return AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin));
 }
 
--- a/dom/svg/nsSVGAngle.cpp
+++ b/dom/svg/nsSVGAngle.cpp
@@ -54,17 +54,16 @@ GetUnitString(nsAString& unit, uint16_t 
   if (IsValidUnitType(unitType)) {
     if (unitMap[unitType]) {
       (*unitMap[unitType])->ToString(unit);
     }
     return;
   }
 
   NS_NOTREACHED("Unknown unit type");
-  return;
 }
 
 static uint16_t
 GetUnitTypeForString(const nsAString& unitStr)
 {
   if (unitStr.IsEmpty())
     return SVG_ANGLETYPE_UNSPECIFIED;
 
--- a/dom/svg/nsSVGLength2.cpp
+++ b/dom/svg/nsSVGLength2.cpp
@@ -58,17 +58,16 @@ GetUnitString(nsAString& unit, uint16_t 
   if (IsValidUnitType(unitType)) {
     if (unitMap[unitType]) {
       (*unitMap[unitType])->ToString(unit);
     }
     return;
   }
 
   NS_NOTREACHED("Unknown unit type");
-  return;
 }
 
 static uint16_t
 GetUnitTypeForString(const nsAString& unitStr)
 {
   if (unitStr.IsEmpty())
     return nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER;
 
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -892,17 +892,16 @@ private:
     }
   }
 
   virtual void
   PostRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate, bool aRunResult)
           override
   {
     aWorkerPrivate->ModifyBusyCountFromWorker(false);
-    return;
   }
 
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     bool ok = aWorkerPrivate->NotifyInternal(aCx, mStatus);
     MOZ_ASSERT(!JS_IsExceptionPending(aCx));
     return ok;
--- a/dom/xbl/nsXBLContentSink.cpp
+++ b/dom/xbl/nsXBLContentSink.cpp
@@ -77,17 +77,16 @@ nsXBLContentSink::Init(nsIDocument* aDoc
   nsresult rv;
   rv = nsXMLContentSink::Init(aDoc, aURI, aContainer, nullptr);
   return rv;
 }
 
 void
 nsXBLContentSink::MaybeStartLayout(bool aIgnorePendingSheets)
 {
-  return;
 }
 
 nsresult
 nsXBLContentSink::FlushText(bool aReleaseTextNode)
 {
   if (mTextLength != 0) {
     const nsAString& text = Substring(mText, mText+mTextLength);
     if (mState == eXBL_InHandlers) {
--- a/dom/xml/XMLStylesheetProcessingInstruction.cpp
+++ b/dom/xml/XMLStylesheetProcessingInstruction.cpp
@@ -173,18 +173,16 @@ XMLStylesheetProcessingInstruction::GetS
   if (!mimeType.IsEmpty() && !mimeType.LowerCaseEqualsLiteral("text/css")) {
     aType.Assign(type);
     return;
   }
 
   // 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;
 }
 
 nsGenericDOMDataNode*
 XMLStylesheetProcessingInstruction::CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
                                                   bool aCloneText) const
 {
   nsAutoString data;
   nsGenericDOMDataNode::GetData(data);
--- a/dom/xml/nsXMLFragmentContentSink.cpp
+++ b/dom/xml/nsXMLFragmentContentSink.cpp
@@ -235,17 +235,16 @@ nsXMLFragmentContentSink::CloseElement(n
     }
   }
   return NS_OK;
 }
 
 void
 nsXMLFragmentContentSink::MaybeStartLayout(bool aIgnorePendingSheets)
 {
-  return;
 }
 
 ////////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP
 nsXMLFragmentContentSink::HandleDoctypeDecl(const nsAString & aSubset,
                                             const nsAString & aName,
                                             const nsAString & aSystemId,
--- a/editor/libeditor/SelectionState.cpp
+++ b/editor/libeditor/SelectionState.cpp
@@ -429,17 +429,16 @@ RangeUpdater::SelAdjInsertText(Text& aTe
 
     if (item->mStartContainer == &aTextNode && item->mStartOffset > aOffset) {
       item->mStartOffset += len;
     }
     if (item->mEndContainer == &aTextNode && item->mEndOffset > aOffset) {
       item->mEndOffset += len;
     }
   }
-  return;
 }
 
 nsresult
 RangeUpdater::SelAdjDeleteText(nsIContent* aTextNode,
                                int32_t aOffset,
                                int32_t aLength)
 {
   if (mLock) {
--- a/extensions/universalchardet/src/base/JpCntx.cpp
+++ b/extensions/universalchardet/src/base/JpCntx.cpp
@@ -129,18 +129,16 @@ void JapaneseContextAnalysis::HandleData
           mDone = true;
           break;
         }
         mRelSample[jp2CharContext[mLastCharOrder][order]]++;
       }
       mLastCharOrder = order;
     }
   }
-
-  return;
 }
 
 void JapaneseContextAnalysis::Reset()
 {
   mTotalRel = 0;
   for (uint32_t i = 0; i < NUM_OF_CATEGORY; i++)
     mRelSample[i] = 0;
   mNeedToSkipCharNum = 0;
--- a/extensions/universalchardet/src/base/nsUniversalDetector.cpp
+++ b/extensions/universalchardet/src/base/nsUniversalDetector.cpp
@@ -231,10 +231,9 @@ void nsUniversalDetector::DataEnd()
         Report(mCharSetProbers[maxProber]->GetCharSetName());
     }
     break;
   case eEscAscii:
     break;
   default:
     ;
   }
-  return;
 }
--- a/gfx/2d/DrawTargetRecording.cpp
+++ b/gfx/2d/DrawTargetRecording.cpp
@@ -70,17 +70,16 @@ EnsureSurfaceStoredRecording(DrawEventRe
   aRecorder->AddStoredObject(aSurface);
   aRecorder->AddSourceSurface(aSurface);
 
   RecordingSourceSurfaceUserData *userData = new RecordingSourceSurfaceUserData;
   userData->refPtr = aSurface;
   userData->recorder = aRecorder;
   aSurface->AddUserData(reinterpret_cast<UserDataKey*>(aRecorder),
                         userData, &RecordingSourceSurfaceUserDataFunc);
-  return;
 }
 
 class SourceSurfaceRecording : public SourceSurface
 {
 public:
   MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceRecording)
   SourceSurfaceRecording(IntSize aSize, SurfaceFormat aFormat, DrawEventRecorderPrivate *aRecorder)
     : mSize(aSize), mFormat(aFormat), mRecorder(aRecorder)
--- a/gfx/2d/DrawTargetWrapAndRecord.cpp
+++ b/gfx/2d/DrawTargetWrapAndRecord.cpp
@@ -70,17 +70,16 @@ EnsureSurfaceStored(DrawEventRecorderPri
   aRecorder->AddStoredObject(aSurface);
   aRecorder->AddSourceSurface(aSurface);
 
   WrapAndRecordSourceSurfaceUserData *userData = new WrapAndRecordSourceSurfaceUserData;
   userData->refPtr = aSurface;
   userData->recorder = aRecorder;
   aSurface->AddUserData(reinterpret_cast<UserDataKey*>(aRecorder),
                         userData, &WrapAndRecordSourceSurfaceUserDataFunc);
-  return;
 }
 
 class SourceSurfaceWrapAndRecord : public SourceSurface
 {
 public:
   MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceWrapAndRecord)
   SourceSurfaceWrapAndRecord(SourceSurface *aFinalSurface, DrawEventRecorderPrivate *aRecorder)
     : mFinalSurface(aFinalSurface), mRecorder(aRecorder)
--- a/gfx/2d/Path.cpp
+++ b/gfx/2d/Path.cpp
@@ -437,18 +437,16 @@ FindInflectionPoints(const BezierControl
       *aT1 = q / a;
       *aT2 = c / q;
       if (*aT1 > *aT2) {
         std::swap(*aT1, *aT2);
       }
       *aCount = 2;
     }
   }
-
-  return;
 }
 
 void
 FlattenBezier(const BezierControlPoints &aControlPoints,
               PathSink *aSink, double aTolerance)
 {
   double t1;
   double t2;
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -2498,17 +2498,16 @@ SplitByChar(const nsACString& str, const
         if (end == -1)
             break;
 
         uint32_t len = (uint32_t)end - start;
         nsDependentCSubstring substr(str, start, len);
         out->push_back(nsCString(substr));
 
         start = end + 1;
-        continue;
     }
 
     nsDependentCSubstring substr(str, start);
     out->push_back(nsCString(substr));
 }
 
 void
 GLContext::Readback(SharedSurface* src, gfx::DataSourceSurface* dest)
--- a/gfx/ipc/GPUProcessManager.cpp
+++ b/gfx/ipc/GPUProcessManager.cpp
@@ -937,17 +937,16 @@ GPUProcessManager::CreateContentVideoDec
   if (NS_FAILED(rv)) {
     gfxCriticalNote << "Could not create content video decoder: " << hexa(int(rv));
     return;
   }
 
   mGPUChild->SendNewContentVideoDecoderManager(Move(parentPipe));
 
   *aOutEndpoint = Move(childPipe);
-  return;
 }
 
 already_AddRefed<IAPZCTreeManager>
 GPUProcessManager::GetAPZCTreeManagerForLayers(uint64_t aLayersId)
 {
   return CompositorBridgeParent::GetAPZCTreeManager(aLayersId);
 }
 
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -567,18 +567,16 @@ AsyncCompositionManager::AlignFixedAndSt
     // Propagate this new transform to our descendants as the new value of
     // |aCurrentTransformForRoot|. This allows them to consume the unconsumed
     // translation.
     for (Layer* child = layer->GetFirstChild(); child; child = child->GetNextSibling()) {
       AlignFixedAndStickyLayers(aTransformedSubtreeRoot, child, aTransformScrollId,
           aPreviousTransformForRoot, newTransform, aFixedLayerMargins, aClipPartsCache);
     }
   }
-
-  return;
 }
 
 static void
 ApplyAnimatedValue(Layer* aLayer,
                    CompositorAnimationStorage* aStorage,
                    nsCSSPropertyID aProperty,
                    const AnimationData& aAnimationData,
                    const StyleAnimationValue& aValue)
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -1467,17 +1467,16 @@ void
 LayerComposite::AddBlendModeEffect(EffectChain& aEffectChain)
 {
   gfx::CompositionOp blendMode = GetLayer()->GetEffectiveMixBlendMode();
   if (blendMode == gfx::CompositionOp::OP_OVER) {
     return;
   }
 
   aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE] = new EffectBlendMode(blendMode);
-  return;
 }
 
 bool
 LayerManagerComposite::CanUseCanvasLayerForSize(const IntSize &aSize)
 {
   return mCompositor->CanUseCanvasLayerForSize(gfx::IntSize(aSize.width,
                                                             aSize.height));
 }
--- a/gfx/layers/wr/WebRenderTextureHost.cpp
+++ b/gfx/layers/wr/WebRenderTextureHost.cpp
@@ -75,17 +75,16 @@ WebRenderTextureHost::Lock()
   MOZ_ASSERT_UNREACHABLE("unexpected to be called");
   return false;
 }
 
 void
 WebRenderTextureHost::Unlock()
 {
   MOZ_ASSERT_UNREACHABLE("unexpected to be called");
-  return;
 }
 
 bool
 WebRenderTextureHost::BindTextureSource(CompositableTextureSourceRef& aTexture)
 {
   MOZ_ASSERT_UNREACHABLE("unexpected to be called");
   return false;
 }
--- a/gfx/src/X11Util.cpp
+++ b/gfx/src/X11Util.cpp
@@ -27,17 +27,16 @@ FindVisualAndDepth(Display* aDisplay, Vi
                 return;
             }
         }
     }
 
     NS_ASSERTION(aVisualID == X11None, "VisualID not on Screen.");
     *aVisual = nullptr;
     *aDepth = 0;
-    return;
 }
 
 void
 FinishX(Display* aDisplay)
 {
   unsigned long lastRequest = NextRequest(aDisplay) - 1;
   if (lastRequest == LastKnownRequestProcessed(aDisplay))
     return;
--- a/ipc/glue/CrossProcessSemaphore_posix.cpp
+++ b/ipc/glue/CrossProcessSemaphore_posix.cpp
@@ -130,21 +130,19 @@ CrossProcessSemaphore::Wait(const Maybe<
       return false;
     }
 
     ts.tv_nsec += (kNsPerMs * aWaitTime->ToMilliseconds());
     ts.tv_sec += ts.tv_nsec / kNsPerSec;
     ts.tv_nsec %= kNsPerSec;
 
     while ((ret = sem_timedwait(mSemaphore, &ts)) == -1 && errno == EINTR) {
-      continue;
     }
   } else {
     while ((ret = sem_wait(mSemaphore)) == -1 && errno == EINTR) {
-      continue;
     }
   }
   return ret == 0;
 }
 
 void
 CrossProcessSemaphore::Signal()
 {
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -189,17 +189,16 @@ js::Nursery::enable()
     setCurrentChunk(0);
     setStartPosition();
 #ifdef JS_GC_ZEAL
     if (runtime()->hasZealMode(ZealMode::GenerationalGC))
         enterZealMode();
 #endif
 
     MOZ_ALWAYS_TRUE(runtime()->gc.storeBuffer().enable());
-    return;
 }
 
 void
 js::Nursery::disable()
 {
     MOZ_ASSERT(isEmpty());
     if (!isEnabled())
         return;
--- a/js/src/irregexp/RegExpEngine.h
+++ b/js/src/irregexp/RegExpEngine.h
@@ -895,17 +895,16 @@ class BackReferenceNode : public SeqRegE
     virtual void Emit(RegExpCompiler* compiler, Trace* trace);
     virtual int EatsAtLeast(int still_to_find,
                             int recursion_depth,
                             bool not_at_start);
     virtual void GetQuickCheckDetails(QuickCheckDetails* details,
                                       RegExpCompiler* compiler,
                                       int characters_filled_in,
                                       bool not_at_start) {
-        return;
     }
     virtual bool FillInBMInfo(int offset,
                               int budget,
                               BoyerMooreLookahead* bm,
                               bool not_at_start);
 
   private:
     int start_reg_;
--- a/js/src/jit/shared/Lowering-shared-inl.h
+++ b/js/src/jit/shared/Lowering-shared-inl.h
@@ -314,18 +314,16 @@ LIRGeneratorShared::defineSinCos(LInstru
 #error "Unsupported architecture for SinCos"
 #endif
 
     getVirtualRegister();
 
     lir->setMir(mir);
     mir->setVirtualRegister(vreg);
     add(lir);
-
-    return;
 }
 
 // In LIR, we treat booleans and integers as the same low-level type (INTEGER).
 // When snapshotting, we recover the actual JS type from MIR. This function
 // checks that when making redefinitions, we don't accidentally coerce two
 // incompatible types.
 static inline bool
 IsCompatibleLIRCoercion(MIRType to, MIRType from)
--- a/js/src/jit/x86-shared/AtomicOperations-x86-shared.h
+++ b/js/src/jit/x86-shared/AtomicOperations-x86-shared.h
@@ -357,17 +357,16 @@ js::jit::RegionLock::acquire(void* addr)
 # ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
     while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
         continue;
 # else
     uint32_t zero = 0;
     uint32_t one = 1;
     while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
         zero = 0;
-        continue;
     }
 # endif
 }
 
 template<size_t nbytes>
 inline void
 js::jit::RegionLock::release(void* addr)
 {
--- a/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
+++ b/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
@@ -358,17 +358,16 @@ CodeGeneratorX86Shared::visitWasmSelect(
             masm.moveDouble(ToFloatRegister(ins->falseExpr()), out);
         else
             masm.loadDouble(falseExpr, out);
     } else {
         MOZ_CRASH("unhandled type in visitWasmSelect!");
     }
 
     masm.bind(&done);
-    return;
 }
 
 void
 CodeGeneratorX86Shared::visitWasmReinterpret(LWasmReinterpret* lir)
 {
     MOZ_ASSERT(gen->compilingWasm());
     MWasmReinterpret* ins = lir->mir();
 
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -4679,18 +4679,16 @@ class MOZ_STACK_CLASS Debugger::ScriptQu
             }
         } else {
             /* Record this matching script in the results vector. */
             if (!vector.append(script)) {
                 oom = true;
                 return;
             }
         }
-
-        return;
     }
 
     /*
      * If |instanceObject| matches this query, append it to |wasmInstanceVector|.
      * Set |oom| if an out of memory condition occurred.
      */
     void consider(WasmInstanceObject* instanceObject) {
         if (oom)
--- a/js/src/vm/ForOfIterator.cpp
+++ b/js/src/vm/ForOfIterator.cpp
@@ -192,19 +192,16 @@ ForOfIterator::closeThrow()
     RootedValue innerResultValue(cx_);
     if (!js::Call(cx_, returnVal, iterator, &innerResultValue)) {
         if (cx_->isExceptionPending())
             cx_->clearPendingException();
     }
 
     // Step 6.
     cx_->setPendingException(completionException);
-
-    // Steps 7-9 (skipped).
-    return;
 }
 
 bool
 ForOfIterator::materializeArrayIterator()
 {
     MOZ_ASSERT(index != NOT_ARRAY);
 
     HandlePropertyName name = cx_->names().ArrayValuesAt;
--- a/js/src/vm/Unicode.cpp
+++ b/js/src/vm/Unicode.cpp
@@ -3220,10 +3220,9 @@ js::unicode::AppendUpperCaseSpecialCasin
         return;
       case 0xFB17: // ARMENIAN SMALL LIGATURE MEN XEH
         elements[(*index)++] = 0x0544; // ARMENIAN CAPITAL LETTER MEN
         elements[(*index)++] = 0x053D; // ARMENIAN CAPITAL LETTER XEH
         return;
     }
 
     MOZ_ASSERT_UNREACHABLE("Bad character input.");
-    return;
 }
--- a/js/src/wasm/WasmCode.cpp
+++ b/js/src/wasm/WasmCode.cpp
@@ -183,18 +183,16 @@ SendCodeRangesToProfiler(const CodeSegme
             writePerfSpewerWasmFunctionMap(start, size, file, line, column, name.begin());
         }
 #endif
 #ifdef MOZ_VTUNE
         if (vtune::IsProfilingActive())
             vtune::MarkWasm(vtune::GenerateUniqueMethodID(), name.begin(), (void*)start, size);
 #endif
     }
-
-    return;
 }
 
 /* static */ UniqueConstCodeSegment
 CodeSegment::create(Tier tier,
                     MacroAssembler& masm,
                     const ShareableBytes& bytecode,
                     const LinkDataTier& linkData,
                     const Metadata& metadata)
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -1235,17 +1235,16 @@ ReflowInput::CalculateBorderPaddingMargi
   nscoord outside = paddingStartEnd + borderStartEnd + marginStartEnd;
   nscoord inside = 0;
   if (mStylePosition->mBoxSizing == StyleBoxSizing::Border) {
     inside = borderStartEnd + paddingStartEnd;
   }
   outside -= inside;
   *aInsideBoxSizing = inside;
   *aOutsideBoxSizing = outside;
-  return;
 }
 
 /**
  * Returns true iff a pre-order traversal of the normal child
  * frames rooted at aFrame finds no non-empty frame before aDescendant.
  */
 static bool
 AreAllEarlierInFlowFramesEmpty(nsIFrame* aFrame,
--- a/layout/generic/nsFrameSelection.cpp
+++ b/layout/generic/nsFrameSelection.cpp
@@ -612,18 +612,16 @@ nsFrameSelection::SetCaretBidiLevel(nsBi
   // If the current level is undefined, we have just inserted new text.
   // In this case, we don't want to reset the keyboard language
   mCaretBidiLevel = aLevel;
 
   RefPtr<nsCaret> caret;
   if (mShell && (caret = mShell->GetCaret())) {
     caret->SchedulePaint();
   }
-
-  return;
 }
 
 nsBidiLevel
 nsFrameSelection::GetCaretBidiLevel() const
 {
   return mCaretBidiLevel;
 }
 
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -4620,25 +4620,23 @@ nsTextFrame::GetPrefISize(gfxContext *aR
   return nsLayoutUtils::PrefISizeFromInline(this, aRenderingContext);
 }
 
 /* virtual */ void
 nsContinuingTextFrame::AddInlineMinISize(gfxContext *aRenderingContext,
                                          InlineMinISizeData *aData)
 {
   // Do nothing, since the first-in-flow accounts for everything.
-  return;
 }
 
 /* virtual */ void
 nsContinuingTextFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
                                           InlinePrefISizeData *aData)
 {
   // Do nothing, since the first-in-flow accounts for everything.
-  return;
 }
 
 //----------------------------------------------------------------------
 
 #if defined(DEBUG_rbs) || defined(DEBUG_bzbarsky)
 static void
 VerifyNotDirty(nsFrameState state)
 {
--- a/layout/inspector/inDOMUtils.cpp
+++ b/layout/inspector/inDOMUtils.cpp
@@ -579,17 +579,16 @@ static void GetColorsForProperty(const u
     size_t size;
     const char * const *allColorNames = NS_AllColorNames(&size);
     nsString* utf16Names = aArray.AppendElements(size);
     for (size_t i = 0; i < size; i++) {
       CopyASCIItoUTF16(allColorNames[i], utf16Names[i]);
     }
     InsertNoDuplicates(aArray, NS_LITERAL_STRING("currentColor"));
   }
-  return;
 }
 
 static void GetOtherValuesForProperty(const uint32_t aParserVariant,
                                       nsTArray<nsString>& aArray)
 {
   if (aParserVariant & VARIANT_AUTO) {
     InsertNoDuplicates(aArray, NS_LITERAL_STRING("auto"));
   }
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -3944,17 +3944,16 @@ nsCSSRuleProcessor::RefreshRuleCascade(n
 #endif
       }
 
       // Ensure that the current one is always mRuleCascades.
       newCascade->mNext = mRuleCascades;
       mRuleCascades = newCascade.forget();
     }
   }
-  return;
 }
 
 /* static */ bool
 nsCSSRuleProcessor::SelectorListMatches(Element* aElement,
                                         TreeMatchContext& aTreeMatchContext,
                                         nsCSSSelectorList* aSelectorList)
 {
   MOZ_ASSERT(!aTreeMatchContext.mForScopedStyle,
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -2730,17 +2730,16 @@ nsTableFrame::HomogenousInsertFrames(Chi
 
   PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
                                                NS_FRAME_HAS_DIRTY_CHILDREN);
   SetGeometryDirty();
 #ifdef DEBUG_TABLE_CELLMAP
   printf("=== TableFrame::InsertFrames\n");
   Dump(true, true, true);
 #endif
-  return;
 }
 
 void
 nsTableFrame::DoRemoveFrame(ChildListID     aListID,
                             nsIFrame*       aOldFrame)
 {
   if (aListID == kColGroupList) {
     nsIFrame* nextColGroupFrame = aOldFrame->GetNextSibling();
--- a/layout/xul/nsXULTooltipListener.cpp
+++ b/layout/xul/nsXULTooltipListener.cpp
@@ -560,18 +560,16 @@ GetImmediateChild(nsIContent* aContent, 
     nsIContent *child = aContent->GetChildAt(i);
 
     if (child->IsXULElement(aTag)) {
       *aResult = child;
       NS_ADDREF(*aResult);
       return;
     }
   }
-
-  return;
 }
 
 nsresult
 nsXULTooltipListener::FindTooltip(nsIContent* aTarget, nsIContent** aTooltip)
 {
   if (!aTarget)
     return NS_ERROR_NULL_POINTER;
 
--- a/media/mtransport/nricectx.cpp
+++ b/media/mtransport/nricectx.cpp
@@ -1165,11 +1165,9 @@ void NrIceCtx::SetGatheringState(Gatheri
 // Reimplement nr_ice_compute_codeword to avoid copyright issues
 void nr_ice_compute_codeword(char *buf, int len,char *codeword) {
     UINT4 c;
 
     r_crc32(buf,len,&c);
 
     PL_Base64Encode(reinterpret_cast<char*>(&c), 3, codeword);
     codeword[4] = 0;
-
-    return;
 }
--- a/media/webrtc/signaling/src/common/browser_logging/WebRtcLog.cpp
+++ b/media/webrtc/signaling/src/common/browser_logging/WebRtcLog.cpp
@@ -191,17 +191,16 @@ void ConfigWebRtcLog(mozilla::LogLevel l
     }
   }
 #endif
 
   if (XRE_IsParentProcess()) {
     // Capture the final choice for the trace setting.
     mozilla::Preferences::SetCString("media.webrtc.debug.log_file", aLogFile);
   }
-  return;
 }
 
 void StartWebRtcLog(uint32_t log_level)
 {
   if (gWebRtcTraceLoggingOn && log_level != 0) {
     return;
   }
 
@@ -221,17 +220,16 @@ void StartWebRtcLog(uint32_t log_level)
   GetWebRtcLogPrefs(&trace_mask, &log_file, &aec_log_dir, &multi_log);
   mozilla::LogLevel level = CheckOverrides(&trace_mask, &log_file, &multi_log);
 
   if (trace_mask == 0) {
     trace_mask = log_level;
   }
 
   ConfigWebRtcLog(level, trace_mask, log_file, aec_log_dir, multi_log);
-  return;
 
 }
 
 void EnableWebRtcLog()
 {
   if (gWebRtcTraceLoggingOn) {
     return;
   }
@@ -239,17 +237,16 @@ void EnableWebRtcLog()
   uint32_t trace_mask = 0;
   bool multi_log = false;
   nsAutoCString log_file;
   nsAutoCString aec_log_dir;
 
   GetWebRtcLogPrefs(&trace_mask, &log_file, &aec_log_dir, &multi_log);
   mozilla::LogLevel level = CheckOverrides(&trace_mask, &log_file, &multi_log);
   ConfigWebRtcLog(level, trace_mask, log_file, aec_log_dir, multi_log);
-  return;
 }
 
 // Called when we destroy the singletons from PeerConnectionCtx or if the
 // user changes logging in about:webrtc
 void StopWebRtcLog()
 {
   // TODO(NG) strip/fix gWebRtcTraceLoggingOn which is never set to true
   webrtc::Trace::set_level_filter(webrtc::kTraceNone);
--- a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
+++ b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
@@ -525,17 +525,16 @@ WebrtcGlobalInformation::GetAllStats(
   } else {
     // Just send back an empty report.
     rv = NS_OK;
     request->Complete();
     StatsRequest::Delete(request->mRequestId);
   }
 
   aRv = rv;
-  return;
 }
 
 static nsresult
 RunLogQuery(const nsCString& aPattern,
             WebrtcGlobalChild* aThisChild,
             const int aRequestId)
 {
   nsresult rv;
@@ -654,17 +653,16 @@ WebrtcGlobalInformation::GetLogging(
 
   nsresult rv = RunLogQuery(request->mPattern, nullptr, request->mRequestId);
 
   if (NS_FAILED(rv)) {
     LogRequest::Delete(request->mRequestId);
   }
 
   aRv = rv;
-  return;
 }
 
 static int32_t sLastSetLevel = 0;
 static bool sLastAECDebug = false;
 
 void
 WebrtcGlobalInformation::SetDebugLevel(const GlobalObject& aGlobal, int32_t aLevel)
 {
@@ -801,17 +799,16 @@ WebrtcGlobalParent::Dealloc(WebrtcGlobal
   WebrtcContentParents::Dealloc(aActor);
   return true;
 }
 
 void
 WebrtcGlobalParent::ActorDestroy(ActorDestroyReason aWhy)
 {
   mShutdown = true;
-  return;
 }
 
 mozilla::ipc::IPCResult
 WebrtcGlobalParent::Recv__delete__()
 {
   return IPC_OK();
 }
 
--- a/mfbt/LinkedList.h
+++ b/mfbt/LinkedList.h
@@ -522,17 +522,16 @@ public:
    * Remove all the elements from the list.
    *
    * This runs in time linear to the list's length, because we have to mark
    * each element as not in the list.
    */
   void clear()
   {
     while (popFirst()) {
-      continue;
     }
   }
 
   /*
    * Allow range-based iteration:
    *
    *     for (MyElementType* elt : myList) { ... }
    */
--- a/mfbt/SplayTree.h
+++ b/mfbt/SplayTree.h
@@ -83,17 +83,16 @@ public:
     if (!mRoot) {
       mRoot = aValue;
       return;
     }
     T* last = lookup(*aValue);
     int cmp = Comparator::compare(*aValue, *last);
 
     finishInsertion(last, cmp, aValue);
-    return;
   }
 
   T* findOrInsert(const T& aValue);
 
   T* remove(const T& aValue)
   {
     T* last = lookup(aValue);
     MOZ_ASSERT(last, "This tree must contain the element being removed.");
--- a/mozglue/misc/TimeStamp_posix.cpp
+++ b/mozglue/misc/TimeStamp_posix.cpp
@@ -187,18 +187,16 @@ TimeStamp::Startup()
   // find the number of significant digits in sResolution, for the
   // sake of ToSecondsSigDigits()
   for (sResolutionSigDigs = 1;
        !(sResolutionSigDigs == sResolution ||
          10 * sResolutionSigDigs > sResolution);
        sResolutionSigDigs *= 10);
 
   gInitialized = true;
-
-  return;
 }
 
 void
 TimeStamp::Shutdown()
 {
 }
 
 TimeStamp
--- a/netwerk/base/nsURLParsers.cpp
+++ b/netwerk/base/nsURLParsers.cpp
@@ -478,17 +478,17 @@ nsAuthURLParser::ParseAuthority(const ch
         if (port)
             *port = -1;
         return NS_OK;
     }
 
     // search backwards for @
     const char *p = auth + authLen - 1;
     for (; (*p != '@') && (p > auth); --p) {
-      continue;
+        continue; 
     }
     if ( *p == '@' ) {
         // auth = <user-info@server-info>
         rv = ParseUserInfo(auth, p - auth,
                            usernamePos, usernameLen,
                            passwordPos, passwordLen);
         if (NS_FAILED(rv)) return rv;
         rv = ParseServerInfo(p + 1, authLen - (p - auth + 1),
--- a/netwerk/cookie/CookieServiceParent.cpp
+++ b/netwerk/cookie/CookieServiceParent.cpp
@@ -49,17 +49,16 @@ CreateDummyChannel(nsIURI* aHostURI, Ori
                 nsIContentPolicy::TYPE_INVALID);
   nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(dummyChannel);
   if (!pbChannel) {
     return;
   }
 
   pbChannel->SetPrivate(aAttrs.mPrivateBrowsingId > 0);
   dummyChannel.forget(aChannel);
-  return;
 }
 
 }
 
 namespace mozilla {
 namespace net {
 
 CookieServiceParent::CookieServiceParent()
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -753,17 +753,16 @@ FTPChannelParent::DivertTo(nsIStreamList
   mDivertToListener = aListener;
 
   // Call OnStartRequest and SendDivertMessages asynchronously to avoid
   // reentering client context.
   NS_DispatchToCurrentThread(
     NewRunnableMethod("net::FTPChannelParent::StartDiversion",
                       this,
                       &FTPChannelParent::StartDiversion));
-  return;
 }
 
 void
 FTPChannelParent::StartDiversion()
 {
   if (NS_WARN_IF(!mDivertingFromChild)) {
     MOZ_ASSERT(mDivertingFromChild,
                "Cannot StartDiversion if diverting is not set!");
--- a/netwerk/protocol/http/Http2Compression.cpp
+++ b/netwerk/protocol/http/Http2Compression.cpp
@@ -1453,17 +1453,16 @@ Http2Compressor::ProcessHeader(const nvP
     return;
   }
 
   // emit an index
   DoOutput(kIndex, &inputPair, matchedIndex);
 
   LOG(("Compressor state after index"));
   DumpState();
-  return;
 }
 
 void
 Http2Compressor::EncodeTableSizeChange(uint32_t newMaxSize)
 {
   uint32_t offset = mOutput->Length();
   EncodeInteger(5, newMaxSize);
   uint8_t *startByte = reinterpret_cast<uint8_t *>(mOutput->BeginWriting()) + offset;
--- a/netwerk/protocol/http/Http2Stream.cpp
+++ b/netwerk/protocol/http/Http2Stream.cpp
@@ -1152,17 +1152,16 @@ Http2Stream::SetAllHeadersReceived()
     AdjustInitialWindow();
   }
 
   mAllHeadersReceived = 1;
   if (mIsTunnel) {
     MapStreamToHttpConnection();
     ClearTransactionsBlockedOnTunnel();
   }
-  return;
 }
 
 bool
 Http2Stream::AllowFlowControlledWrite()
 {
   return (mSession->ServerSessionWindow() > 0) && (mServerReceiveWindow > 0);
 }
 
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1336,17 +1336,16 @@ HttpChannelParent::MaybeFlushPendingDive
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
 
   if (mDivertListener) {
     DivertTo(mDivertListener);
   }
 
-  return;
 }
 
 void
 HttpChannelParent::ResponseSynthesized()
 {
   // Suspend now even though the FinishSynthesizeResponse runnable has
   // not executed.  We want to suspend after we get far enough to trigger
   // the synthesis, but not actually allow the nsHttpChannel to trigger
@@ -1971,17 +1970,16 @@ HttpChannelParent::DivertTo(nsIStreamLis
   mDivertListener = aListener;
 
   // Call OnStartRequest and SendDivertMessages asynchronously to avoid
   // reentering client context.
   NS_DispatchToCurrentThread(
     NewRunnableMethod("net::HttpChannelParent::StartDiversion",
                       this,
                       &HttpChannelParent::StartDiversion));
-  return;
 }
 
 void
 HttpChannelParent::StartDiversion()
 {
   LOG(("HttpChannelParent::StartDiversion [this=%p]\n", this));
   if (NS_WARN_IF(!mDivertingFromChild)) {
     MOZ_ASSERT(mDivertingFromChild,
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -977,17 +977,16 @@ void
 SpdyConnectTransaction::ForcePlainText()
 {
   MOZ_ASSERT(OnSocketThread(), "not on socket thread");
   MOZ_ASSERT(!mInputDataUsed && !mInputDataSize && !mInputDataOffset);
   MOZ_ASSERT(!mForcePlainText);
   MOZ_ASSERT(!mTunnelTransport, "call before mapstreamtohttpconnection");
 
   mForcePlainText = true;
-  return;
 }
 
 void
 SpdyConnectTransaction::MapStreamToHttpConnection(nsISocketTransport *aTransport,
                                                   nsHttpConnectionInfo *aConnInfo)
 {
   mConnInfo = aConnInfo;
 
--- a/netwerk/protocol/http/nsAHttpConnection.h
+++ b/netwerk/protocol/http/nsAHttpConnection.h
@@ -63,25 +63,23 @@ public:
     // and it is ready to write to the network it may need to know the
     // transaction that has data to write. This is only an issue for
     // multiplexed protocols like SPDY - h1
     // implicitly has this information in a 1:1 relationship with the
     // transaction(s) they manage.
     virtual void TransactionHasDataToWrite(nsAHttpTransaction *)
     {
         // by default do nothing - only multiplexed protocols need to overload
-        return;
     }
 
     // This is the companion to *HasDataToWrite() for the case
     // when a gecko caller has called ResumeRecv() after being paused
     virtual void TransactionHasDataToRecv(nsAHttpTransaction *)
     {
         // by default do nothing - only multiplexed protocols need to overload
-        return;
     }
 
     // called by the connection manager to close a transaction being processed
     // by this connection.
     //
     // @param transaction
     //        the transaction being closed.
     // @param reason
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -2839,18 +2839,16 @@ nsHttpChannel::HandleAsyncAPIRedirect()
                                             nsIChannelEventSink::REDIRECT_PERMANENT);
     if (NS_FAILED(rv)) {
         rv = ContinueAsyncRedirectChannelToURI(rv);
         if (NS_FAILED(rv)) {
             LOG(("ContinueAsyncRedirectChannelToURI failed (%08x) [this=%p]\n",
                  static_cast<uint32_t>(rv), this));
         }
     }
-
-    return;
 }
 
 nsresult
 nsHttpChannel::StartRedirectChannelToURI(nsIURI *upgradedURI, uint32_t flags)
 {
     nsresult rv = NS_OK;
     LOG(("nsHttpChannel::StartRedirectChannelToURI()\n"));
 
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -600,17 +600,16 @@ DataChannelConnection::CompleteConnect(T
       // This also avoids issues with calling TransportFlow stuff on Mainthread
       return;
     }
   }
   // Note: currently this doesn't actually notify the application
   Dispatch(do_AddRef(new DataChannelOnMessageAvailable(
              DataChannelOnMessageAvailable::ON_CONNECTION,
              this)));
-  return;
 }
 
 // Process any pending Opens
 void
 DataChannelConnection::ProcessQueuedOpens()
 {
   // The nsDeque holds channels with an AddRef applied.  Another reference
   // (may) be held by the DOMDataChannel, unless it's been GC'd.  No other
--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
@@ -52,18 +52,16 @@ mozTXTToHTMLConv::EscapeChar(const char1
         aStringToAppendTo.AppendLiteral("&quot;");
         break;
       }
       // else fall through
       MOZ_FALLTHROUGH;
     default:
       aStringToAppendTo += ch;
     }
-
-    return;
 }
 
 // EscapeStr takes the passed in string and
 // escapes it IN PLACE.
 void
 mozTXTToHTMLConv::EscapeStr(nsString& aInString, bool inAttribute)
 {
   // the replace substring routines
@@ -382,17 +380,16 @@ mozTXTToHTMLConv::CalculateURLBoundaries
 
   txtURL.Append(&aInString[start], end - start + 1);
   txtURL.StripWhitespace();
 
   // FIX ME
   nsAutoString temp2;
   ScanTXT(&aInString[descstart], pos - descstart, ~kURLs /*prevents loop*/ & whathasbeendone, temp2);
   replaceBefore = temp2.Length();
-  return;
 }
 
 bool mozTXTToHTMLConv::ShouldLinkify(const nsCString& aURL)
 {
   if (!mIOService)
     return false;
 
   nsAutoCString scheme;
--- a/netwerk/streamconv/converters/nsUnknownDecoder.cpp
+++ b/netwerk/streamconv/converters/nsUnknownDecoder.cpp
@@ -696,17 +696,16 @@ bool nsUnknownDecoder::LastDitchSniff(ns
     }
   }
 
   // Now see whether the buffer has any non-text chars.  If not, then let's
   // just call it text/plain...
   //
   uint32_t i;
   for (i = 0; i < testDataLen && IS_TEXT_CHAR(testData[i]); i++) {
-    continue;
   }
 
   if (i == testDataLen) {
     mContentType = TEXT_PLAIN;
   }
   else {
     mContentType = APPLICATION_OCTET_STREAM;
   }
--- a/parser/html/nsHtml5Parser.cpp
+++ b/parser/html/nsHtml5Parser.cpp
@@ -708,17 +708,16 @@ nsHtml5Parser::ParseUntilBlocked()
         mTreeBuilder->Flush();
         rv = mExecutor->FlushDocumentWrite();
         NS_ENSURE_SUCCESS(rv, rv);
       }
       if (mBlocked) {
         return NS_OK;
       }
     }
-    continue;
   }
 }
 
 nsresult
 nsHtml5Parser::Initialize(nsIDocument* aDoc,
                           nsIURI* aURI,
                           nsISupports* aContainer,
                           nsIChannel* aChannel)
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -1501,17 +1501,16 @@ nsHtml5StreamParser::ParseAvailableData(
         mTreeBuilder->SetOpSink(speculation);
         mSpeculations.AppendElement(speculation); // adopts the pointer
         mSpeculating = true;
       }
       if (IsTerminatedOrInterrupted()) {
         return;
       }
     }
-    continue;
   }
 }
 
 class nsHtml5StreamParserContinuation : public Runnable
 {
 private:
   nsHtml5StreamParserPtr mStreamParser;
 
--- a/parser/html/nsHtml5Tokenizer.cpp
+++ b/parser/html/nsHtml5Tokenizer.cpp
@@ -1801,17 +1801,16 @@ nsHtml5Tokenizer::stateLoop(int32_t stat
               charRefBufMark = charRefBufLen;
             }
             NS_HTML5_BREAK(outer);
           }
           if (hi < lo) {
             NS_HTML5_BREAK(outer);
           }
           appendCharRefBuf(c);
-          continue;
         }
         outer_end: ;
         if (candidate == -1) {
           if (P::reportErrors) {
             errNoNamedCharacterMatch();
           }
           emitOrAppendCharRefBuf(returnState);
           if (!(returnState & DATA_AND_RCDATA_MASK)) {
@@ -4350,17 +4349,16 @@ nsHtml5Tokenizer::eof()
             } else {
               NS_HTML5_BREAK(loloop);
             }
           }
           loloop_end: ;
           if (hi < lo) {
             NS_HTML5_BREAK(outer);
           }
-          continue;
         }
         outer_end: ;
         if (candidate == -1) {
           errNoNamedCharacterMatch();
           emitOrAppendCharRefBuf(returnState);
           state = returnState;
           NS_HTML5_CONTINUE(eofloop);
         } else {
@@ -4430,17 +4428,16 @@ nsHtml5Tokenizer::eof()
       case DATA:
       default: {
         NS_HTML5_BREAK(eofloop);
       }
     }
   }
   eofloop_end: ;
   tokenHandler->eof();
-  return;
 }
 
 void 
 nsHtml5Tokenizer::emitDoctypeToken(int32_t pos)
 {
   cstart = pos + 1;
   tokenHandler->doctype(doctypeName, publicIdentifier, systemIdentifier, forceQuirks);
   doctypeName = nullptr;
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -199,17 +199,16 @@ nsHtml5TreeBuilder::doctype(nsIAtom* nam
       documentModeInternal(ALMOST_STANDARDS_MODE, publicIdentifier, systemIdentifier, false);
     } else {
       documentModeInternal(STANDARDS_MODE, publicIdentifier, systemIdentifier, false);
     }
     mode = BEFORE_HTML;
     return;
   }
   errStrayDoctype();
-  return;
 }
 
 void 
 nsHtml5TreeBuilder::comment(char16_t* buf, int32_t start, int32_t length)
 {
   needToDropLF = false;
   if (!isInForeign()) {
     switch(mode) {
@@ -227,17 +226,16 @@ nsHtml5TreeBuilder::comment(char16_t* bu
       }
       default: {
         break;
       }
     }
   }
   flushCharacters();
   appendComment(stack[currentPtr]->node, buf, start, length);
-  return;
 }
 
 void 
 nsHtml5TreeBuilder::characters(const char16_t* buf, int32_t start, int32_t length)
 {
   if (tokenizer->isViewingXmlSource()) {
     return;
   }
@@ -3338,17 +3336,16 @@ nsHtml5TreeBuilder::closeTheCell(int32_t
   if (!!MOZ_UNLIKELY(mViewSource) && eltPos != currentPtr) {
     errUnclosedElementsCell(eltPos);
   }
   while (currentPtr >= eltPos) {
     pop();
   }
   clearTheListOfActiveFormattingElementsUpToTheLastMarker();
   mode = IN_ROW;
-  return;
 }
 
 int32_t 
 nsHtml5TreeBuilder::findLastInTableScopeTdTh()
 {
   for (int32_t i = currentPtr; i > 0; i--) {
     nsIAtom* name = stack[i]->name;
     if (stack[i]->ns == kNameSpaceID_XHTML) {
--- a/parser/html/nsHtml5TreeBuilderCppSupplement.h
+++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h
@@ -919,17 +919,16 @@ nsHtml5TreeBuilder::elementPopped(int32_
   }
   if (mSpeculativeLoadStage && aName == nsGkAtoms::picture) {
     // mSpeculativeLoadStage is non-null only in the off-the-main-thread
     // tree builder, which handles the network stream
     //
     // See comments in nsHtml5SpeculativeLoad.h about <picture> preloading
     mSpeculativeLoadQueue.AppendElement()->InitEndPicture();
   }
-  return;
 }
 
 void
 nsHtml5TreeBuilder::accumulateCharacters(const char16_t* aBuf, int32_t aStart, int32_t aLength)
 {
   MOZ_RELEASE_ASSERT(charBufferLen + aLength <= charBuffer.length,
                      "About to memcpy past the end of the buffer!");
   memcpy(charBuffer + charBufferLen, aBuf + aStart, sizeof(char16_t) * aLength);
--- a/security/manager/ssl/nsKeygenThread.cpp
+++ b/security/manager/ssl/nsKeygenThread.cpp
@@ -248,11 +248,9 @@ void nsKeygenThread::Run(void)
 
 void nsKeygenThread::Join()
 {
   if (!threadHandle)
     return;
 
   PR_JoinThread(threadHandle);
   threadHandle = nullptr;
-
-  return;
 }
--- a/toolkit/components/ctypes/tests/jsctypes-test.cpp
+++ b/toolkit/components/ctypes/tests/jsctypes-test.cpp
@@ -32,17 +32,16 @@ template <> struct ValueTraits<bool> {
            j || k || l || m || n || o || p || q || r;
   }
 };
 
 void
 test_void_t_cdecl()
 {
   // do nothing
-  return;
 }
 
 // The "AndUnderscore" bit here is an unfortunate hack: the first argument to
 // DEFINE_CDECL_FUNCTIONS and DEFINE_STDCALL_FUNCTIONS, in addition to being a
 // type, may also be a *macro* on NetBSD -- #define int8_t __int8_t and so on.
 // See <http://mail-index.netbsd.org/tech-toolchain/2014/12/18/msg002479.html>.
 // And unfortunately, passing that macro as an argument to this macro causes it
 // to be expanded -- producing get___int8_t_cdecl() and so on.  Concatenating
--- a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp
+++ b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp
@@ -121,17 +121,16 @@ void DiskSpaceWatcher::UpdateState(bool 
   const char16_t stateFree[] = { 'f', 'r', 'e', 'e', 0 };
 
   nsCOMPtr<nsISupports> subject;
   CallQueryInterface(gDiskSpaceWatcher.get(), getter_AddRefs(subject));
   MOZ_ASSERT(subject);
   observerService->NotifyObservers(subject,
                                    DISKSPACEWATCHER_OBSERVER_TOPIC,
                                    sIsDiskFull ? stateFull : stateFree);
-  return;
 }
 
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(DiskSpaceWatcher,
                                          DiskSpaceWatcher::FactoryCreate)
 
 NS_DEFINE_NAMED_CID(NS_DISKSPACEWATCHER_CID);
 
 static const mozilla::Module::CIDEntry kDiskSpaceWatcherCIDs[] = {
--- a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp
+++ b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp
@@ -1221,18 +1221,16 @@ nsPerformanceStatsService::CommitGroup(u
   if (totalTimeDelta >= mJankAlertThreshold) {
     if (!group->HasPendingAlert()) {
       if (mPendingAlerts.append(group)) {
         group->SetHasPendingAlert(true);
       }
       return;
     }
   }
-
-  return;
 }
 
 nsresult
 nsPerformanceStatsService::GetResources(uint64_t* userTime,
                                         uint64_t* systemTime) const {
   MOZ_ASSERT(userTime);
   MOZ_ASSERT(systemTime);
 
--- a/toolkit/components/telemetry/tests/modules-test.cpp
+++ b/toolkit/components/telemetry/tests/modules-test.cpp
@@ -19,11 +19,10 @@
  *
  * Clearly, for testUnicodePDB and testNoPDB both a 32-bit and a 64-bit version
  * have to be compiled, using the 32-bit and 64-bit MSVC toolchains.
  *
  */
 
 void nothing()
 {
-  return;
 }
 
--- a/toolkit/components/url-classifier/LookupCache.cpp
+++ b/toolkit/components/url-classifier/LookupCache.cpp
@@ -276,18 +276,16 @@ LookupCache::GetCacheInfo(nsIUrlClassifi
       entry->matches.AppendElement(
         static_cast<nsIUrlClassifierPositiveCacheEntry*>(match));
     }
 
     info->entries.AppendElement(static_cast<nsIUrlClassifierCacheEntry*>(entry));
   }
 
   NS_ADDREF(*aCache = info);
-
-  return;
 }
 
 /* static */ bool
 LookupCache::IsCanonicalizedIP(const nsACString& aHost)
 {
   // The canonicalization process will have left IP addresses in dotted
   // decimal with no surprises.
   uint32_t i1, i2, i3, i4;
--- a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
@@ -717,17 +717,16 @@ nsUrlClassifierUtils::ParseIPAddress(con
 
     if (_retval.IsEmpty()) {
       _retval.Assign(canonical);
     } else {
       _retval.Append('.');
       _retval.Append(canonical);
     }
   }
-  return;
 }
 
 void
 nsUrlClassifierUtils::CanonicalNum(const nsACString& num,
                                    uint32_t bytes,
                                    bool allowOctal,
                                    nsACString& _retval)
 {
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1570,17 +1570,16 @@ nsExternalAppHandler::MaybeApplyDecoding
                                                    &applyConversion);
           }
         }
       }
     }
   }
 
   encChannel->SetApplyConversion( applyConversion );
-  return;
 }
 
 NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest *request, nsISupports * aCtxt)
 {
   NS_PRECONDITION(request, "OnStartRequest without request?");
 
   // Set mTimeDownloadStarted here as the download has already started and
   // we want to record the start time before showing the filepicker.
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -862,17 +862,16 @@ WidgetKeyboardEvent::GetAccessKeyCandida
   // or without Shift key causes non-ASCII space.  For such keyboard layouts,
   // we should guarantee that the key press works as an ASCII white space key
   // press.  However, if the space key is assigned to a function key, it
   // shouldn't work as a space key.
   if (mKeyNameIndex == KEY_NAME_INDEX_USE_STRING &&
       mCodeNameIndex == CODE_NAME_INDEX_Space && mCharCode != ' ') {
     aCandidates.AppendElement(' ');
   }
-  return;
 }
 
 /* static */ void
 WidgetKeyboardEvent::Shutdown()
 {
   delete sKeyNameIndexHashtable;
   sKeyNameIndexHashtable = nullptr;
   delete sCodeNameIndexHashtable;
--- a/widget/gtkxtbin/gtk2xtbin.c
+++ b/widget/gtkxtbin/gtk2xtbin.c
@@ -849,12 +849,10 @@ xt_add_focus_listener_tree ( Widget tree
     return;
 
   for(i=0; i<nchildren; ++i) {
     Widget child = XtWindowToWidget(dpy, children[i]);
     if (child) 
       xt_add_focus_listener_tree( child, user_data);
   }
   XFree((void*)children);
-
-  return;
 }
 
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -591,17 +591,16 @@ nsComponentManagerImpl::ManifestManifest
 
 void
 nsComponentManagerImpl::ManifestBinaryComponent(ManifestProcessingContext& aCx,
                                                 int aLineNo,
                                                 char* const* aArgv)
 {
   LogMessageWithContext(aCx.mFile, aLineNo,
                         "Binary XPCOM components are no longer supported.");
-  return;
 }
 
 static void
 DoRegisterXPT(FileLocation& aFile)
 {
   uint32_t len;
   FileLocation::Data data;
   UniquePtr<char[]> buf;
--- a/xpcom/tests/gtest/TestSTLWrappers.cpp
+++ b/xpcom/tests/gtest/TestSTLWrappers.cpp
@@ -60,17 +60,16 @@ void ShouldAbort()
     } CATCH(const std::out_of_range&) {
       fputs("TEST-FAIL | TestSTLWrappers.cpp | caught an exception?\n",
             stderr);
       return;
     }
 
     fputs("TEST-FAIL | TestSTLWrappers.cpp | didn't abort()?\n",
           stderr);
-    return;
 }
 
 #ifdef XP_WIN
 TEST(STLWrapper, DISABLED_ShouldAbortDeathTest)
 #else
 TEST(STLWrapper, ShouldAbortDeathTest)
 #endif
 {
--- a/xpcom/threads/SchedulerGroup.cpp
+++ b/xpcom/threads/SchedulerGroup.cpp
@@ -120,18 +120,16 @@ AutoCollectVsyncTelemetry::CollectTeleme
   Telemetry::Accumulate(eventsId, mKey, duration);
   Telemetry::Accumulate(totalId, duration);
 
   if (pendingVsync > mStart) {
     return;
   }
 
   Telemetry::Accumulate(Telemetry::CONTENT_JS_KNOWN_TICK_DELAY_MS, duration);
-
-  return;
 }
 
 } // namespace
 
 NS_IMPL_ISUPPORTS(SchedulerEventTarget,
                   SchedulerEventTarget,
                   nsIEventTarget,
                   nsISerialEventTarget)