From da3402759d61249e13521c60bd3afdaf63465ea7 Mon Sep 17 00:00:00 2001 From: Dimi Lee Date: Mon, 6 Jan 2020 20:00:51 +0000 Subject: [PATCH] Bug 1601660 - Part 2: Remove getContentBlockingLog from nsIDocShell.idl r=Ehsan This patch removes the unnecessary getContentBlockingLog function from nsIDocShell.idl. Differential Revision: https://phabricator.services.mozilla.com/D57444 --HG-- extra : moz-landing-system : lando --- docshell/base/nsDocShell.cpp | 22 ---------------------- docshell/base/nsIDocShell.idl | 11 ----------- dom/base/Document.h | 5 ----- 3 files changed, 38 deletions(-) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 501f0dcbe4ef..8c2dfb6ac3ac 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -3353,28 +3353,6 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) { return NS_OK; } -NS_IMETHODIMP -nsDocShell::GetContentBlockingLog(Promise** aPromise) { - NS_ENSURE_ARG_POINTER(aPromise); - - Document* doc = mContentViewer->GetDocument(); - ErrorResult rv; - RefPtr promise = Promise::Create(doc->GetOwnerGlobal(), rv); - if (NS_WARN_IF(rv.Failed())) { - return rv.StealNSResult(); - } - - if (mContentViewer) { - promise->MaybeResolve( - NS_ConvertUTF8toUTF16(doc->GetContentBlockingLog()->Stringify())); - } else { - promise->MaybeRejectWithUndefined(); - } - - promise.forget(aPromise); - return NS_OK; -} - NS_IMETHODIMP nsDocShell::GetIsNavigating(bool* aOut) { *aOut = mIsNavigating; diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index 623ed5fa939a..db95b181388e 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -1097,17 +1097,6 @@ interface nsIDocShell : nsIDocShellTreeItem */ [infallible] readonly attribute ContentFrameMessageManager messageManager; - /** - * Asynchronously retrieve a JSON string representing a log of the - * content blocking events happened so far in the current tab from the - * content process. - * - * This returns a Promise which resolves to a string on success, and is - * rejected on failure. For documentation on the string format, please - * see nsISecureBrowserUI.contentBlockingLogJSON. - */ - Promise getContentBlockingLog(); - /** * This returns a Promise which resolves to a boolean. True when the * document has Tracking Content that has been blocked from loading, false diff --git a/dom/base/Document.h b/dom/base/Document.h index 31e015e8db43..bfc8673b94e3 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -1120,11 +1120,6 @@ class Document : public nsINode, MOZ_MUST_USE RefPtr GetContentBlockingEvents(); - /** - * Get the content blocking log. - */ - ContentBlockingLog* GetContentBlockingLog() { return &mContentBlockingLog; } - /** * Get tracking content blocked flag for this document. */