зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631327 - Do not fail IPC when predictor service fails to be obtained because of a rare possibiliy of reentrancy in XPCOM component manager, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D80044
This commit is contained in:
Родитель
e5f6671ee6
Коммит
be42b32114
|
@ -661,7 +661,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvPredPredict(
|
|||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsINetworkPredictor> predictor =
|
||||
do_GetService("@mozilla.org/network/predictor;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, IPC_FAIL_NO_REASON(this));
|
||||
NS_ENSURE_SUCCESS(rv, IPC_OK());
|
||||
|
||||
nsCOMPtr<nsINetworkPredictorVerifier> verifier;
|
||||
if (hasVerifier) {
|
||||
|
@ -679,7 +679,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvPredLearn(
|
|||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsINetworkPredictor> predictor =
|
||||
do_GetService("@mozilla.org/network/predictor;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, IPC_FAIL_NO_REASON(this));
|
||||
NS_ENSURE_SUCCESS(rv, IPC_OK());
|
||||
|
||||
predictor->LearnNative(aTargetURI, aSourceURI, aReason, aOriginAttributes);
|
||||
return IPC_OK();
|
||||
|
@ -690,7 +690,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvPredReset() {
|
|||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsINetworkPredictor> predictor =
|
||||
do_GetService("@mozilla.org/network/predictor;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, IPC_FAIL_NO_REASON(this));
|
||||
NS_ENSURE_SUCCESS(rv, IPC_OK());
|
||||
|
||||
predictor->Reset();
|
||||
return IPC_OK();
|
||||
|
|
Загрузка…
Ссылка в новой задаче