Backed out changeset 0b8ffd5fed51 (bug 1580447) for causing build bustages.

CLOSED TREE
This commit is contained in:
Arthur Iakab 2020-03-19 14:53:26 +02:00
Родитель c602e0e0d7
Коммит 768dcd08ae
20 изменённых файлов: 4 добавлений и 115 удалений

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

@ -23,7 +23,6 @@
#include "mozilla/ResultExtensions.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/IdleDeadline.h"
#include "mozilla/dom/JSWindowActorService.h"
@ -1188,11 +1187,6 @@ void ChromeUtils::GenerateMediaControlKeysTestEvent(
}
}
/* static */
nsIContentChild* ChromeUtils::GetContentChild(const GlobalObject&) {
return ContentChild::GetSingleton();
}
/* static */
void ChromeUtils::GetCurrentActiveMediaMetadata(const GlobalObject& aGlobal,
MediaMetadataInit& aMetadata) {

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

@ -11,7 +11,6 @@
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/ChromeUtilsBinding.h"
#include "mozilla/ErrorResult.h"
#include "nsIContentChild.h"
namespace mozilla {
@ -204,8 +203,6 @@ class ChromeUtils {
static void GenerateMediaControlKeysTestEvent(
const GlobalObject& aGlobal, MediaControlKeysTestEvent aEvent);
static nsIContentChild* GetContentChild(const GlobalObject&);
// This function would only be used for testing.
static void GetCurrentActiveMediaMetadata(const GlobalObject& aGlobal,
MediaMetadataInit& aMetadata);

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

@ -1885,8 +1885,6 @@ addExternalIface('nsITreeSelection', nativeType='nsITreeSelection',
notflattened=True)
addExternalIface('nsISupports', nativeType='nsISupports')
addExternalIface('nsIDocShell', nativeType='nsIDocShell', notflattened=True)
addExternalIface('nsIContentChild', nativeType='nsIContentChild', notflattened=True)
addExternalIface('nsIContentParent', nativeType='nsIContentParent', notflattened=True)
addExternalIface('nsIReferrerInfo', nativeType='nsIReferrerInfo', notflattened=True)
addExternalIface('nsIWebNavigation', nativeType='nsIWebNavigation', notflattened=True)
addExternalIface('nsIEditor', nativeType='nsIEditor', notflattened=True)

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

@ -446,12 +446,6 @@ partial namespace ChromeUtils {
[ChromeOnly]
void generateMediaControlKeysTestEvent(MediaControlKeysTestEvent aEvent);
/**
* ContentChild of the current process.
*/
[ChromeOnly]
readonly attribute nsIContentChild? contentChild;
// This is used to get the media metadata from the current main controller in
// testing.
[ChromeOnly]

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

@ -5,8 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
interface nsISupports;
interface nsIContentChild;
interface nsIContentParent;
interface mixin JSWindowActor {
[Throws]

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

@ -54,10 +54,6 @@ interface WindowGlobalParent : WindowContext {
// String containing serialized content blocking log.
readonly attribute DOMString contentBlockingLog;
// ContentParent of the process this window is loaded in.
// Will be `null` for windows loaded in the parent process.
readonly attribute nsIContentParent? contentParent;
static WindowGlobalParent? getByInnerWindowId(unsigned long long innerWindowId);
/**

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

@ -604,9 +604,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(
@ -2871,8 +2870,7 @@ void ContentChild::ForceKillTimerCallback(nsITimer* aTimer, void* aClosure) {
mozilla::ipc::IPCResult ContentChild::RecvShutdown() {
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
if (os) {
os->NotifyObservers(ToSupports(this), "content-child-will-shutdown",
nullptr);
os->NotifyObservers(this, "content-child-will-shutdown", nullptr);
}
ShutdownInternal();
@ -2919,7 +2917,7 @@ void ContentChild::ShutdownInternal() {
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
if (os) {
os->NotifyObservers(ToSupports(this), "content-child-shutdown", nullptr);
os->NotifyObservers(this, "content-child-shutdown", nullptr);
}
#if defined(XP_WIN)
@ -4288,11 +4286,6 @@ mozilla::ipc::IPCResult ContentChild::RecvInitSandboxTesting(
}
#endif
NS_IMETHODIMP ContentChild::GetChildID(uint64_t* aOut) {
*aOut = mID;
return NS_OK;
}
} // namespace dom
#if defined(__OpenBSD__) && defined(MOZ_SANDBOX)

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

@ -21,7 +21,6 @@
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
#include "nsAutoPtr.h"
#include "nsHashKeys.h"
#include "nsIContentChild.h"
#include "nsIObserver.h"
#include "nsTHashtable.h"
#include "nsStringFwd.h"
@ -80,7 +79,6 @@ enum class MediaControlKeysEvent : uint32_t;
class ContentChild final
: public PContentChild,
public nsIContentChild,
public nsIWindowProvider,
public CPOWManagerGetter,
public mozilla::ipc::IShmemAllocator,
@ -93,7 +91,6 @@ class ContentChild final
friend class PContentChild;
public:
NS_DECL_NSICONTENTCHILD
NS_DECL_NSIWINDOWPROVIDER
ContentChild();
@ -897,10 +894,6 @@ class ContentChild final
DISALLOW_EVIL_CONSTRUCTORS(ContentChild);
};
inline nsISupports* ToSupports(mozilla::dom::ContentChild* aContentChild) {
return static_cast<nsIContentChild*>(aContentChild);
}
} // namespace dom
} // namespace mozilla

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

@ -2922,12 +2922,11 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(ContentParent)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ContentParent)
NS_INTERFACE_MAP_ENTRY_CONCRETE(ContentParent)
NS_INTERFACE_MAP_ENTRY(nsIContentParent)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsIDOMGeoPositionCallback)
NS_INTERFACE_MAP_ENTRY(nsIDOMGeoPositionErrorCallback)
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentParent)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIObserver)
NS_INTERFACE_MAP_END
NS_IMETHODIMP
@ -6453,11 +6452,6 @@ mozilla::ipc::IPCResult ContentParent::RecvCommitWindowContextTransaction(
return aTransaction.CommitFromIPC(aContext, this);
}
NS_IMETHODIMP ContentParent::GetChildID(uint64_t* aOut) {
*aOut = this->ChildID();
return NS_OK;
}
} // namespace dom
} // namespace mozilla

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

@ -35,7 +35,6 @@
#include "nsPluginTags.h"
#include "nsFrameMessageManager.h"
#include "nsHashKeys.h"
#include "nsIContentParent.h"
#include "nsIInterfaceRequestor.h"
#include "nsIObserver.h"
#include "nsIRemoteTab.h"
@ -133,7 +132,6 @@ struct CancelContentJSOptions;
class ContentParent final
: public PContentParent,
public nsIContentParent,
public nsIObserver,
public nsIDOMGeoPositionCallback,
public nsIDOMGeoPositionErrorCallback,
@ -1302,8 +1300,6 @@ class ContentParent final
static bool ShouldSyncPreference(const char16_t* aData);
NS_IMETHOD GetChildID(uint64_t* aChildID) override;
private:
// Return an existing ContentParent if possible. Otherwise, `nullptr`.
static already_AddRefed<ContentParent> GetUsedBrowserProcess(
@ -1495,10 +1491,6 @@ class RemoteWindowContext final : public nsIRemoteWindowContext,
RefPtr<BrowserParent> mBrowserParent;
};
inline nsISupports* ToSupports(mozilla::dom::ContentParent* aContentParent) {
return static_cast<nsIContentParent*>(aContentParent);
}
} // namespace dom
} // namespace mozilla

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

@ -11,11 +11,9 @@
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/JSWindowActor.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
#include "nsIContentChild.h"
namespace mozilla {
namespace dom {

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

@ -6,7 +6,6 @@
#include "mozilla/dom/JSWindowActorBinding.h"
#include "mozilla/dom/JSWindowActorParent.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/WindowGlobalParent.h"
#include "mozilla/dom/MessageManagerBinding.h"

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

@ -11,7 +11,6 @@
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/JSWindowActor.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"

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

@ -649,15 +649,6 @@ nsIGlobalObject* WindowGlobalParent::GetParentObject() {
return xpc::NativeGlobal(xpc::PrivilegedJunkScope());
}
ContentParent* WindowGlobalParent::GetContentParent() {
RefPtr<BrowserParent> browserParent = GetBrowserParent();
if (!browserParent) {
return nullptr;
}
return browserParent->Manager();
}
NS_IMPL_CYCLE_COLLECTION_INHERITED(WindowGlobalParent, WindowContext,
mWindowActors)

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

@ -19,7 +19,6 @@
#include "nsRefPtrHashtable.h"
#include "nsWrapperCache.h"
#include "nsISupports.h"
#include "nsIContentParent.h"
#include "mozilla/dom/WindowGlobalActor.h"
#include "mozilla/dom/CanonicalBrowsingContext.h"
@ -156,8 +155,6 @@ class WindowGlobalParent final : public WindowContext,
ContentBlockingLog* GetContentBlockingLog() { return &mContentBlockingLog; }
ContentParent* GetContentParent();
protected:
const nsAString& GetRemoteType() override;
JSWindowActor::Type GetSide() override { return JSWindowActor::Type::Parent; }

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

@ -8,8 +8,6 @@ with Files("**"):
BUG_COMPONENT = ("Core", "DOM: Content Processes")
XPIDL_SOURCES += [
'nsIContentChild.idl',
'nsIContentParent.idl',
'nsIHangReport.idl',
'nsIRemoteWebProgress.idl',
'nsIRemoteWebProgressRequest.idl',

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

@ -1,7 +0,0 @@
#include "nsISupports.idl"
[scriptable, builtinclass, uuid(b0c6e5f3-02f1-4f11-a0af-336fc231f3bf)]
interface nsIContentChild: nsISupports {
// Internal ID of the process.
readonly attribute unsigned long long childID;
};

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

@ -1,7 +0,0 @@
#include "nsISupports.idl"
[scriptable, builtinclass, uuid(81fc08b9-c901-471f-ab0d-876362eba770)]
interface nsIContentParent: nsISupports {
// Internal ID of the process.
readonly attribute unsigned long long childID;
};

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

@ -10,7 +10,6 @@ support-files =
support-files=
file_mediaPlayback.html
audio.ogg
[browser_process_childid.js]
[browser_registerWindowActor.js]
[browser_sendAsyncMessage.js]
[browser_sendQuery.js]

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

@ -1,27 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test that `process.childID` is defined.
declTest("test childid", {
async test(browser) {
let parent = browser.browsingContext.currentWindowGlobal;
ok(
parent.contentParent.childID,
"parent contentParent.childID should have a value."
);
await SpecialPowers.spawn(
browser,
[parent.contentParent.childID],
async function(parentChildID) {
ok(
ChromeUtils.contentChild.childID,
"child process.childID should have a value."
);
let childID = ChromeUtils.contentChild.childID;
is(parentChildID, childID);
}
);
},
});