зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 10 changesets (bug 1626570) for build bustages. CLOSED TREE
Backed out changeset a3f17d392234 (bug 1626570) Backed out changeset 5247e1ddd5d6 (bug 1626570) Backed out changeset c339fd44c9f8 (bug 1626570) Backed out changeset 4c69a4c013b3 (bug 1626570) Backed out changeset e85450d69351 (bug 1626570) Backed out changeset 793f978248b3 (bug 1626570) Backed out changeset 68b4c2418d83 (bug 1626570) Backed out changeset 52d0911d4ad3 (bug 1626570) Backed out changeset a7d4e3a59ee3 (bug 1626570) Backed out changeset 6c06d397a5d2 (bug 1626570)
This commit is contained in:
Родитель
01c26cd0d3
Коммит
c2b627950c
|
@ -169,7 +169,7 @@ void LocaleService::AssignAppLocales(const nsTArray<nsCString>& aAppLocales) {
|
|||
MOZ_ASSERT(!mIsServer,
|
||||
"This should only be called for LocaleService in client mode.");
|
||||
|
||||
mAppLocales = aAppLocales.Clone();
|
||||
mAppLocales = aAppLocales;
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
if (obs) {
|
||||
obs->NotifyObservers(nullptr, "intl:app-locales-changed", nullptr);
|
||||
|
@ -181,7 +181,7 @@ void LocaleService::AssignRequestedLocales(
|
|||
MOZ_ASSERT(!mIsServer,
|
||||
"This should only be called for LocaleService in client mode.");
|
||||
|
||||
mRequestedLocales = aRequestedLocales.Clone();
|
||||
mRequestedLocales = aRequestedLocales;
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
if (obs) {
|
||||
obs->NotifyObservers(nullptr, "intl:requested-locales-changed", nullptr);
|
||||
|
@ -416,7 +416,7 @@ LocaleService::GetAppLocalesAsBCP47(nsTArray<nsCString>& aRetVal) {
|
|||
if (mAppLocales.IsEmpty()) {
|
||||
NegotiateAppLocales(mAppLocales);
|
||||
}
|
||||
aRetVal = mAppLocales.Clone();
|
||||
aRetVal = mAppLocales;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ LocaleService::GetRegionalPrefsLocales(nsTArray<nsCString>& aRetVal) {
|
|||
}
|
||||
|
||||
if (LocaleService::LanguagesMatch(appLocale, regionalPrefsLocales[0])) {
|
||||
aRetVal = regionalPrefsLocales.Clone();
|
||||
aRetVal = regionalPrefsLocales;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -491,7 +491,7 @@ LocaleService::GetWebExposedLocales(nsTArray<nsCString>& aRetVal) {
|
|||
}
|
||||
|
||||
if (!mWebExposedLocales.IsEmpty()) {
|
||||
aRetVal = mWebExposedLocales.Clone();
|
||||
aRetVal = mWebExposedLocales;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -542,7 +542,7 @@ LocaleService::GetRequestedLocales(nsTArray<nsCString>& aRetVal) {
|
|||
ReadRequestedLocales(mRequestedLocales);
|
||||
}
|
||||
|
||||
aRetVal = mRequestedLocales.Clone();
|
||||
aRetVal = mRequestedLocales;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ LocaleService::GetAvailableLocales(nsTArray<nsCString>& aRetVal) {
|
|||
GetPackagedLocales(mAvailableLocales);
|
||||
}
|
||||
|
||||
aRetVal = mAvailableLocales.Clone();
|
||||
aRetVal = mAvailableLocales;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -640,6 +640,6 @@ LocaleService::GetPackagedLocales(nsTArray<nsCString>& aRetVal) {
|
|||
if (mPackagedLocales.IsEmpty()) {
|
||||
InitPackagedLocales();
|
||||
}
|
||||
aRetVal = mPackagedLocales.Clone();
|
||||
aRetVal = mPackagedLocales;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -237,12 +237,12 @@ bool OSPreferences::GetDateTimeConnectorPattern(const nsACString& aLocale,
|
|||
NS_IMETHODIMP
|
||||
OSPreferences::GetSystemLocales(nsTArray<nsCString>& aRetVal) {
|
||||
if (!mSystemLocales.IsEmpty()) {
|
||||
aRetVal = mSystemLocales.Clone();
|
||||
aRetVal = mSystemLocales;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (ReadSystemLocales(aRetVal)) {
|
||||
mSystemLocales = aRetVal.Clone();
|
||||
mSystemLocales = aRetVal;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -270,12 +270,12 @@ OSPreferences::GetSystemLocale(nsACString& aRetVal) {
|
|||
NS_IMETHODIMP
|
||||
OSPreferences::GetRegionalPrefsLocales(nsTArray<nsCString>& aRetVal) {
|
||||
if (!mRegionalPrefsLocales.IsEmpty()) {
|
||||
aRetVal = mRegionalPrefsLocales.Clone();
|
||||
aRetVal = mRegionalPrefsLocales;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (ReadRegionalPrefsLocales(aRetVal)) {
|
||||
mRegionalPrefsLocales = aRetVal.Clone();
|
||||
mRegionalPrefsLocales = aRetVal;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -773,7 +773,7 @@ void XPCJSRuntime::DoCycleCollectionCallback(JSContext* cx) {
|
|||
}
|
||||
|
||||
void XPCJSRuntime::CustomGCCallback(JSGCStatus status) {
|
||||
nsTArray<xpcGCCallback> callbacks(extraGCCallbacks.Clone());
|
||||
nsTArray<xpcGCCallback> callbacks(extraGCCallbacks);
|
||||
for (uint32_t i = 0; i < callbacks.Length(); ++i) {
|
||||
callbacks[i](status);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ nsXPCTestParams::~nsXPCTestParams() = default;
|
|||
#define SEQUENCE_METHOD_IMPL(TAKE_OWNERSHIP) \
|
||||
{ \
|
||||
_retval.SwapElements(b); \
|
||||
b = a.Clone(); \
|
||||
b = a; \
|
||||
for (uint32_t i = 0; i < b.Length(); ++i) TAKE_OWNERSHIP(b[i]); \
|
||||
return NS_OK; \
|
||||
}
|
||||
|
@ -349,11 +349,7 @@ NS_IMETHODIMP
|
|||
nsXPCTestParams::TestSequenceSequence(const nsTArray<nsTArray<short>>& a,
|
||||
nsTArray<nsTArray<short>>& b,
|
||||
nsTArray<nsTArray<short>>& _retval) {
|
||||
_retval = std::move(b);
|
||||
for (const auto& element : a) {
|
||||
b.AppendElement(element.Clone());
|
||||
}
|
||||
return NS_OK;
|
||||
SEQUENCE_METHOD_IMPL(TAKE_OWNERSHIP_NOOP);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -372,7 +368,7 @@ nsXPCTestParams::TestInterfaceIsSequence(const nsIID* aIID,
|
|||
NS_IMETHODIMP
|
||||
nsXPCTestParams::TestOptionalSequence(const nsTArray<uint8_t>& aInArr,
|
||||
nsTArray<uint8_t>& aReturnArr) {
|
||||
aReturnArr = aInArr.Clone();
|
||||
aReturnArr = aInArr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -341,7 +341,8 @@ class RefreshDriverTimer {
|
|||
return;
|
||||
}
|
||||
|
||||
for (nsRefreshDriver* driver : aDrivers.Clone()) {
|
||||
nsTArray<RefPtr<nsRefreshDriver>> drivers(aDrivers);
|
||||
for (nsRefreshDriver* driver : drivers) {
|
||||
// don't poke this driver if it's in test mode
|
||||
if (driver->IsTestControllingRefreshesEnabled()) {
|
||||
continue;
|
||||
|
@ -978,7 +979,7 @@ class InactiveRefreshDriverTimer final
|
|||
|
||||
mLastFireTime = now;
|
||||
|
||||
nsTArray<RefPtr<nsRefreshDriver>> drivers(mContentRefreshDrivers.Clone());
|
||||
nsTArray<RefPtr<nsRefreshDriver>> drivers(mContentRefreshDrivers);
|
||||
drivers.AppendElements(mRootRefreshDrivers);
|
||||
size_t index = mNextDriverIndex;
|
||||
|
||||
|
|
|
@ -155,7 +155,8 @@ nsStyleSheetService::LoadAndRegisterSheet(nsIURI* aSheetURI,
|
|||
rv = LoadAndRegisterSheetInternal(aSheetURI, aSheetType);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// Hold on to a copy of the registered PresShells.
|
||||
for (PresShell* presShell : mPresShells.Clone()) {
|
||||
nsTArray<RefPtr<PresShell>> toNotify(mPresShells);
|
||||
for (PresShell* presShell : toNotify) {
|
||||
StyleSheet* sheet = mSheets[aSheetType].LastElement();
|
||||
presShell->NotifyStyleSheetServiceSheetAdded(sheet, aSheetType);
|
||||
}
|
||||
|
@ -306,7 +307,8 @@ nsStyleSheetService::UnregisterSheet(nsIURI* aSheetURI, uint32_t aSheetType) {
|
|||
}
|
||||
|
||||
// Hold on to a copy of the registered PresShells.
|
||||
for (PresShell* presShell : mPresShells.Clone()) {
|
||||
nsTArray<RefPtr<PresShell>> toNotify(mPresShells);
|
||||
for (PresShell* presShell : toNotify) {
|
||||
if (presShell->StyleSet()) {
|
||||
if (sheet) {
|
||||
presShell->NotifyStyleSheetServiceSheetRemoved(sheet, aSheetType);
|
||||
|
|
|
@ -245,7 +245,7 @@ void InspectorFontFace::GetVariationInstances(
|
|||
aRV.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return;
|
||||
}
|
||||
for (const auto& i : instances) {
|
||||
for (auto i : instances) {
|
||||
InspectorVariationInstance& inst = *aResult.AppendElement();
|
||||
inst.mName.Append(NS_ConvertUTF8toUTF16(i.mName));
|
||||
// inst.mValues is a webidl sequence<>, which is a fallible array,
|
||||
|
@ -256,7 +256,7 @@ void InspectorFontFace::GetVariationInstances(
|
|||
aRV.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return;
|
||||
}
|
||||
for (const auto& v : i.mValues) {
|
||||
for (auto v : i.mValues) {
|
||||
InspectorVariationValue value;
|
||||
AppendTagAsASCII(value.mAxis, v.mAxis);
|
||||
value.mValue = v.mValue;
|
||||
|
@ -286,7 +286,7 @@ void InspectorFontFace::GetFeatures(nsTArray<InspectorFontFeature>& aResult,
|
|||
}
|
||||
|
||||
void InspectorFontFace::GetRanges(nsTArray<RefPtr<nsRange>>& aResult) {
|
||||
aResult = mRanges.Clone();
|
||||
aResult = mRanges;
|
||||
}
|
||||
|
||||
void InspectorFontFace::AddRange(nsRange* aRange) {
|
||||
|
|
|
@ -117,11 +117,11 @@ class nsMathMLmtableFrame final : public nsTableFrame {
|
|||
nscoord GetRowSpacing(int32_t aStartRowIndex, int32_t aEndRowIndex) override;
|
||||
|
||||
void SetColSpacingArray(const nsTArray<nscoord>& aColSpacing) {
|
||||
mColSpacing = aColSpacing.Clone();
|
||||
mColSpacing = aColSpacing;
|
||||
}
|
||||
|
||||
void SetRowSpacingArray(const nsTArray<nscoord>& aRowSpacing) {
|
||||
mRowSpacing = aRowSpacing.Clone();
|
||||
mRowSpacing = aRowSpacing;
|
||||
}
|
||||
|
||||
void SetFrameSpacing(nscoord aSpacingX, nscoord aSpacingY) {
|
||||
|
|
|
@ -23,7 +23,7 @@ class nsStyleAutoArray {
|
|||
nsStyleAutoArray(const nsStyleAutoArray& aOther) { *this = aOther; }
|
||||
nsStyleAutoArray& operator=(const nsStyleAutoArray& aOther) {
|
||||
mFirstElement = aOther.mFirstElement;
|
||||
mOtherElements = aOther.mOtherElements.Clone();
|
||||
mOtherElements = aOther.mOtherElements;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
@ -1981,7 +1981,6 @@ STATIC_ASSERT_TYPE_LAYOUTS_MATCH(mozilla::UniquePtr<int>,
|
|||
*/
|
||||
template <typename T>
|
||||
class nsTArray_Simple {
|
||||
protected:
|
||||
T* mBuffer;
|
||||
|
||||
public:
|
||||
|
@ -1992,12 +1991,6 @@ class nsTArray_Simple {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* <div rustbindgen replaces="CopyableTArray"></div>
|
||||
*/
|
||||
template <typename T>
|
||||
class CopyableTArray_Simple : public nsTArray_Simple<T> {};
|
||||
|
||||
STATIC_ASSERT_TYPE_LAYOUTS_MATCH(nsTArray<nsStyleImageLayers::Layer>,
|
||||
nsTArray_Simple<nsStyleImageLayers::Layer>);
|
||||
STATIC_ASSERT_TYPE_LAYOUTS_MATCH(nsTArray<mozilla::StyleTransition>,
|
||||
|
|
|
@ -115,7 +115,7 @@ int32_t WebrtcMediaDataDecoder::Decode(
|
|||
media::Await(
|
||||
do_AddRef(mThreadPool), mDecoder->Decode(compressedFrame),
|
||||
[&](const MediaDataDecoder::DecodedData& aResults) {
|
||||
mResults = aResults.Clone();
|
||||
mResults = aResults;
|
||||
mError = NS_OK;
|
||||
},
|
||||
[&](const MediaResult& aError) { mError = aError; });
|
||||
|
|
|
@ -520,11 +520,10 @@ void MediaTransportHandlerSTS::ActivateTransport(
|
|||
bool aPrivacyRequested) {
|
||||
mInitPromise->Then(
|
||||
mStsThread, __func__,
|
||||
[=, keyDer = aKeyDer.Clone(), certDer = aCertDer.Clone(),
|
||||
self = RefPtr<MediaTransportHandlerSTS>(this)]() {
|
||||
[=, self = RefPtr<MediaTransportHandlerSTS>(this)]() {
|
||||
MOZ_ASSERT(aComponentCount);
|
||||
RefPtr<DtlsIdentity> dtlsIdentity(
|
||||
DtlsIdentity::Deserialize(keyDer, certDer, aAuthType));
|
||||
DtlsIdentity::Deserialize(aKeyDer, aCertDer, aAuthType));
|
||||
if (!dtlsIdentity) {
|
||||
MOZ_ASSERT(false);
|
||||
return;
|
||||
|
@ -612,8 +611,7 @@ void MediaTransportHandlerSTS::StartIceGathering(
|
|||
const nsTArray<NrIceStunAddr>& aStunAddrs) {
|
||||
mInitPromise->Then(
|
||||
mStsThread, __func__,
|
||||
[=, stunAddrs = aStunAddrs.Clone(),
|
||||
self = RefPtr<MediaTransportHandlerSTS>(this)]() {
|
||||
[=, self = RefPtr<MediaTransportHandlerSTS>(this)]() {
|
||||
mObfuscateHostAddresses = aObfuscateHostAddresses;
|
||||
|
||||
// Belt and suspenders - in e10s mode, the call below to SetStunAddrs
|
||||
|
@ -622,8 +620,8 @@ void MediaTransportHandlerSTS::StartIceGathering(
|
|||
// just set them here, and only do it here.
|
||||
mIceCtx->SetCtxFlags(aDefaultRouteOnly);
|
||||
|
||||
if (stunAddrs.Length()) {
|
||||
mIceCtx->SetStunAddrs(stunAddrs);
|
||||
if (aStunAddrs.Length()) {
|
||||
mIceCtx->SetStunAddrs(aStunAddrs);
|
||||
}
|
||||
|
||||
// Start gathering, but only if there are streams
|
||||
|
|
|
@ -136,12 +136,10 @@ nsresult MediaTransportHandlerIPC::CreateIceCtx(
|
|||
|
||||
mInitPromise->Then(
|
||||
mCallbackThread, __func__,
|
||||
[=, iceServers = aIceServers.Clone(),
|
||||
self = RefPtr<MediaTransportHandlerIPC>(this)](bool /*dummy*/) {
|
||||
[=, self = RefPtr<MediaTransportHandlerIPC>(this)](bool /*dummy*/) {
|
||||
if (mChild) {
|
||||
CSFLogDebug(LOGTAG, "%s starting", __func__);
|
||||
if (!mChild->SendCreateIceCtx(aName, std::move(iceServers),
|
||||
aIcePolicy)) {
|
||||
if (!mChild->SendCreateIceCtx(aName, aIceServers, aIcePolicy)) {
|
||||
CSFLogError(LOGTAG, "%s failed!", __func__);
|
||||
}
|
||||
}
|
||||
|
@ -215,11 +213,10 @@ void MediaTransportHandlerIPC::StartIceGathering(
|
|||
const nsTArray<NrIceStunAddr>& aStunAddrs) {
|
||||
mInitPromise->Then(
|
||||
mCallbackThread, __func__,
|
||||
[=, stunAddrs = aStunAddrs.Clone(),
|
||||
self = RefPtr<MediaTransportHandlerIPC>(this)](bool /*dummy*/) {
|
||||
[=, self = RefPtr<MediaTransportHandlerIPC>(this)](bool /*dummy*/) {
|
||||
if (mChild) {
|
||||
mChild->SendStartIceGathering(aDefaultRouteOnly,
|
||||
aObfuscateHostAddresses, stunAddrs);
|
||||
aObfuscateHostAddresses, aStunAddrs);
|
||||
}
|
||||
},
|
||||
[](const nsCString& aError) {});
|
||||
|
@ -234,13 +231,12 @@ void MediaTransportHandlerIPC::ActivateTransport(
|
|||
bool aPrivacyRequested) {
|
||||
mInitPromise->Then(
|
||||
mCallbackThread, __func__,
|
||||
[=, keyDer = aKeyDer.Clone(), certDer = aCertDer.Clone(),
|
||||
self = RefPtr<MediaTransportHandlerIPC>(this)](bool /*dummy*/) {
|
||||
[=, self = RefPtr<MediaTransportHandlerIPC>(this)](bool /*dummy*/) {
|
||||
if (mChild) {
|
||||
mChild->SendActivateTransport(aTransportId, aLocalUfrag, aLocalPwd,
|
||||
aComponentCount, aUfrag, aPassword,
|
||||
keyDer, certDer, aAuthType, aDtlsClient,
|
||||
aDigests, aPrivacyRequested);
|
||||
mChild->SendActivateTransport(
|
||||
aTransportId, aLocalUfrag, aLocalPwd, aComponentCount, aUfrag,
|
||||
aPassword, aKeyDer, aCertDer, aAuthType, aDtlsClient, aDigests,
|
||||
aPrivacyRequested);
|
||||
}
|
||||
},
|
||||
[](const nsCString& aError) {});
|
||||
|
|
|
@ -1506,7 +1506,7 @@ already_AddRefed<dom::Promise> PeerConnectionImpl::GetStats(
|
|||
|
||||
void PeerConnectionImpl::GetRemoteStreams(
|
||||
nsTArray<RefPtr<DOMMediaStream>>& aStreamsOut) const {
|
||||
aStreamsOut = mReceiveStreams.Clone();
|
||||
aStreamsOut = mReceiveStreams;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -2583,12 +2583,11 @@ void PeerConnectionImpl::RecordConduitTelemetry() {
|
|||
}
|
||||
}
|
||||
|
||||
mSTSThread->Dispatch(
|
||||
NS_NewRunnableFunction(__func__, [conduits = std::move(conduits)]() {
|
||||
for (const auto& conduit : conduits) {
|
||||
conduit->RecordTelemetry();
|
||||
}
|
||||
}));
|
||||
mSTSThread->Dispatch(NS_NewRunnableFunction(__func__, [conduits]() {
|
||||
for (const auto& conduit : conduits) {
|
||||
conduit->RecordTelemetry();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
@ -69,7 +69,7 @@ void PeerConnectionMedia::StunAddrsHandler::OnStunAddrsAvailable(
|
|||
CSFLogInfo(LOGTAG, "%s: receiving (%d) stun addrs", __FUNCTION__,
|
||||
(int)addrs.Length());
|
||||
if (pcm_) {
|
||||
pcm_->mStunAddrs = addrs.Clone();
|
||||
pcm_->mStunAddrs = addrs;
|
||||
pcm_->mLocalAddrsRequestState = STUN_ADDR_REQUEST_COMPLETE;
|
||||
pcm_->FlushIceCtxOperationQueueIfReady();
|
||||
// If parent process returns 0 STUN addresses, change ICE connection
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "BackgroundFileSaver.h"
|
||||
|
||||
#include "ScopedNSSTypes.h"
|
||||
#include "mozilla/ArrayAlgorithm.h"
|
||||
#include "mozilla/Casting.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
@ -258,8 +257,7 @@ BackgroundFileSaver::GetSignatureInfo(
|
|||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
for (const auto& signatureChain : mSignatureInfo) {
|
||||
aSignatureInfo.AppendElement(TransformIntoNewArray(
|
||||
signatureChain, [](const auto& element) { return element.Clone(); }));
|
||||
aSignatureInfo.AppendElement(signatureChain);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -827,7 +825,7 @@ nsresult BackgroundFileSaver::ExtractSignatureInfo(const nsAString& filePath) {
|
|||
nsTArray<uint8_t> cert;
|
||||
cert.AppendElements(certChainElement->pCertContext->pbCertEncoded,
|
||||
certChainElement->pCertContext->cbCertEncoded);
|
||||
certList.AppendElement(std::move(cert));
|
||||
certList.AppendElement(cert);
|
||||
}
|
||||
if (extractionSuccess) {
|
||||
mSignatureInfo.AppendElement(std::move(certList));
|
||||
|
|
|
@ -44,9 +44,9 @@ struct HttpConnInfo {
|
|||
|
||||
struct HttpRetParams {
|
||||
nsCString host;
|
||||
CopyableTArray<HttpConnInfo> active;
|
||||
CopyableTArray<HttpConnInfo> idle;
|
||||
CopyableTArray<HalfOpenSockets> halfOpens;
|
||||
nsTArray<HttpConnInfo> active;
|
||||
nsTArray<HttpConnInfo> idle;
|
||||
nsTArray<HalfOpenSockets> halfOpens;
|
||||
uint32_t counter;
|
||||
uint16_t port;
|
||||
nsCString httpVersion;
|
||||
|
|
|
@ -235,10 +235,9 @@ LoadInfo::LoadInfo(
|
|||
}
|
||||
|
||||
mInnerWindowID = aLoadingContext->OwnerDoc()->InnerWindowID();
|
||||
mAncestorPrincipals =
|
||||
aLoadingContext->OwnerDoc()->AncestorPrincipals().Clone();
|
||||
mAncestorPrincipals = aLoadingContext->OwnerDoc()->AncestorPrincipals();
|
||||
mAncestorOuterWindowIDs =
|
||||
aLoadingContext->OwnerDoc()->AncestorOuterWindowIDs().Clone();
|
||||
aLoadingContext->OwnerDoc()->AncestorOuterWindowIDs();
|
||||
MOZ_DIAGNOSTIC_ASSERT(mAncestorPrincipals.Length() ==
|
||||
mAncestorOuterWindowIDs.Length());
|
||||
mDocumentHasUserInteracted =
|
||||
|
@ -597,8 +596,8 @@ LoadInfo::LoadInfo(dom::CanonicalBrowsingContext* aBrowsingContext,
|
|||
ancestorOuterWindowIDs.AppendElement(ancestorWGP->OuterWindowId());
|
||||
ancestorBC = ancestorWGP->BrowsingContext();
|
||||
}
|
||||
mAncestorPrincipals = std::move(ancestorPrincipals);
|
||||
mAncestorOuterWindowIDs = std::move(ancestorOuterWindowIDs);
|
||||
mAncestorPrincipals = ancestorPrincipals;
|
||||
mAncestorOuterWindowIDs = ancestorOuterWindowIDs;
|
||||
MOZ_DIAGNOSTIC_ASSERT(mAncestorPrincipals.Length() ==
|
||||
mAncestorOuterWindowIDs.Length());
|
||||
|
||||
|
@ -760,11 +759,11 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
|
|||
mSendCSPViolationEvents(rhs.mSendCSPViolationEvents),
|
||||
mOriginAttributes(rhs.mOriginAttributes),
|
||||
mRedirectChainIncludingInternalRedirects(
|
||||
rhs.mRedirectChainIncludingInternalRedirects.Clone()),
|
||||
mRedirectChain(rhs.mRedirectChain.Clone()),
|
||||
mAncestorPrincipals(rhs.mAncestorPrincipals.Clone()),
|
||||
mAncestorOuterWindowIDs(rhs.mAncestorOuterWindowIDs.Clone()),
|
||||
mCorsUnsafeHeaders(rhs.mCorsUnsafeHeaders.Clone()),
|
||||
rhs.mRedirectChainIncludingInternalRedirects),
|
||||
mRedirectChain(rhs.mRedirectChain),
|
||||
mAncestorPrincipals(rhs.mAncestorPrincipals),
|
||||
mAncestorOuterWindowIDs(rhs.mAncestorOuterWindowIDs),
|
||||
mCorsUnsafeHeaders(rhs.mCorsUnsafeHeaders),
|
||||
mRequestBlockingReason(rhs.mRequestBlockingReason),
|
||||
mForcePreflight(rhs.mForcePreflight),
|
||||
mIsPreflight(rhs.mIsPreflight),
|
||||
|
@ -866,8 +865,8 @@ LoadInfo::LoadInfo(
|
|||
mSendCSPViolationEvents(aSendCSPViolationEvents),
|
||||
mOriginAttributes(aOriginAttributes),
|
||||
mAncestorPrincipals(std::move(aAncestorPrincipals)),
|
||||
mAncestorOuterWindowIDs(aAncestorOuterWindowIDs.Clone()),
|
||||
mCorsUnsafeHeaders(aCorsUnsafeHeaders.Clone()),
|
||||
mAncestorOuterWindowIDs(aAncestorOuterWindowIDs),
|
||||
mCorsUnsafeHeaders(aCorsUnsafeHeaders),
|
||||
mRequestBlockingReason(aRequestBlockingReason),
|
||||
mForcePreflight(aForcePreflight),
|
||||
mIsPreflight(aIsPreflight),
|
||||
|
@ -1562,7 +1561,7 @@ void LoadInfo::SetCorsPreflightInfo(const nsTArray<nsCString>& aHeaders,
|
|||
bool aForcePreflight) {
|
||||
MOZ_ASSERT(GetSecurityMode() == nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS);
|
||||
MOZ_ASSERT(!mInitialSecurityCheckDone);
|
||||
mCorsUnsafeHeaders = aHeaders.Clone();
|
||||
mCorsUnsafeHeaders = aHeaders;
|
||||
mForcePreflight = aForcePreflight;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ PartiallySeekableInputStream::PartiallySeekableInputStream(
|
|||
mWeakAsyncInputStream(nullptr),
|
||||
mWeakInputStreamLength(nullptr),
|
||||
mWeakAsyncInputStreamLength(nullptr),
|
||||
mCachedBuffer(aClonedFrom->mCachedBuffer.Clone()),
|
||||
mCachedBuffer(aClonedFrom->mCachedBuffer),
|
||||
mBufferSize(aClonedFrom->mBufferSize),
|
||||
mPos(aClonedFrom->mPos),
|
||||
mClosed(aClonedFrom->mClosed),
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SSLTokensCache.h"
|
||||
#include "mozilla/ArrayAlgorithm.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "nsIOService.h"
|
||||
|
@ -37,20 +36,6 @@ class ExpirationComparator {
|
|||
}
|
||||
};
|
||||
|
||||
SessionCacheInfo SessionCacheInfo::Clone() const {
|
||||
SessionCacheInfo result;
|
||||
result.mEVStatus = mEVStatus;
|
||||
result.mCertificateTransparencyStatus = mCertificateTransparencyStatus;
|
||||
result.mServerCertBytes = mServerCertBytes.Clone();
|
||||
result.mSucceededCertChainBytes =
|
||||
mSucceededCertChainBytes
|
||||
? Some(TransformIntoNewArray(
|
||||
*mSucceededCertChainBytes,
|
||||
[](const auto& element) { return element.Clone(); }))
|
||||
: Nothing();
|
||||
return result;
|
||||
}
|
||||
|
||||
StaticRefPtr<SSLTokensCache> SSLTokensCache::gInstance;
|
||||
StaticMutex SSLTokensCache::sLock;
|
||||
|
||||
|
@ -221,11 +206,7 @@ nsresult SSLTokensCache::Put(const nsACString& aKey, const uint8_t* aToken,
|
|||
rec->mSessionCacheInfo.mServerCertBytes = std::move(certBytes);
|
||||
|
||||
rec->mSessionCacheInfo.mSucceededCertChainBytes =
|
||||
succeededCertChainBytes
|
||||
? Some(TransformIntoNewArray(
|
||||
*succeededCertChainBytes,
|
||||
[](auto& element) { return nsTArray(std::move(element)); }))
|
||||
: Nothing();
|
||||
std::move(succeededCertChainBytes);
|
||||
|
||||
if (isEV) {
|
||||
rec->mSessionCacheInfo.mEVStatus = psm::EVStatus::EV;
|
||||
|
@ -262,7 +243,7 @@ nsresult SSLTokensCache::Get(const nsACString& aKey,
|
|||
|
||||
if (gInstance->mTokenCacheRecords.Get(aKey, &rec)) {
|
||||
if (rec->mToken.Length()) {
|
||||
aToken = rec->mToken.Clone();
|
||||
aToken = rec->mToken;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +268,7 @@ bool SSLTokensCache::GetSessionCacheInfo(const nsACString& aKey,
|
|||
TokenCacheRecord* rec = nullptr;
|
||||
|
||||
if (gInstance->mTokenCacheRecords.Get(aKey, &rec)) {
|
||||
aResult = rec->mSessionCacheInfo.Clone();
|
||||
aResult = rec->mSessionCacheInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,8 +18,6 @@ namespace mozilla {
|
|||
namespace net {
|
||||
|
||||
struct SessionCacheInfo {
|
||||
SessionCacheInfo Clone() const;
|
||||
|
||||
psm::EVStatus mEVStatus = psm::EVStatus::NotEV;
|
||||
uint16_t mCertificateTransparencyStatus =
|
||||
nsITransportSecurityInfo::CERTIFICATE_TRANSPARENCY_NOT_APPLICABLE;
|
||||
|
|
|
@ -392,7 +392,7 @@ bool nsMIMEInputStream::Deserialize(
|
|||
const MIMEInputStreamParams& params = aParams.get_MIMEInputStreamParams();
|
||||
const Maybe<InputStreamParams>& wrappedParams = params.optionalStream();
|
||||
|
||||
mHeaders = params.headers().Clone();
|
||||
mHeaders = params.headers();
|
||||
mStartedReading = params.startedReading();
|
||||
|
||||
if (wrappedParams.isSome()) {
|
||||
|
|
|
@ -291,7 +291,7 @@ class nsSocketTransportService final : public nsPISocketTransportService,
|
|||
// <1> the less-or-equal port number of the range to remap
|
||||
// <2> the port number to remap to, when the given port number falls to the
|
||||
// range
|
||||
typedef CopyableTArray<Tuple<uint16_t, uint16_t, uint16_t>> TPortRemapping;
|
||||
typedef nsTArray<Tuple<uint16_t, uint16_t, uint16_t>> TPortRemapping;
|
||||
Maybe<TPortRemapping> mPortRemapping;
|
||||
|
||||
// Called on the socket thread to apply the mapping build on the main thread
|
||||
|
|
|
@ -15,8 +15,8 @@ namespace net {
|
|||
|
||||
// The types of nsIDNSByTypeRecord: Nothing, TXT, HTTPSSVC
|
||||
using TypeRecordEmpty = Nothing;
|
||||
using TypeRecordTxt = CopyableTArray<nsCString>;
|
||||
using TypeRecordHTTPSSVC = CopyableTArray<SVCB>;
|
||||
using TypeRecordTxt = nsTArray<nsCString>;
|
||||
using TypeRecordHTTPSSVC = nsTArray<SVCB>;
|
||||
|
||||
// This variant reflects the multiple types of data a nsIDNSByTypeRecord
|
||||
// can hold.
|
||||
|
|
|
@ -60,7 +60,7 @@ ChildDNSRecord::ChildDNSRecord(const DNSRecord& reply, uint16_t flags)
|
|||
|
||||
// A shame IPDL gives us no way to grab ownership of array: so copy it.
|
||||
const nsTArray<NetAddr>& addrs = reply.addrs();
|
||||
mAddresses = addrs.Clone();
|
||||
mAddresses = addrs;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -111,7 +111,7 @@ ChildDNSRecord::GetNextAddr(uint16_t port, NetAddr* addr) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
ChildDNSRecord::GetAddresses(nsTArray<NetAddr>& aAddressArray) {
|
||||
aAddressArray = mAddresses.Clone();
|
||||
aAddressArray = mAddresses;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -203,11 +203,11 @@ ChildDNSByTypeRecord::GetType(uint32_t* aType) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ChildDNSByTypeRecord::GetRecords(CopyableTArray<nsCString>& aRecords) {
|
||||
ChildDNSByTypeRecord::GetRecords(nsTArray<nsCString>& aRecords) {
|
||||
if (!mResults.is<TypeRecordTxt>()) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
aRecords = mResults.as<CopyableTArray<nsCString>>();
|
||||
aRecords = mResults.as<nsTArray<nsCString>>();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ ChildDNSByTypeRecord::GetRecordsAsOneString(nsACString& aRecords) {
|
|||
if (!mResults.is<TypeRecordTxt>()) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
auto& results = mResults.as<CopyableTArray<nsCString>>();
|
||||
auto& results = mResults.as<nsTArray<nsCString>>();
|
||||
for (uint32_t i = 0; i < results.Length(); i++) {
|
||||
aRecords.Append(results[i]);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ struct SvcParamIpv4Hint {
|
|||
bool operator==(const SvcParamIpv4Hint& aOther) const {
|
||||
return mValue == aOther.mValue;
|
||||
}
|
||||
CopyableTArray<mozilla::net::NetAddr> mValue;
|
||||
nsTArray<mozilla::net::NetAddr> mValue;
|
||||
};
|
||||
|
||||
struct SvcParamEsniConfig {
|
||||
|
@ -61,7 +61,7 @@ struct SvcParamIpv6Hint {
|
|||
bool operator==(const SvcParamIpv6Hint& aOther) const {
|
||||
return mValue == aOther.mValue;
|
||||
}
|
||||
CopyableTArray<mozilla::net::NetAddr> mValue;
|
||||
nsTArray<mozilla::net::NetAddr> mValue;
|
||||
};
|
||||
|
||||
using SvcParamType =
|
||||
|
@ -84,7 +84,7 @@ struct SVCB {
|
|||
}
|
||||
uint16_t mSvcFieldPriority = SvcParamKeyNone;
|
||||
nsCString mSvcDomainName;
|
||||
CopyableTArray<SvcFieldValue> mSvcFieldValue;
|
||||
nsTArray<SvcFieldValue> mSvcFieldValue;
|
||||
};
|
||||
|
||||
class SVCBRecord : public nsISVCBRecord {
|
||||
|
|
|
@ -950,7 +950,7 @@ nsresult TRR::DohDecode(nsCString& aHost) {
|
|||
}
|
||||
|
||||
if (!mResult.is<TypeRecordTxt>()) {
|
||||
mResult = AsVariant(CopyableTArray<nsCString>());
|
||||
mResult = AsVariant(nsTArray<nsCString>());
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -1019,7 +1019,7 @@ nsresult TRR::DohDecode(nsCString& aHost) {
|
|||
}
|
||||
|
||||
if (!mResult.is<TypeRecordHTTPSSVC>()) {
|
||||
mResult = mozilla::AsVariant(CopyableTArray<SVCB>());
|
||||
mResult = mozilla::AsVariant(nsTArray<SVCB>());
|
||||
}
|
||||
{
|
||||
auto& results = mResult.as<TypeRecordHTTPSSVC>();
|
||||
|
|
|
@ -349,7 +349,7 @@ nsDNSByTypeRecord::GetType(uint32_t* aType) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDNSByTypeRecord::GetRecords(CopyableTArray<nsCString>& aRecords) {
|
||||
nsDNSByTypeRecord::GetRecords(nsTArray<nsCString>& aRecords) {
|
||||
// deep copy
|
||||
return mHostRecord->GetRecords(aRecords);
|
||||
}
|
||||
|
|
|
@ -508,14 +508,14 @@ bool TypeHostRecord::HasUsableResultInternal() const {
|
|||
return !mResults.is<Nothing>();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP TypeHostRecord::GetRecords(CopyableTArray<nsCString>& aRecords) {
|
||||
NS_IMETHODIMP TypeHostRecord::GetRecords(nsTArray<nsCString>& aRecords) {
|
||||
// deep copy
|
||||
MutexAutoLock lock(mResultsLock);
|
||||
|
||||
if (!mResults.is<TypeRecordTxt>()) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
aRecords = mResults.as<CopyableTArray<nsCString>>();
|
||||
aRecords = mResults.as<nsTArray<nsCString>>();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -526,7 +526,7 @@ NS_IMETHODIMP TypeHostRecord::GetRecordsAsOneString(nsACString& aRecords) {
|
|||
if (!mResults.is<TypeRecordTxt>()) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
auto& results = mResults.as<CopyableTArray<nsCString>>();
|
||||
auto& results = mResults.as<nsTArray<nsCString>>();
|
||||
for (uint32_t i = 0; i < results.Length(); i++) {
|
||||
aRecords.Append(results[i]);
|
||||
}
|
||||
|
@ -2296,7 +2296,7 @@ void nsHostResolver::GetDNSCacheEntries(nsTArray<DNSCacheEntries>* args) {
|
|||
info.TRR = addrRec->addr_info->IsTRR();
|
||||
}
|
||||
|
||||
args->AppendElement(std::move(info));
|
||||
args->AppendElement(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ struct Nothing;
|
|||
namespace net {
|
||||
struct SVCB;
|
||||
using TypeRecordResultType =
|
||||
Variant<Nothing, CopyableTArray<nsCString>, CopyableTArray<SVCB>>;
|
||||
Variant<Nothing, nsTArray<nsCString>, nsTArray<SVCB>>;
|
||||
}
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
[ref] native CStringArrayRef(CopyableTArray<nsCString>);
|
||||
[ref] native CStringArrayRef(nsTArray<nsCString>);
|
||||
native TypeResult(mozilla::net::TypeRecordResultType);
|
||||
|
||||
[scriptable, uuid(5d13241b-9d46-448a-90d8-77c418491026)]
|
||||
|
|
|
@ -209,7 +209,7 @@ static nsresult FindPinningInformation(
|
|||
if (found && (evalHost == hostname || includeSubdomains)) {
|
||||
MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
|
||||
("pkpin: Found dyn match for host: '%s'\n", evalHost));
|
||||
dynamicFingerprints = std::move(pinArray);
|
||||
dynamicFingerprints = pinArray;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1099,18 +1099,16 @@ Result AuthCertificate(
|
|||
nsTArray<nsTArray<uint8_t>> peerCertsBytes;
|
||||
// Don't include the end-entity certificate.
|
||||
if (!peerCertChain.IsEmpty()) {
|
||||
std::transform(
|
||||
peerCertChain.cbegin() + 1, peerCertChain.cend(),
|
||||
MakeBackInserter(peerCertsBytes),
|
||||
[](const auto& elementArray) { return elementArray.Clone(); });
|
||||
peerCertsBytes.AppendElements(peerCertChain.Elements() + 1,
|
||||
peerCertChain.Length() - 1);
|
||||
}
|
||||
|
||||
Result rv = certVerifier.VerifySSLServerCert(
|
||||
cert, time, aPinArg, aHostName, builtCertChain, certVerifierFlags,
|
||||
Some(std::move(peerCertsBytes)), stapledOCSPResponse,
|
||||
sctsFromTLSExtension, dcInfo, aOriginAttributes, saveIntermediates,
|
||||
&evOidPolicy, &ocspStaplingStatus, &keySizeStatus, &sha1ModeResult,
|
||||
&pinningTelemetryInfo, &certificateTransparencyInfo, &crliteTelemetryInfo,
|
||||
Some(peerCertsBytes), stapledOCSPResponse, sctsFromTLSExtension, dcInfo,
|
||||
aOriginAttributes, saveIntermediates, &evOidPolicy, &ocspStaplingStatus,
|
||||
&keySizeStatus, &sha1ModeResult, &pinningTelemetryInfo,
|
||||
&certificateTransparencyInfo, &crliteTelemetryInfo,
|
||||
&aIsCertChainRootBuiltInRoot);
|
||||
|
||||
CollectCertTelemetry(rv, evOidPolicy, ocspStaplingStatus, keySizeStatus,
|
||||
|
@ -1530,7 +1528,7 @@ SECStatus AuthCertificateHookWithInfo(
|
|||
// we currently only support single stapled responses
|
||||
Maybe<nsTArray<uint8_t>> stapledOCSPResponse;
|
||||
if (stapledOCSPResponses && (stapledOCSPResponses->Length() == 1)) {
|
||||
stapledOCSPResponse.emplace(stapledOCSPResponses->ElementAt(0).Clone());
|
||||
stapledOCSPResponse.emplace(stapledOCSPResponses->ElementAt(0));
|
||||
}
|
||||
|
||||
uint32_t certVerifierFlags = 0;
|
||||
|
|
|
@ -93,8 +93,6 @@ class SSLServerCertVerificationResult final
|
|||
|
||||
class SSLServerCertVerificationJob : public Runnable {
|
||||
public:
|
||||
SSLServerCertVerificationJob(const SSLServerCertVerificationJob&) = delete;
|
||||
|
||||
// Must be called only on the socket transport thread
|
||||
static SECStatus Dispatch(uint64_t addrForLogging, void* aPinArg,
|
||||
const UniqueCERTCertificate& serverCert,
|
||||
|
|
|
@ -206,8 +206,7 @@ SecretDecoderRing::AsyncEncryptStrings(const nsTArray<nsCString>& plaintexts,
|
|||
|
||||
// plaintexts are already expected to be UTF-8.
|
||||
nsCOMPtr<nsIRunnable> runnable(NS_NewRunnableFunction(
|
||||
"BackgroundSdrEncryptStrings",
|
||||
[promise, plaintexts = plaintexts.Clone()]() mutable {
|
||||
"BackgroundSdrEncryptStrings", [promise, plaintexts]() mutable {
|
||||
BackgroundSdrEncryptStrings(plaintexts, promise);
|
||||
}));
|
||||
|
||||
|
@ -264,8 +263,7 @@ SecretDecoderRing::AsyncDecryptStrings(
|
|||
|
||||
// encryptedStrings are expected to be base64.
|
||||
nsCOMPtr<nsIRunnable> runnable(NS_NewRunnableFunction(
|
||||
"BackgroundSdrDecryptStrings",
|
||||
[promise, encryptedStrings = encryptedStrings.Clone()]() mutable {
|
||||
"BackgroundSdrDecryptStrings", [promise, encryptedStrings]() mutable {
|
||||
BackgroundSdrDecryptStrings(encryptedStrings, promise);
|
||||
}));
|
||||
|
||||
|
|
|
@ -76,8 +76,8 @@ SECStatus RemoteProcessCertVerification(
|
|||
return SECFailure;
|
||||
}
|
||||
|
||||
const ByteArray serverCertSerialized =
|
||||
CopyableTArray<uint8_t>{aCert->derCert.data, aCert->derCert.len};
|
||||
nsTArray<uint8_t> serverCertSerialized;
|
||||
serverCertSerialized.AppendElements(aCert->derCert.data, aCert->derCert.len);
|
||||
|
||||
nsTArray<ByteArray> peerCertBytes;
|
||||
for (auto& certBytes : aPeerCertChain) {
|
||||
|
|
|
@ -141,12 +141,12 @@ bool VerifySSLServerCertParent::Dispatch(
|
|||
|
||||
Maybe<nsTArray<uint8_t>> stapledOCSPResponse;
|
||||
if (aStapledOCSPResponse) {
|
||||
stapledOCSPResponse.emplace(aStapledOCSPResponse->data().Clone());
|
||||
stapledOCSPResponse.emplace(aStapledOCSPResponse->data());
|
||||
}
|
||||
|
||||
Maybe<nsTArray<uint8_t>> sctsFromTLSExtension;
|
||||
if (aSctsFromTLSExtension) {
|
||||
sctsFromTLSExtension.emplace(aSctsFromTLSExtension->data().Clone());
|
||||
sctsFromTLSExtension.emplace(aSctsFromTLSExtension->data());
|
||||
}
|
||||
|
||||
Maybe<DelegatedCredentialInfo> dcInfo;
|
||||
|
|
|
@ -1815,7 +1815,7 @@ class RemoteClientAuthDataRunnable : public ClientAuthDataRunnable {
|
|||
protected:
|
||||
virtual void RunOnTargetThread() override;
|
||||
|
||||
CopyableTArray<ByteArray> mBuiltChain;
|
||||
nsTArray<ByteArray> mBuiltChain;
|
||||
};
|
||||
|
||||
nsTArray<nsTArray<uint8_t>> CollectCANames(CERTDistNames* caNames) {
|
||||
|
@ -2250,7 +2250,7 @@ void ClientAuthDataRunnable::RunOnTargetThread() {
|
|||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return;
|
||||
}
|
||||
mEnterpriseCertificates.AppendElements(std::move(enterpriseRoots));
|
||||
mEnterpriseCertificates.AppendElements(enterpriseRoots);
|
||||
|
||||
if (NS_WARN_IF(NS_FAILED(CheckForSmartCardChanges()))) {
|
||||
return;
|
||||
|
@ -2475,8 +2475,9 @@ mozilla::pkix::Result RemoteClientAuthDataRunnable::BuildChainForCertificate(
|
|||
void RemoteClientAuthDataRunnable::RunOnTargetThread() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
const ByteArray serverCertSerialized = CopyableTArray<uint8_t>{
|
||||
mServerCert->derCert.data, mServerCert->derCert.len};
|
||||
nsTArray<uint8_t> serverCertSerialized;
|
||||
serverCertSerialized.AppendElements(mServerCert->derCert.data,
|
||||
mServerCert->derCert.len);
|
||||
|
||||
// Note that client cert is NULL in socket process until bug 1632809 is done.
|
||||
Maybe<ByteArray> clientCertSerialized;
|
||||
|
|
|
@ -379,7 +379,7 @@ SiteHPKPState::SiteHPKPState(const nsCString& aHost,
|
|||
mExpireTime(aExpireTime),
|
||||
mState(aState),
|
||||
mIncludeSubdomains(aIncludeSubdomains),
|
||||
mSHA256keys(aSHA256keys.Clone()) {}
|
||||
mSHA256keys(aSHA256keys) {}
|
||||
|
||||
NS_IMETHODIMP
|
||||
SiteHPKPState::GetHostname(nsACString& aHostname) {
|
||||
|
@ -1662,7 +1662,7 @@ nsSiteSecurityService::GetKeyPinsForHostname(
|
|||
foundEntry = privateEntry;
|
||||
}
|
||||
}
|
||||
pinArray = foundEntry->mSHA256keys.Clone();
|
||||
pinArray = foundEntry->mSHA256keys;
|
||||
*aIncludeSubdomains = foundEntry->mIncludeSubdomains;
|
||||
*aFound = true;
|
||||
return NS_OK;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//! Rust helpers for Gecko's nsTArray.
|
||||
|
||||
use crate::gecko_bindings::bindings;
|
||||
use crate::gecko_bindings::structs::{nsTArray, nsTArrayHeader, CopyableTArray};
|
||||
use crate::gecko_bindings::structs::{nsTArray, nsTArrayHeader};
|
||||
use std::mem;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::slice;
|
||||
|
@ -128,16 +128,3 @@ impl<T> nsTArray<T> {
|
|||
self.iter_mut().zip(iter).for_each(|(r, v)| *r = v);
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for CopyableTArray<T> {
|
||||
type Target = nsTArray<T>;
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self._base
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> DerefMut for CopyableTArray<T> {
|
||||
fn deref_mut(&mut self) -> &mut nsTArray<T> {
|
||||
&mut self._base
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,7 +233,6 @@ renaming_overrides_prefixing = true
|
|||
"nsACString" = "nsACString"
|
||||
"nsAString" = "nsAString"
|
||||
"nsString" = "nsString"
|
||||
"CopyableTArray" = "CopyableTArray"
|
||||
"nsTArray" = "nsTArray"
|
||||
"nsPresContext" = "nsPresContext"
|
||||
"ComputedTiming" = "ComputedTiming"
|
||||
|
|
|
@ -5791,7 +5791,7 @@ fn fill_in_missing_keyframe_values(
|
|||
if !longhands_at_offset.contains(property) {
|
||||
unsafe {
|
||||
Gecko_AppendPropertyValuePair(
|
||||
&mut *(*keyframe).mPropertyValues,
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
property.to_nscsspropertyid(),
|
||||
);
|
||||
}
|
||||
|
@ -5873,7 +5873,7 @@ pub unsafe extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
seen.insert(property);
|
||||
|
||||
Gecko_AppendPropertyValuePair(
|
||||
&mut *(*keyframe).mPropertyValues,
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
property.to_nscsspropertyid(),
|
||||
);
|
||||
}
|
||||
|
@ -5922,7 +5922,7 @@ pub unsafe extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
}
|
||||
|
||||
let pair = Gecko_AppendPropertyValuePair(
|
||||
&mut *(*keyframe).mPropertyValues,
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
id.to_nscsspropertyid(),
|
||||
);
|
||||
|
||||
|
@ -5945,7 +5945,7 @@ pub unsafe extern "C" fn Servo_StyleSet_GetKeyframesForName(
|
|||
|
||||
if custom_properties.any_normal() {
|
||||
let pair = Gecko_AppendPropertyValuePair(
|
||||
&mut *(*keyframe).mPropertyValues,
|
||||
&mut (*keyframe).mPropertyValues,
|
||||
nsCSSPropertyID::eCSSPropertyExtra_variable,
|
||||
);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче