Skip to content

Commit

Permalink
Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r…
Browse files Browse the repository at this point in the history
…=xpcom-reviewers,necko-reviewers,valentin,nika

There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
  • Loading branch information
amccreight committed Sep 28, 2022
1 parent 31ae4fa commit 2da84b8
Show file tree
Hide file tree
Showing 75 changed files with 0 additions and 82 deletions.
1 change: 0 additions & 1 deletion caps/NullPrincipal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "NullPrincipal.h"
#include "DefaultURI.h"
#include "nsSimpleURI.h"
#include "nsMemory.h"
#include "nsIClassInfoImpl.h"
#include "nsNetCID.h"
#include "nsError.h"
Expand Down
1 change: 0 additions & 1 deletion caps/nsJSPrincipals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "nsJSPrincipals.h"
#include "plstr.h"
#include "nsCOMPtr.h"
#include "nsMemory.h"
#include "nsStringBuffer.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/StaticPtr.h"
Expand Down
1 change: 0 additions & 1 deletion devtools/platform/JSDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "jsfriendapi.h"
#include "js/Wrapper.h"
#include "nsServiceManagerUtils.h"
#include "nsMemory.h"

#define JSDEBUGGER_CONTRACTID "@mozilla.org/jsdebugger;1"

Expand Down
1 change: 0 additions & 1 deletion dom/base/DOMException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "nsCOMPtr.h"
#include "mozilla/dom/Document.h"
#include "nsIException.h"
#include "nsMemory.h"
#include "xpcprivate.h"

#include "mozilla/dom/DOMExceptionBinding.h"
Expand Down
1 change: 0 additions & 1 deletion dom/base/nsTextFragment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "nsTextFragment.h"
#include "nsCRT.h"
#include "nsReadableUtils.h"
#include "nsMemory.h"
#include "nsBidiUtils.h"
#include "nsUnicharUtils.h"
#include "mozilla/CheckedInt.h"
Expand Down
1 change: 0 additions & 1 deletion dom/events/EventListenerService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "nsCOMArray.h"
#include "nsINode.h"
#include "nsJSUtils.h"
#include "nsMemory.h"
#include "nsServiceManagerUtils.h"
#include "nsArray.h"
#include "nsThreadUtils.h"
Expand Down
1 change: 0 additions & 1 deletion dom/file/MemoryBlobImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/SHA1.h"
#include "nsIMemoryReporter.h"
#include "nsMemory.h"
#include "nsPrintfCString.h"
#include "nsRFPService.h"
#include "nsStringStream.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mozilla/Services.h"
#include "nsDirectoryServiceDefs.h"
#include "nsDirectoryServiceUtils.h"
#include "nsMemory.h"
#include "nsNetUtil.h"
#include "nsContentUtils.h"
#include "nsIChannel.h"
Expand Down
1 change: 0 additions & 1 deletion dom/offline/nsDOMOfflineResourceList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "nsError.h"
#include "mozilla/Components.h"
#include "mozilla/dom/DOMStringList.h"
#include "nsMemory.h"
#include "nsNetUtil.h"
#include "nsNetCID.h"
#include "nsServiceManagerUtils.h"
Expand Down
1 change: 0 additions & 1 deletion dom/xslt/xpath/txNodeSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "txNodeSet.h"
#include "txLog.h"
#include "nsMemory.h"
#include "txXPathTreeWalker.h"
#include <algorithm>

Expand Down
1 change: 0 additions & 1 deletion dom/xslt/xslt/txMozillaXSLTProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "mozilla/dom/Document.h"
#include "nsIStringBundle.h"
#include "nsIURI.h"
#include "nsMemory.h"
#include "XPathResult.h"
#include "txExecutionState.h"
#include "txMozillaTextOutput.h"
Expand Down
1 change: 0 additions & 1 deletion editor/libeditor/InsertNodeTransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "nsDebug.h" // for NS_WARNING, etc.
#include "nsError.h" // for NS_ERROR_NULL_POINTER, etc.
#include "nsIContent.h" // for nsIContent
#include "nsMemory.h" // for nsMemory
#include "nsReadableUtils.h" // for ToNewCString
#include "nsString.h" // for nsString

Expand Down
1 change: 0 additions & 1 deletion editor/spellchecker/EditorSpellCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "nsThreadUtils.h" // for GetMainThreadSerialEventTarget
#include "nsVariant.h" // for nsIWritableVariant, etc
#include "nsLiteralString.h" // for NS_LITERAL_STRING, etc
#include "nsMemory.h" // for nsMemory
#include "nsRange.h"
#include "nsReadableUtils.h" // for ToNewUnicode, EmptyString, etc
#include "nsServiceManagerUtils.h" // for do_GetService
Expand Down
1 change: 0 additions & 1 deletion extensions/auth/nsAuthGSSAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mozilla/IntegerPrintfMacros.h"

#include "nsCOMPtr.h"
#include "nsMemory.h"
#include "nsNativeCharsetUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/SharedLibrary.h"
Expand Down
1 change: 0 additions & 1 deletion extensions/auth/nsAuthSSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "nsDNSService2.h"
#include "nsIDNSService.h"
#include "nsIDNSRecord.h"
#include "nsMemory.h"
#include "nsNetCID.h"
#include "nsServiceManagerUtils.h"
#include "nsCOMPtr.h"
Expand Down
1 change: 0 additions & 1 deletion extensions/auth/nsAuthSambaNTLM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "nsAuth.h"
#include "nsAuthSambaNTLM.h"
#include "nsMemory.h"
#include "nspr.h"
#include "prenv.h"
#include "plbase64.h"
Expand Down
1 change: 0 additions & 1 deletion extensions/spellcheck/src/mozEnglishWordUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "nsUnicodeProperties.h"
#include "nsCRT.h"
#include "mozilla/Likely.h"
#include "nsMemory.h"

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(mozEnglishWordUtils, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(mozEnglishWordUtils, Release)
Expand Down
1 change: 0 additions & 1 deletion gfx/src/nsThebesFontEnumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "nsError.h" // for NS_OK, NS_FAILED, nsresult
#include "nsAtom.h" // for nsAtom, NS_Atomize
#include "nsID.h"
#include "nsMemory.h" // for nsMemory
#include "nsString.h" // for nsAutoCString, nsAutoString, etc
#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc
#include "nscore.h" // for char16_t, NS_IMETHODIMP
Expand Down
1 change: 0 additions & 1 deletion gfx/thebes/gfxASurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIMemoryReporter.h"
#include "nsMemory.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Base64.h"
#include "mozilla/CheckedInt.h"
Expand Down
2 changes: 0 additions & 2 deletions gfx/thebes/gfxWindowsPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/gfxVars.h"

#include "nsMemory.h"

#include <dwmapi.h>
#include <d3d11.h>
#include <d2d1_1.h>
Expand Down
1 change: 0 additions & 1 deletion image/decoders/icon/mac/nsIconChannelCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "nsIInterfaceRequestorUtils.h"
#include "nsString.h"
#include "nsMimeTypes.h"
#include "nsMemory.h"
#include "nsIURL.h"
#include "nsNetCID.h"
#include "nsIPipe.h"
Expand Down
1 change: 0 additions & 1 deletion image/decoders/icon/win/nsIconChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsMimeTypes.h"
#include "nsMemory.h"
#include "nsIURL.h"
#include "nsIPipe.h"
#include "nsNetCID.h"
Expand Down
1 change: 0 additions & 1 deletion image/decoders/nsPNGDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "gfxPlatform.h"
#include "imgFrame.h"
#include "nsColor.h"
#include "nsMemory.h"
#include "nsRect.h"
#include "nspr.h"
#include "png.h"
Expand Down
1 change: 0 additions & 1 deletion intl/hyphenation/glue/nsHyphenationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "nsCRT.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsDirectoryServiceUtils.h"
#include "nsMemory.h"
#include "nsXULAppAPI.h"

using namespace mozilla;
Expand Down
1 change: 0 additions & 1 deletion intl/strres/nsStringBundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "nsStringBundleService.h"
#include "nsArrayEnumerator.h"
#include "nscore.h"
#include "nsMemory.h"
#include "nsNetUtil.h"
#include "nsComponentManagerUtils.h"
#include "nsServiceManagerUtils.h"
Expand Down
1 change: 0 additions & 1 deletion js/xpconnect/src/xpcprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
#include "nsIComponentRegistrar.h"
#include "nsISupportsPrimitives.h"
#include "nsISimpleEnumerator.h"
#include "nsMemory.h"
#include "nsIXPConnect.h"
#include "nsIXPCScriptable.h"
#include "nsIObserver.h"
Expand Down
1 change: 0 additions & 1 deletion js/xpconnect/tests/components/native/xpctest_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define xpctest_private_h___

#include "nsISupports.h"
#include "nsMemory.h"
#include "nsString.h"
#include "xpctest_attributes.h"
#include "xpctest_params.h"
Expand Down
1 change: 0 additions & 1 deletion layout/generic/nsFloatManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "nsIFrame.h"
#include "nsIFrameInlines.h"
#include "nsImageRenderer.h"
#include "nsMemory.h"

using namespace mozilla;
using namespace mozilla::image;
Expand Down
1 change: 0 additions & 1 deletion modules/libjar/zipwriter/nsDeflateConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "nsDeflateConverter.h"
#include "nsStringStream.h"
#include "nsComponentManagerUtils.h"
#include "nsMemory.h"
#include "nsCRT.h"
#include "plstr.h"
#include "mozilla/UniquePtr.h"
Expand Down
1 change: 0 additions & 1 deletion modules/libjar/zipwriter/nsZipDataStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "nsDeflateConverter.h"
#include "nsNetUtil.h"
#include "nsComponentManagerUtils.h"
#include "nsMemory.h"

#define ZIP_METHOD_STORE 0
#define ZIP_METHOD_DEFLATE 8
Expand Down
1 change: 0 additions & 1 deletion modules/libjar/zipwriter/nsZipHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "StreamFunctions.h"
#include "nsZipHeader.h"
#include "nsMemory.h"
#include "prtime.h"

#define ZIP_FILE_HEADER_SIGNATURE 0x04034b50
Expand Down
1 change: 0 additions & 1 deletion modules/libjar/zipwriter/nsZipWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "nsIStreamListener.h"
#include "nsIInputStreamPump.h"
#include "nsComponentManagerUtils.h"
#include "nsMemory.h"
#include "nsError.h"
#include "nsStreamUtils.h"
#include "nsThreadUtils.h"
Expand Down
1 change: 0 additions & 1 deletion netwerk/streamconv/converters/nsHTTPCompressConv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsHTTPCompressConv.h"
#include "nsMemory.h"
#include "plstr.h"
#include "nsCOMPtr.h"
#include "nsCRT.h"
Expand Down
1 change: 0 additions & 1 deletion netwerk/wifi/nsWifiAccessPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "nsWifiAccessPoint.h"
#include "nsString.h"
#include "nsMemory.h"
#include "mozilla/Logging.h"

extern mozilla::LazyLogModule gWifiMonitorLog;
Expand Down
1 change: 0 additions & 1 deletion parser/html/nsHtml5NamedCharacters.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "nscore.h"
#include "nsDebug.h"
#include "mozilla/Logging.h"
#include "nsMemory.h"

struct nsHtml5CharacterName {
uint16_t nameStart;
Expand Down
1 change: 0 additions & 1 deletion parser/html/nsHtml5NamedCharactersAccel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "nscore.h"
#include "nsDebug.h"
#include "mozilla/Logging.h"
#include "nsMemory.h"

class nsHtml5NamedCharactersAccel {
public:
Expand Down
1 change: 0 additions & 1 deletion storage/Variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <utility>

#include "nsIVariant.h"
#include "nsMemory.h"
#include "nsString.h"
#include "nsTArray.h"

Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageArgValueArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsError.h"
#include "nsMemory.h"
#include "nsString.h"

#include "mozStoragePrivateHelpers.h"
Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageAsyncStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <stdio.h>

#include "nsError.h"
#include "nsMemory.h"
#include "nsProxyRelease.h"
#include "nsThreadUtils.h"
#include "nsIClassInfoImpl.h"
Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageAsyncStatementJSHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "mozStorageAsyncStatement.h"
#include "mozStorageService.h"

#include "nsMemory.h"
#include "nsString.h"
#include "nsServiceManagerUtils.h"

Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageAsyncStatementParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "mozStorageAsyncStatementParams.h"

#include "nsJSUtils.h"
#include "nsMemory.h"
#include "nsString.h"

#include "jsapi.h"
Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <stdio.h>

#include "nsError.h"
#include "nsMemory.h"
#include "nsThreadUtils.h"
#include "nsIClassInfoImpl.h"
#include "Variant.h"
Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageStatementJSHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "mozStorageStatement.h"
#include "mozStorageService.h"

#include "nsMemory.h"
#include "nsString.h"
#include "nsServiceManagerUtils.h"

Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageStatementParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "mozStorageStatementParams.h"

#include "nsJSUtils.h"
#include "nsMemory.h"
#include "nsString.h"

#include "jsapi.h"
Expand Down
1 change: 0 additions & 1 deletion storage/mozStorageStatementRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsMemory.h"
#include "nsString.h"

#include "mozilla/ErrorResult.h"
Expand Down
1 change: 0 additions & 1 deletion storage/test/gtest/storage_test_harness.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "nsComponentManagerUtils.h"
#include "nsDirectoryServiceDefs.h"
#include "nsDirectoryServiceUtils.h"
#include "nsMemory.h"
#include "nsServiceManagerUtils.h"
#include "nsIThread.h"
#include "nsThreadUtils.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "gtest/gtest.h"
#include "nsMemory.h"
#include "nsThreadUtils.h"
#include "nsDocShellCID.h"

Expand Down
1 change: 0 additions & 1 deletion toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "nsIObserverService.h"
#include "nsIPrefBranch.h"
#include "nsIPrefService.h"
#include "nsMemory.h"
#include "nsPIDOMWindow.h"
#include "nsServiceManagerUtils.h"
#include "nsThreadManager.h"
Expand Down
1 change: 0 additions & 1 deletion toolkit/xre/MacLaunchHelper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "MacAutoreleasePool.h"
#include "mozilla/UniquePtr.h"
#include "nsMemory.h"

#include <Cocoa/Cocoa.h>
#include <crt_externs.h>
Expand Down
Loading

0 comments on commit 2da84b8

Please sign in to comment.