зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1522579 - Part 6: Completely remove nsIContent{Parent,Child}, r=mccr8
Depends on D20553 Differential Revision: https://phabricator.services.mozilla.com/D20870 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b399ffc113
Коммит
dec9708f74
|
@ -50,7 +50,6 @@
|
|||
#include "mozilla/dom/RemoteWorkerService.h"
|
||||
#include "mozilla/dom/ServiceWorkerManager.h"
|
||||
#include "mozilla/dom/TabGroup.h"
|
||||
#include "mozilla/dom/nsIContentChild.h"
|
||||
#include "mozilla/dom/URLClassifierChild.h"
|
||||
#include "mozilla/dom/WorkerDebugger.h"
|
||||
#include "mozilla/dom/WorkerDebuggerManager.h"
|
||||
|
@ -583,9 +582,8 @@ ContentChild::~ContentChild() {
|
|||
#endif
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(ContentChild)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentChild)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWindowProvider)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentChild)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
mozilla::ipc::IPCResult ContentChild::RecvSetXPCOMProcessAttributes(
|
||||
|
@ -2836,8 +2834,7 @@ void ContentChild::StartForceKillTimer() {
|
|||
mozilla::ipc::IPCResult ContentChild::RecvShutdown() {
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os) {
|
||||
os->NotifyObservers(static_cast<nsIContentChild*>(this),
|
||||
"content-child-will-shutdown", nullptr);
|
||||
os->NotifyObservers(this, "content-child-will-shutdown", nullptr);
|
||||
}
|
||||
|
||||
ShutdownInternal();
|
||||
|
@ -2884,8 +2881,7 @@ void ContentChild::ShutdownInternal() {
|
|||
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os) {
|
||||
os->NotifyObservers(static_cast<nsIContentChild*>(this),
|
||||
"content-child-shutdown", nullptr);
|
||||
os->NotifyObservers(this, "content-child-shutdown", nullptr);
|
||||
}
|
||||
|
||||
#if defined(XP_WIN)
|
||||
|
|
|
@ -9,14 +9,18 @@
|
|||
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/nsIContentChild.h"
|
||||
#include "mozilla/dom/PBrowserOrId.h"
|
||||
#include "mozilla/dom/PContentChild.h"
|
||||
#include "mozilla/dom/CPOWManagerGetter.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/ipc/Shmem.h"
|
||||
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsStringFwd.h"
|
||||
#include "nsTArrayForwardDeclare.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
|
||||
#include "nsIWindowProvider.h"
|
||||
|
@ -77,7 +81,8 @@ class FileCreatorHelper;
|
|||
|
||||
class ContentChild final : public PContentChild,
|
||||
public nsIWindowProvider,
|
||||
public nsIContentChild {
|
||||
public CPOWManagerGetter,
|
||||
public mozilla::ipc::IShmemAllocator {
|
||||
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
|
||||
typedef mozilla::ipc::FileDescriptor FileDescriptor;
|
||||
typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
|
||||
|
|
|
@ -451,7 +451,7 @@ ContentParentsMemoryReporter::CollectReports(
|
|||
"queued-ipc-messages/content-parent"
|
||||
"(%s, pid=%d, %s, 0x%p, refcnt=%" PRIuPTR ")",
|
||||
NS_ConvertUTF16toUTF8(friendlyName).get(), cp->Pid(), channelStr,
|
||||
static_cast<nsIContentParent*>(cp), refcnt);
|
||||
static_cast<nsIObserver*>(cp), refcnt);
|
||||
|
||||
NS_NAMED_LITERAL_CSTRING(
|
||||
desc,
|
||||
|
@ -2224,8 +2224,7 @@ ContentParent::ContentParent(ContentParent* aOpener,
|
|||
RecordReplayState aRecordReplayState,
|
||||
const nsAString& aRecordingFile,
|
||||
int32_t aJSPluginID)
|
||||
: nsIContentParent(),
|
||||
mSelfRef(nullptr),
|
||||
: mSelfRef(nullptr),
|
||||
mSubprocess(nullptr),
|
||||
mLaunchTS(TimeStamp::Now()),
|
||||
mLaunchYieldTS(mLaunchTS),
|
||||
|
@ -2912,7 +2911,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(ContentParent)
|
|||
NS_IMPL_CYCLE_COLLECTING_RELEASE(ContentParent)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ContentParent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentParent)
|
||||
NS_INTERFACE_MAP_ENTRY_CONCRETE(ContentParent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMGeoPositionCallback)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMGeoPositionErrorCallback)
|
||||
|
|
|
@ -8,11 +8,14 @@
|
|||
#define mozilla_dom_ContentParent_h
|
||||
|
||||
#include "mozilla/dom/PContentParent.h"
|
||||
#include "mozilla/dom/nsIContentParent.h"
|
||||
#include "mozilla/dom/CPOWManagerGetter.h"
|
||||
#include "mozilla/dom/ipc/IdType.h"
|
||||
#include "mozilla/gfx/gfxVarReceiver.h"
|
||||
#include "mozilla/gfx/GPUProcessListener.h"
|
||||
#include "mozilla/ipc/BackgroundUtils.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/ipc/PParentToChildStreamParent.h"
|
||||
#include "mozilla/ipc/PChildToParentStreamParent.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/FileUtils.h"
|
||||
#include "mozilla/HalTypes.h"
|
||||
|
@ -89,6 +92,7 @@ class ProtocolFuzzerHelper;
|
|||
|
||||
namespace jsipc {
|
||||
class PJavaScriptParent;
|
||||
class CpowEntry;
|
||||
} // namespace jsipc
|
||||
|
||||
namespace layers {
|
||||
|
@ -106,8 +110,14 @@ class TabContext;
|
|||
class GetFilesHelper;
|
||||
class MemoryReportRequestHost;
|
||||
|
||||
#define NS_CONTENTPARENT_IID \
|
||||
{ \
|
||||
0xeeec9ebf, 0x8ecf, 0x4e38, { \
|
||||
0x81, 0xda, 0xb7, 0x34, 0x13, 0x7e, 0xac, 0xf3 \
|
||||
} \
|
||||
}
|
||||
|
||||
class ContentParent final : public PContentParent,
|
||||
public nsIContentParent,
|
||||
public nsIObserver,
|
||||
public nsIDOMGeoPositionCallback,
|
||||
public nsIDOMGeoPositionErrorCallback,
|
||||
|
@ -115,7 +125,10 @@ class ContentParent final : public PContentParent,
|
|||
public gfx::gfxVarReceiver,
|
||||
public mozilla::LinkedListElement<ContentParent>,
|
||||
public gfx::GPUProcessListener,
|
||||
public mozilla::MemoryReportingProcess {
|
||||
public mozilla::MemoryReportingProcess,
|
||||
public mozilla::dom::ipc::MessageManagerCallback,
|
||||
public CPOWManagerGetter,
|
||||
public mozilla::ipc::IShmemAllocator {
|
||||
typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
|
||||
typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
|
||||
typedef mozilla::ipc::PFileDescriptorSetParent PFileDescriptorSetParent;
|
||||
|
@ -136,6 +149,8 @@ class ContentParent final : public PContentParent,
|
|||
using LaunchPromise =
|
||||
GeckoChildProcessHost::LaunchPromise<RefPtr<ContentParent>>;
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_CONTENTPARENT_IID)
|
||||
|
||||
/**
|
||||
* Create a subprocess suitable for use later as a content process.
|
||||
*/
|
||||
|
@ -1299,6 +1314,8 @@ class ContentParent final : public PContentParent,
|
|||
nsTHashtable<nsRefPtrHashKey<BrowsingContextGroup>> mGroups;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(ContentParent, NS_CONTENTPARENT_IID)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -440,10 +440,9 @@ void ProcessPriorityManagerImpl::ObserveContentParentCreated(
|
|||
nsISupports* aContentParent) {
|
||||
// Do nothing; it's sufficient to get the PPPM. But assign to nsRefPtr so we
|
||||
// don't leak the already_AddRefed object.
|
||||
nsCOMPtr<nsIContentParent> cp = do_QueryInterface(aContentParent);
|
||||
RefPtr<ContentParent> cp = do_QueryObject(aContentParent);
|
||||
RefPtr<ParticularProcessPriorityManager> pppm =
|
||||
GetParticularProcessPriorityManager(
|
||||
static_cast<ContentParent*>(cp.get()));
|
||||
GetParticularProcessPriorityManager(cp);
|
||||
}
|
||||
|
||||
void ProcessPriorityManagerImpl::ObserveContentParentDestroyed(
|
||||
|
|
|
@ -43,8 +43,6 @@ EXPORTS.mozilla.dom += [
|
|||
'JSWindowActorParent.h',
|
||||
'JSWindowActorService.h',
|
||||
'MemoryReportRequest.h',
|
||||
'nsIContentChild.h',
|
||||
'nsIContentParent.h',
|
||||
'PermissionMessageUtils.h',
|
||||
'RemoteFrameChild.h',
|
||||
'RemoteFrameParent.h',
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef mozilla_dom_nsIContentChild_h
|
||||
#define mozilla_dom_nsIContentChild_h
|
||||
|
||||
#include "mozilla/dom/ipc/IdType.h"
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsStringFwd.h"
|
||||
#include "nsTArrayForwardDeclare.h"
|
||||
#include "mozilla/dom/CPOWManagerGetter.h"
|
||||
#include "mozilla/ipc/Shmem.h"
|
||||
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
|
||||
|
||||
#define NS_ICONTENTCHILD_IID \
|
||||
{ \
|
||||
0x4eed2e73, 0x94ba, 0x48a8, { \
|
||||
0xa2, 0xd1, 0xa5, 0xed, 0x86, 0xd7, 0xbb, 0xe4 \
|
||||
} \
|
||||
}
|
||||
|
||||
namespace IPC {
|
||||
class Principal;
|
||||
} // namespace IPC
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
class FileDescriptor;
|
||||
class PChildToParentStreamChild;
|
||||
class PParentToChildStreamChild;
|
||||
class Shmem;
|
||||
} // namespace ipc
|
||||
|
||||
namespace jsipc {
|
||||
class PJavaScriptChild;
|
||||
class CpowEntry;
|
||||
} // namespace jsipc
|
||||
|
||||
namespace dom {
|
||||
|
||||
class Blob;
|
||||
class BlobImpl;
|
||||
class BlobConstructorParams;
|
||||
class ClonedMessageData;
|
||||
class IPCTabContext;
|
||||
class PBrowserChild;
|
||||
|
||||
class nsIContentChild : public nsISupports,
|
||||
public CPOWManagerGetter,
|
||||
public mozilla::ipc::IShmemAllocator {
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTCHILD_IID)
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentChild, NS_ICONTENTCHILD_IID)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* mozilla_dom_nsIContentChild_h */
|
|
@ -1,67 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef mozilla_dom_nsIContentParent_h
|
||||
#define mozilla_dom_nsIContentParent_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/ipc/IdType.h"
|
||||
#include "mozilla/ipc/ProtocolUtils.h"
|
||||
#include "mozilla/ipc/PChildToParentStreamParent.h"
|
||||
#include "mozilla/ipc/PParentToChildStreamParent.h"
|
||||
|
||||
#include "nsFrameMessageManager.h"
|
||||
#include "nsISupports.h"
|
||||
#include "mozilla/dom/CPOWManagerGetter.h"
|
||||
|
||||
#define NS_ICONTENTPARENT_IID \
|
||||
{ \
|
||||
0xeeec9ebf, 0x8ecf, 0x4e38, { \
|
||||
0x81, 0xda, 0xb7, 0x34, 0x13, 0x7e, 0xac, 0xf3 \
|
||||
} \
|
||||
}
|
||||
|
||||
namespace IPC {
|
||||
class Principal;
|
||||
} // namespace IPC
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace jsipc {
|
||||
class PJavaScriptParent;
|
||||
class CpowEntry;
|
||||
} // namespace jsipc
|
||||
|
||||
namespace ipc {
|
||||
class PChildToParentStreamParent;
|
||||
class PParentToChildStreamParent;
|
||||
class PIPCBlobInputStreamParent;
|
||||
} // namespace ipc
|
||||
|
||||
namespace dom {
|
||||
|
||||
class Blob;
|
||||
class BlobConstructorParams;
|
||||
class BlobImpl;
|
||||
class ProcessMessageManager;
|
||||
class ContentParent;
|
||||
class IPCTabContext;
|
||||
class PBrowserParent;
|
||||
|
||||
class nsIContentParent : public nsISupports,
|
||||
public mozilla::dom::ipc::MessageManagerCallback,
|
||||
public CPOWManagerGetter,
|
||||
public mozilla::ipc::IShmemAllocator {
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTPARENT_IID)
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentParent, NS_ICONTENTPARENT_IID)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* mozilla_dom_nsIContentParent_h */
|
|
@ -19,6 +19,9 @@
|
|||
#if defined(OS_POSIX)
|
||||
# include "chrome/common/file_descriptor_set_posix.h"
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
# include "windows.h"
|
||||
#endif
|
||||
#include "chrome/common/ipc_message.h"
|
||||
|
||||
template <typename T>
|
||||
|
|
Загрузка…
Ссылка в новой задаче