Bug 1707057 - Add shutdown handling for viaduct. r=dragana.

Differential Revision: https://phabricator.services.mozilla.com/D118390
This commit is contained in:
Tarik Eshaq 2021-06-22 21:24:56 +00:00
Родитель 50c2489ea5
Коммит f62b6857e9
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -4,6 +4,7 @@
#include "mozilla/ViaductRequest.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ErrorNames.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/ScopeExit.h"
@ -96,6 +97,9 @@ ViaductByteBuffer ViaductRequest::MakeRequest(ViaductByteBuffer reqBuf) {
nsresult ViaductRequest::LaunchRequest(
appservices::httpconfig::protobuf::Request& request) {
if (PastShutdownPhase(ShutdownPhase::AppShutdownNetTeardown)) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIURI> uri;
nsresult rv = NS_NewURI(getter_AddRefs(uri), request.url().c_str());
NS_ENSURE_SUCCESS(rv, rv);