mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1536372 - Get rid of PURLClassifierInfo MaybeInfo, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D23992 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
11de36bb5e
commit
6b62a78cfd
@ -16,7 +16,7 @@ protocol PURLClassifier
|
||||
manager PContent;
|
||||
|
||||
child:
|
||||
async __delete__(MaybeInfo info, nsresult errorCode);
|
||||
async __delete__(ClassifierInfo? info, nsresult errorCode);
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
@ -2,8 +2,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/. */
|
||||
|
||||
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@ -13,12 +11,5 @@ struct ClassifierInfo {
|
||||
nsCString fullhash;
|
||||
};
|
||||
|
||||
union MaybeInfo {
|
||||
ClassifierInfo;
|
||||
void_t;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
||||
|
@ -23,13 +23,13 @@ class URLClassifierChild : public PURLClassifierChild {
|
||||
mCallback = aCallback;
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult Recv__delete__(const MaybeInfo& aInfo,
|
||||
mozilla::ipc::IPCResult Recv__delete__(const Maybe<ClassifierInfo>& aInfo,
|
||||
const nsresult& aResult) override {
|
||||
MOZ_ASSERT(mCallback);
|
||||
if (aInfo.type() == MaybeInfo::TClassifierInfo) {
|
||||
mCallback->OnClassifyComplete(aResult, aInfo.get_ClassifierInfo().list(),
|
||||
aInfo.get_ClassifierInfo().provider(),
|
||||
aInfo.get_ClassifierInfo().fullhash());
|
||||
if (aInfo.isSome()) {
|
||||
mCallback->OnClassifyComplete(aResult, aInfo.ref().list(),
|
||||
aInfo.ref().provider(),
|
||||
aInfo.ref().fullhash());
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class URLClassifierParent : public nsIURIClassifierCallback,
|
||||
if (mIPCOpen) {
|
||||
ClassifierInfo info = ClassifierInfo(
|
||||
nsCString(aList), nsCString(aProvider), nsCString(aFullHash));
|
||||
Unused << Send__delete__(this, info, aErrorCode);
|
||||
Unused << Send__delete__(this, Some(info), aErrorCode);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -41,7 +41,7 @@ class URLClassifierParent : public nsIURIClassifierCallback,
|
||||
// Custom.
|
||||
void ClassificationFailed() {
|
||||
if (mIPCOpen) {
|
||||
Unused << Send__delete__(this, void_t(), NS_ERROR_FAILURE);
|
||||
Unused << Send__delete__(this, Nothing(), NS_ERROR_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user