From 8d9c7bc2c5c6870e175d263d17fb5b08382ae6f7 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 20 Oct 2019 19:29:06 +0000 Subject: [PATCH] Bug 1589953 - Initialize `read` in AlternativeDataStreamListener::OnDataAvailable(); r=edgar Differential Revision: https://phabricator.services.mozilla.com/D49849 --HG-- extra : moz-landing-system : lando --- dom/fetch/FetchDriver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp index 21942ef95e98..1af22a11a646 100644 --- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -261,7 +261,7 @@ AlternativeDataStreamListener::OnDataAvailable(nsIRequest* aRequest, uint32_t aCount) { if (mStatus == AlternativeDataStreamListener::LOADING) { MOZ_ASSERT(mPipeAlternativeOutputStream); - uint32_t read; + uint32_t read = 0; return aInputStream->ReadSegments( NS_CopySegmentToStream, mPipeAlternativeOutputStream, aCount, &read); }