Open Bug 1709460 Opened 1 month ago Updated 21 minutes ago

APZCCallbackHelper.cpp has a call to nsPresContext::GetParentPresContext() (in an assertion) which needs to be adjusted for a fission world

Categories

(Core :: Panning and Zooming, defect, P2)

defect

Tracking

()

ASSIGNED
Fission Milestone M7a

People

(Reporter: dholbert, Assigned: hiro)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files, 1 obsolete file)

APZCCallbackHelper.cpp has this snippet:

void APZCCallbackHelper::InitializeRootDisplayport(PresShell* aPresShell) {
[...]
    // This code is only correct for root content or toplevel documents.
    MOZ_ASSERT(!pc || pc->IsRootContentDocumentCrossProcess() ||
               !pc->GetParentPresContext());

If we're in a cross-origin iframe, then the call to pc->GetParentPresContext() will trivially fail (due to not being able to traverse a process boundary). This effectively nerfs the assertion and makes it trivially pass without checking anything useful.

The assertion is, in fact, meant to verify that we're not in an iframe, but in fact it'll trivially pass if we're in a cross-origin iframe (in a session with fission enabled).

We need to adjust the assertion to account for this.

This bug probably doesn't need to block any particular fission milestone, since it doesn't impact user-perceptible behavior. It's just about a MOZ_ASSERT debug-only check that's inadvertently becoming less strict with fission enabled, basically.

Yes, but we also have to audit that we don't call this function in a way that would cause a new, modified assertion to fire.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED

This is similar to bug 1698693 (an audit of code to make sure it works fine with Fission), so tracking it with the same priority (M7a).

Fission Milestone: --- → M7a
Severity: -- → S3
Priority: -- → P2

We are going to use the mEffectsInfo's mVisibleRect as a displayport base for
OOP iframe's root scroller and we don't want the displayport base if it hasn't
been arrived from the parent content, to do that, we need to tell the difference
whether the iframe was painted as empty or hasn't been painted.

In the same manner what we initialize a diplayport base for top level contents.

Depends on D116575

See Also: → 1713908
See Also: 1713908
See Also: → 1713360
Attachment #9224656 - Attachment is obsolete: true

As discussed with Timothy on Matrix, I dropped the last piece of changes deferred it to bug 1716436.

You need to log in before you can comment on or make changes to this bug.