зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1608516 - Part 1: Add IPCs for allowing do AddBlockedNodeByClassifier() across process boundaries. r=baku
This patch adds IPCs that allow us to be able to report the blocked node across the process boundary. Differential Revision: https://phabricator.services.mozilla.com/D71938
This commit is contained in:
Родитель
8b855490d7
Коммит
c3a39c3bec
|
@ -249,6 +249,21 @@ mozilla::ipc::IPCResult BrowserBridgeChild::RecvSubFrameCrashed(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult BrowserBridgeChild::RecvAddBlockedNodeByClassifier() {
|
||||
RefPtr<Element> owner = mFrameLoader->GetOwnerContent();
|
||||
if (!owner) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
RefPtr<Document> doc = mFrameLoader->GetOwnerDoc();
|
||||
if (!doc) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
doc->AddBlockedNodeByClassifier(owner);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void BrowserBridgeChild::ActorDestroy(ActorDestroyReason aWhy) {
|
||||
if (!mBrowsingContext) {
|
||||
// This BBC was never valid, skip teardown.
|
||||
|
|
|
@ -98,6 +98,8 @@ class BrowserBridgeChild : public PBrowserBridgeChild {
|
|||
mozilla::ipc::IPCResult RecvSubFrameCrashed(
|
||||
const MaybeDiscarded<BrowsingContext>& aContext);
|
||||
|
||||
mozilla::ipc::IPCResult RecvAddBlockedNodeByClassifier();
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -2813,6 +2813,18 @@ mozilla::ipc::IPCResult BrowserParent::RecvNotifyContentBlockingEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
BrowserParent::RecvReportBlockedEmbedderNodeByClassifier() {
|
||||
BrowserBridgeParent* bridge = GetBrowserBridgeParent();
|
||||
|
||||
if (!bridge) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
Unused << bridge->SendAddBlockedNodeByClassifier();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
bool BrowserParent::GetWebProgressListener(
|
||||
nsIBrowser** aOutBrowser, nsIWebProgress** aOutManager,
|
||||
nsIWebProgressListener** aOutListener) {
|
||||
|
|
|
@ -316,6 +316,8 @@ class BrowserParent final : public PBrowserParent,
|
|||
const Maybe<mozilla::ContentBlockingNotifier::StorageAccessGrantedReason>&
|
||||
aReason);
|
||||
|
||||
mozilla::ipc::IPCResult RecvReportBlockedEmbedderNodeByClassifier();
|
||||
|
||||
mozilla::ipc::IPCResult RecvNavigationFinished();
|
||||
|
||||
bool GetWebProgressListener(nsIBrowser** aOutBrowser,
|
||||
|
|
|
@ -688,6 +688,8 @@ parent:
|
|||
ScrollAxis aHorizontal, ScrollFlags aScrollFlags,
|
||||
int32_t aAppUnitsPerDevPixel);
|
||||
|
||||
async ReportBlockedEmbedderNodeByClassifier();
|
||||
|
||||
child:
|
||||
/**
|
||||
* Notify the remote browser that it has been Show()n on this side. This
|
||||
|
|
|
@ -69,6 +69,8 @@ child:
|
|||
|
||||
async SubFrameCrashed(MaybeDiscardedBrowsingContext aContext);
|
||||
|
||||
async AddBlockedNodeByClassifier();
|
||||
|
||||
parent:
|
||||
// Destroy the remote web browser due to the nsFrameLoader going away.
|
||||
async __delete__();
|
||||
|
|
Загрузка…
Ссылка в новой задаче