Bug 1620594 - Part 4: Remove SetEventTargetForActor with SystemGroup target. r=nika

Depends on D67633

Differential Revision: https://phabricator.services.mozilla.com/D67634

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Farre 2020-04-07 15:16:54 +00:00
Родитель 9e36af2ab6
Коммит 80a8c9ff06
7 изменённых файлов: 9 добавлений и 79 удалений

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

@ -2805,9 +2805,6 @@ void BrowserChild::InitAPZState() {
RefPtr<GeckoContentController> contentController =
new ContentProcessController(this);
APZChild* apzChild = new APZChild(contentController);
cbc->SetEventTargetForActor(apzChild,
TabGroup()->EventTargetFor(TaskCategory::Other));
MOZ_ASSERT(apzChild->GetActorEventTarget());
cbc->SendPAPZConstructor(apzChild, mLayersId);
}

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

@ -1015,10 +1015,6 @@ nsresult ContentChild::ProvideWindowCommon(
ipcContext->get_PopupIPCTabContext().opener() = aTabOpener;
}
nsCOMPtr<nsIEventTarget> target =
tabGroup->EventTargetFor(TaskCategory::Other);
SetEventTargetForActor(newChild, target);
if (IsShuttingDown()) {
return NS_ERROR_ABORT;
}

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

@ -12,7 +12,6 @@
#include "base/message_loop.h" // for MessageLoop
#include "base/task.h" // for NewRunnableMethod, etc
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/dom/TabGroup.h"
#include "mozilla/dom/WebGLChild.h"
#include "mozilla/layers/CompositorManagerChild.h"
#include "mozilla/layers/ImageBridgeChild.h"
@ -323,16 +322,6 @@ PLayerTransactionChild* CompositorBridgeChild::AllocPLayerTransactionChild(
LayerTransactionChild* c = new LayerTransactionChild(aId);
c->AddIPDLReference();
BrowserChild* browserChild = BrowserChild::GetFrom(c->GetId());
// Do the DOM Labeling.
if (browserChild) {
nsCOMPtr<nsIEventTarget> target =
browserChild->TabGroup()->EventTargetFor(TaskCategory::Other);
SetEventTargetForActor(c, target);
MOZ_ASSERT(c->GetActorEventTarget());
}
return c;
}
@ -1042,14 +1031,6 @@ PAPZCTreeManagerChild* CompositorBridgeChild::AllocPAPZCTreeManagerChild(
const LayersId& aLayersId) {
APZCTreeManagerChild* child = new APZCTreeManagerChild();
child->AddIPDLReference();
if (aLayersId.IsValid()) {
BrowserChild* browserChild = BrowserChild::GetFrom(aLayersId);
if (browserChild) {
SetEventTargetForActor(
child, browserChild->TabGroup()->EventTargetFor(TaskCategory::Other));
MOZ_ASSERT(child->GetActorEventTarget());
}
}
return child;
}

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

@ -14,7 +14,6 @@
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/dom/ContentChild.h" // for ContentChild
#include "mozilla/dom/BrowserChild.h" // for BrowserChild
#include "mozilla/dom/TabGroup.h" // for TabGroup
#include "VsyncSource.h"
namespace mozilla {
@ -225,31 +224,6 @@ void CompositorManagerChild::ProcessingError(Result aCode,
}
}
already_AddRefed<nsIEventTarget>
CompositorManagerChild::GetSpecificMessageEventTarget(const Message& aMsg) {
if (aMsg.type() == PCompositorBridge::Msg_DidComposite__ID) {
LayersId layersId;
PickleIterator iter(aMsg);
if (!IPC::ReadParam(&aMsg, &iter, &layersId)) {
return nullptr;
}
BrowserChild* browserChild = BrowserChild::GetFrom(layersId);
if (!browserChild) {
return nullptr;
}
return do_AddRef(
browserChild->TabGroup()->EventTargetFor(TaskCategory::Other));
}
if (aMsg.type() == PCompositorBridge::Msg_ParentAsyncMessages__ID) {
return do_AddRef(SystemGroup::EventTargetFor(TaskCategory::Other));
}
return nullptr;
}
void CompositorManagerChild::SetReplyTimeout() {
#ifndef DEBUG
// Add a timeout for release builds to kill GPU process when it hangs.

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

@ -94,9 +94,6 @@ class CompositorManagerChild : public PCompositorManagerChild {
void ActorDealloc() override;
already_AddRefed<nsIEventTarget> GetSpecificMessageEventTarget(
const Message& aMsg) override;
void SetReplyTimeout();
uint64_t mProcessToken;

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

@ -10,7 +10,6 @@
#include "mozilla/net/NeckoChild.h"
#include "mozilla/net/SocketProcessChild.h"
#include "mozilla/SchedulerGroup.h"
#include "mozilla/SystemGroup.h"
#include "mozilla/Unused.h"
#include "nsIDNSRecord.h"
#include "nsIDNSByTypeRecord.h"
@ -248,10 +247,6 @@ void DNSRequestChild::StartRequest() {
}
if (XRE_IsContentProcess()) {
nsCOMPtr<nsIEventTarget> systemGroupEventTarget =
SystemGroup::EventTargetFor(TaskCategory::Other);
gNeckoChild->SetEventTargetForActor(this, systemGroupEventTarget);
mozilla::dom::ContentChild* cc =
static_cast<mozilla::dom::ContentChild*>(gNeckoChild->Manager());
if (cc->IsShuttingDown()) {

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

@ -1038,15 +1038,16 @@ nsresult nsUrlClassifierDBServiceWorker::CacheResultToTableUpdate(
if (result->miss) {
return tuV2->NewMissPrefix(result->prefix);
}
LOG(("CacheCompletion hash %X, Addchunk %d", result->completion.ToUint32(),
result->addChunk));
} else {
LOG(("CacheCompletion hash %X, Addchunk %d",
result->completion.ToUint32(), result->addChunk));
nsresult rv = tuV2->NewAddComplete(result->addChunk, result->completion);
if (NS_FAILED(rv)) {
return rv;
nsresult rv = tuV2->NewAddComplete(result->addChunk, result->completion);
if (NS_FAILED(rv)) {
return rv;
}
return tuV2->NewAddChunk(result->addChunk);
}
return tuV2->NewAddChunk(result->addChunk);
}
RefPtr<TableUpdateV4> tuV4 = TableUpdate::Cast<TableUpdateV4>(aUpdate);
@ -1719,14 +1720,8 @@ nsUrlClassifierDBService::Classify(nsIPrincipal* aPrincipal,
if (aEventTarget) {
content->SetEventTargetForActor(actor, aEventTarget);
} else {
// In the case null event target we should use systemgroup event target
NS_WARNING(
("Null event target, we should use SystemGroup to do labelling"));
nsCOMPtr<nsIEventTarget> systemGroupEventTarget =
mozilla::SystemGroup::EventTargetFor(mozilla::TaskCategory::Other);
content->SetEventTargetForActor(actor, systemGroupEventTarget);
}
if (!content->SendPURLClassifierConstructor(
actor, IPC::Principal(aPrincipal), aResult)) {
*aResult = false;
@ -2440,11 +2435,6 @@ nsUrlClassifierDBService::AsyncClassifyLocalWithFeatures(
auto actor = new URLClassifierLocalChild();
// TODO: Bug 1353701 - Supports custom event target for labelling.
nsCOMPtr<nsIEventTarget> systemGroupEventTarget =
mozilla::SystemGroup::EventTargetFor(mozilla::TaskCategory::Other);
content->SetEventTargetForActor(actor, systemGroupEventTarget);
nsTArray<IPCURLClassifierFeature> ipcFeatures;
for (nsIUrlClassifierFeature* feature : aFeatures) {
nsAutoCString name;