mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1721459 - Remove nsIDeprecationWarner r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D120474
This commit is contained in:
parent
31121ed5e7
commit
3918a58a02
@ -596,7 +596,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDocShell)
|
||||
NS_INTERFACE_MAP_ENTRY(nsILoadContext)
|
||||
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsINetworkInterceptController,
|
||||
mInterceptController)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDeprecationWarner)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDocLoader)
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -13153,17 +13152,6 @@ UniquePtr<ClientSource> nsDocShell::TakeInitialClientSource() {
|
||||
return std::move(mInitialClientSource);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::IssueWarning(uint32_t aWarning, bool aAsError) {
|
||||
if (mContentViewer) {
|
||||
RefPtr<Document> doc = mContentViewer->GetDocument();
|
||||
if (doc) {
|
||||
doc->WarnOnceAbout(DeprecatedOperations(aWarning), aAsError);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetEditingSession(nsIEditingSession** aEditSession) {
|
||||
if (!NS_SUCCEEDED(EnsureEditorData())) {
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "nsDocLoader.h"
|
||||
#include "nsIAuthPromptProvider.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
@ -101,7 +100,6 @@ class nsDocShell final : public nsDocLoader,
|
||||
public nsIAuthPromptProvider,
|
||||
public nsILoadContext,
|
||||
public nsINetworkInterceptController,
|
||||
public nsIDeprecationWarner,
|
||||
public mozilla::SupportsWeakPtr {
|
||||
public:
|
||||
enum InternalLoad : uint32_t {
|
||||
@ -173,7 +171,6 @@ class nsDocShell final : public nsDocLoader,
|
||||
NS_DECL_NSIWEBPAGEDESCRIPTOR
|
||||
NS_DECL_NSIAUTHPROMPTPROVIDER
|
||||
NS_DECL_NSINETWORKINTERCEPTCONTROLLER
|
||||
NS_DECL_NSIDEPRECATIONWARNER
|
||||
|
||||
// Create a new nsDocShell object.
|
||||
static already_AddRefed<nsDocShell> Create(
|
||||
|
@ -32,7 +32,6 @@ XPIDL_SOURCES += [
|
||||
"nsIContentSniffer.idl",
|
||||
"nsIDashboard.idl",
|
||||
"nsIDashboardEventNotifier.idl",
|
||||
"nsIDeprecationWarner.idl",
|
||||
"nsIDHCPClient.idl",
|
||||
"nsIDownloader.idl",
|
||||
"nsIEncodedChannel.idl",
|
||||
|
@ -1,23 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/**
|
||||
* Interface for warning about deprecated operations. Consumers should
|
||||
* attach this interface to the channel's notification callbacks/loadgroup.
|
||||
*/
|
||||
[uuid(665c5124-2c52-41ba-ae72-2393f8e76c25)]
|
||||
interface nsIDeprecationWarner : nsISupports
|
||||
{
|
||||
/**
|
||||
* Issue a deprecation warning.
|
||||
*
|
||||
* @param aWarning a warning code as declared in nsDeprecatedOperationList.h.
|
||||
* @param aAsError optional boolean flag indicating whether the warning
|
||||
* should be treated as an error.
|
||||
*/
|
||||
void issueWarning(in uint32_t aWarning, [optional] in bool aAsError);
|
||||
};
|
@ -53,7 +53,6 @@
|
||||
#include "InterceptedChannel.h"
|
||||
#include "nsContentSecurityManager.h"
|
||||
#include "nsICompressConvStats.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsISerialEventTarget.h"
|
||||
@ -2867,16 +2866,6 @@ void HttpChannelChild::CancelOnMainThread(nsresult aRv) {
|
||||
mEventQ->Resume();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult HttpChannelChild::RecvIssueDeprecationWarning(
|
||||
const uint32_t& warning, const bool& asError) {
|
||||
nsCOMPtr<nsIDeprecationWarner> warner;
|
||||
GetCallback(warner);
|
||||
if (warner) {
|
||||
warner->IssueWarning(warning, asError);
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult HttpChannelChild::RecvSetPriority(
|
||||
const int16_t& aPriority) {
|
||||
mPriority = aPriority;
|
||||
|
@ -137,9 +137,6 @@ class HttpChannelChild final : public PHttpChannelChild,
|
||||
mozilla::ipc::IPCResult RecvReportSecurityMessage(
|
||||
const nsString& messageTag, const nsString& messageCategory) override;
|
||||
|
||||
mozilla::ipc::IPCResult RecvIssueDeprecationWarning(
|
||||
const uint32_t& warning, const bool& asError) override;
|
||||
|
||||
mozilla::ipc::IPCResult RecvSetPriority(const int16_t& aPriority) override;
|
||||
|
||||
mozilla::ipc::IPCResult RecvOriginalCacheInputStreamAvailable(
|
||||
|
@ -266,7 +266,6 @@ NS_INTERFACE_MAP_BEGIN(HttpChannelParent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIParentChannel)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIParentRedirectingChannel)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDeprecationWarner)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAsyncVerifyRedirectReadyCallback)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIRedirectResultListener)
|
||||
@ -1873,12 +1872,6 @@ nsresult HttpChannelParent::ReportSecurityMessage(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpChannelParent::IssueWarning(uint32_t aWarning, bool aAsError) {
|
||||
Unused << SendIssueDeprecationWarning(aWarning, aAsError);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsIAsyncVerifyRedirectReadyCallback
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "nsIRedirectResultListener.h"
|
||||
#include "nsHttpChannel.h"
|
||||
#include "mozilla/dom/ipc/IdType.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsIMultiPartChannel.h"
|
||||
|
||||
class nsICacheEntry;
|
||||
@ -51,7 +50,6 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
|
||||
public PHttpChannelParent,
|
||||
public nsIParentRedirectingChannel,
|
||||
public nsIProgressEventSink,
|
||||
public nsIDeprecationWarner,
|
||||
public HttpChannelSecurityWarningReporter,
|
||||
public nsIAsyncVerifyRedirectReadyCallback,
|
||||
public nsIChannelEventSink,
|
||||
@ -67,7 +65,6 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
|
||||
NS_DECL_NSIPARENTREDIRECTINGCHANNEL
|
||||
NS_DECL_NSIPROGRESSEVENTSINK
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSIDEPRECATIONWARNER
|
||||
NS_DECL_NSIASYNCVERIFYREDIRECTREADYCALLBACK
|
||||
NS_DECL_NSICHANNELEVENTSINK
|
||||
NS_DECL_NSIREDIRECTRESULTLISTENER
|
||||
|
@ -109,9 +109,6 @@ child:
|
||||
// avoid races: see bug 591708).
|
||||
async DeleteSelf();
|
||||
|
||||
// Tell the child to issue a deprecation warning.
|
||||
async IssueDeprecationWarning(uint32_t warning, bool asError);
|
||||
|
||||
// When CORS blocks the request in the parent process, it doesn't have the
|
||||
// correct window ID, so send the message to the child for logging to the web
|
||||
// console.
|
||||
|
@ -99,7 +99,6 @@
|
||||
#include "nsIHttpPushListener.h"
|
||||
#include "nsIX509Cert.h"
|
||||
#include "ScopedNSSTypes.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsIDNSRecord.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsICompressConvStats.h"
|
||||
|
Loading…
Reference in New Issue
Block a user