Skip to content

Commit

Permalink
Bug 1733308 - Fix non-unified builds errors in xpcom/io. r=xpcom-revi…
Browse files Browse the repository at this point in the history
…ewers,mccr8

xpcom/io/InputStreamLengthHelper.cpp:14:22: error: unused variable 'kStreamTransportServiceCID' [-Werror,-Wunused-const-variable]
xpcom/io/SeekableStreamWrapper.cpp:422:17: error: no member named 'InputStreamHelper' in namespace 'mozilla::ipc'
xpcom/io/nsSegmentedBuffer.cpp:117:11: error: no viable conversion from '(lambda at /tmp/central/xpcom/io/nsSegmentedBuffer.cpp:117:11)' to 'void *'
xpcom/io/nsSegmentedBuffer.cpp:128:11: error: no viable conversion from '(lambda at /tmp/central/xpcom/io/nsSegmentedBuffer.cpp:128:11)' to 'void *'
xpcom/io/nsSegmentedBuffer.cpp:131:25: error: out-of-line definition of 'FreeOMT' does not match any declaration in 'nsSegmentedBuffer'
xpcom/io/nsSegmentedBuffer.cpp:143:16: error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions]
xpcom/io/nsSegmentedBuffer.cpp:143:16: error: use of undeclared identifier 'MakeRefPtr'; did you mean 'mozilla::MakeRefPtr'?
xpcom/io/nsSegmentedBuffer.cpp:164:35: error: implicit instantiation of undefined template 'nsTArray<std::function<void ()>>'
xpcom/io/nsSegmentedBuffer.cpp:164:44: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
xpcom/io/nsSegmentedBuffer.cpp:165:14: error: use of undeclared identifier 'mTasks'
xpcom/io/nsSegmentedBuffer.h:90:25: error: member initializer 'mTasks' does not name a non-static data member or base class
xpcom/io/nsSegmentedBuffer.h:95:25: error: no template named 'function' in namespace 'std'
xpcom/io/nsSegmentedBuffer.h:96:20: error: use of undeclared identifier 'mTasks'
xpcom/io/nsSegmentedBuffer.h:104:24: error: use of undeclared identifier 'nsTArray'
xpcom/io/nsSegmentedBuffer.h:104:38: error: no member named 'function' in namespace 'std'
xpcom/io/nsSegmentedBuffer.h:104:55: error: expected member name or ';' after declaration specifiers
xpcom/io/nsSegmentedBuffer.h:104:57: error: private field 'mTasks' is not used [-Werror,-Wunused-private-field]
xpcom/io/nsSegmentedBuffer.h:108:21: error: no template named 'function' in namespace 'std'
xpcom/io/nsStorageStream.cpp:576:3: error: no template named 'DebugOnly'
xpcom/io/nsStorageStream.cpp:576:3: error: no template named 'DebugOnly'; did you mean 'mozilla::DebugOnly'?

Differential Revision: https://phabricator.services.mozilla.com/D127040
  • Loading branch information
glandium committed Oct 1, 2021
1 parent 26a9899 commit c8c3857
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions xpcom/io/InputStreamLengthHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include "nsNetCID.h"
#include "nsServiceManagerUtils.h"

static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID);

namespace mozilla {

namespace {
Expand Down
1 change: 1 addition & 0 deletions xpcom/io/SeekableStreamWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "mozilla/SeekableStreamWrapper.h"

#include "mozilla/InputStreamLengthHelper.h"
#include "mozilla/ipc/InputStreamUtils.h"
#include "nsStreamUtils.h"

namespace mozilla {
Expand Down
2 changes: 0 additions & 2 deletions xpcom/io/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,3 @@ LOCAL_INCLUDES += [
"!..",
"../build",
]

REQUIRES_UNIFIED_BUILD = True
2 changes: 1 addition & 1 deletion xpcom/io/nsSegmentedBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void nsSegmentedBuffer::FreeOMT(std::function<void()>&& aTask) {
return;
}
} else {
mFreeOMT = MakeRefPtr<FreeOMTPointers>();
mFreeOMT = mozilla::MakeRefPtr<FreeOMTPointers>();
mFreeOMT->AddTask(std::move(aTask));
}

Expand Down
2 changes: 2 additions & 0 deletions xpcom/io/nsSegmentedBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
#define nsSegmentedBuffer_h__

#include <stddef.h>
#include <functional>

#include "nsCOMPtr.h"
#include "nsDebug.h"
#include "nsError.h"
#include "nsTArray.h"
#include "mozilla/DataMutex.h"

class nsIEventTarget;
Expand Down
2 changes: 1 addition & 1 deletion xpcom/io/nsStorageStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ void nsStorageInputStream::SerializeInternal(InputStreamParams& aParams,
*aSizeUsed = 0;

uint64_t remaining = 0;
DebugOnly<nsresult> rv = Available(&remaining);
mozilla::DebugOnly<nsresult> rv = Available(&remaining);
MOZ_ASSERT(NS_SUCCEEDED(rv));

if (remaining >= aMaxSize) {
Expand Down

0 comments on commit c8c3857

Please sign in to comment.