mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Bug 1875528 - Part 3: Remove unnecessary VsyncChild strong reference in BrowserChild, r=smaug
This reference created a cycle after the strong Manager() reference added in an earlier part. With the reference removed, the VsyncChild will be kept alive via the IPC link instead, and will be torn down when the IPDL actor is destroyed. Differential Revision: https://phabricator.services.mozilla.com/D198626
This commit is contained in:
1 parent
1c3c2e0a51
commit
1863636c52
2 files changed
+11
-8
No files matched your search
@@ -2150,18 +2150,23 @@ bool BrowserChild::DeallocPDocAccessibleChild(
|
||||
#endif
|
||||
|
||||
RefPtr<VsyncMainChild> BrowserChild::GetVsyncChild() {
|
||||
// Initializing mVsyncChild here turns on per-BrowserChild Vsync for a
|
||||
// Initializing VsyncMainChild here turns on per-BrowserChild Vsync for a
|
||||
// given platform. Note: this only makes sense if nsWindow returns a
|
||||
// window-specific VsyncSource.
|
||||
#if defined(MOZ_WAYLAND)
|
||||
if (IsWaylandEnabled() && !mVsyncChild) {
|
||||
mVsyncChild = MakeRefPtr<VsyncMainChild>();
|
||||
if (!SendPVsyncConstructor(mVsyncChild)) {
|
||||
mVsyncChild = nullptr;
|
||||
if (IsWaylandEnabled()) {
|
||||
if (auto* actor = static_cast<VsyncMainChild*>(
|
||||
LoneManagedOrNullAsserts(ManagedPVsyncChild()))) {
|
||||
return actor;
|
||||
}
|
||||
auto actor = MakeRefPtr<VsyncMainChild>();
|
||||
if (!SendPVsyncConstructor(actor)) {
|
||||
return nullptr;
|
||||
}
|
||||
return actor;
|
||||
}
|
||||
#endif
|
||||
return mVsyncChild;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult BrowserChild::RecvLoadRemoteScript(
|
||||
|
||||
@@ -748,8 +748,6 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
|
||||
Maybe<bool> mLayersConnectRequested;
|
||||
EffectsInfo mEffectsInfo;
|
||||
|
||||
RefPtr<VsyncMainChild> mVsyncChild;
|
||||
|
||||
RefPtr<APZEventState> mAPZEventState;
|
||||
|
||||
// Position of client area relative to the outer window
|
||||
|
||||
Reference in new issue
Block a user