Backed out changeset fef99cfead16 (bug 1516133) for service-workers failures with crashes on MOZ_CrashOOL. CLOSED TREE

--HG--
extra : rebase_source : 19bce71d4915c5925648e8a1ae7022dc46d17b78
This commit is contained in:
Csoregi Natalia 2019-01-23 02:08:39 +02:00
parent 136dc5e8bc
commit ffee6dccf3
3 changed files with 375 additions and 691 deletions

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,7 @@
#include "mozilla/net/UrlClassifierFeatureResult.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/SyncRunnable.h"
#include "nsProxyRelease.h"
#include "UrlClassifierTelemetryUtils.h"
#include "nsIURLFormatter.h"
#include "nsIUploadChannel.h"
@ -166,7 +167,7 @@ class FeatureHolder final {
NS_ENSURE_SUCCESS(rv, rv);
for (TableData* tableData : mTableData) {
rv = aWorker->DoSingleLocalLookupWithURIFragments(
nsresult rv = aWorker->DoSingleLocalLookupWithURIFragments(
fragments, tableData->mTable, tableData->mResults);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
@ -2450,15 +2451,6 @@ bool nsUrlClassifierDBService::ShutdownHasStarted() {
return gShuttingDownThread;
}
// static
nsUrlClassifierDBServiceWorker* nsUrlClassifierDBService::GetWorker() {
if (!sUrlClassifierDBService) {
return nullptr;
}
return sUrlClassifierDBService->mWorker;
}
NS_IMETHODIMP
nsUrlClassifierDBService::AsyncClassifyLocalWithFeatures(
nsIURI* aURI, const nsTArray<RefPtr<nsIUrlClassifierFeature>>& aFeatures,

View File

@ -70,9 +70,7 @@ class nsUrlClassifierDBServiceWorker;
class nsIThread;
class nsIURI;
class UrlClassifierDBServiceWorkerProxy;
namespace mozilla {
namespace safebrowsing {
class Classifier;
class ProtocolParser;
@ -80,11 +78,6 @@ class ProtocolParser;
nsresult TablesToResponse(const nsACString& tables);
} // namespace safebrowsing
namespace net {
class AsyncUrlChannelClassifier;
}
} // namespace mozilla
// This is a proxy class that just creates a background thread and delegates
@ -93,8 +86,6 @@ class nsUrlClassifierDBService final : public nsIUrlClassifierDBService,
public nsIURIClassifier,
public nsIUrlClassifierInfo,
public nsIObserver {
friend class mozilla::net::AsyncUrlChannelClassifier;
public:
// This is thread safe. It throws an exception if the thread is busy.
nsUrlClassifierDBService();
@ -122,10 +113,6 @@ class nsUrlClassifierDBService final : public nsIUrlClassifierDBService,
static bool ShutdownHasStarted();
private:
// This method is used only by AsyncUrlChannelClassifier. If you want to use
// it, please contact a safebrowsing/URL-Classifier peer.
static nsUrlClassifierDBServiceWorker* GetWorker();
const nsTArray<nsCString> kObservedPrefs = {
NS_LITERAL_CSTRING(CHECK_MALWARE_PREF),
NS_LITERAL_CSTRING(CHECK_PHISHING_PREF),