Closed Bug 1709460 Opened 4 years ago Closed 3 years 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

()

RESOLVED FIXED
91 Branch
Fission Milestone M7a
Tracking Status
firefox-esr78 --- disabled
firefox89 --- disabled
firefox90 --- wontfix
firefox91 --- fixed

People

(Reporter: dholbert, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(4 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.

Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/20c1ef91fc10 Add a flag representing whether mEffectsInfo has been set or not. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/07272d29f97f Try to initialize a displayport base for OOP iframe's root scroller with its visible rect. r=tnikkel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

Comment on attachment 9224655 [details]
Bug 1709460 - Try to initialize a displayport base for OOP iframe's root scroller with its visible rect. r?tnikkel

Beta/Release Uplift Approval Request

  • User impact if declined: Basically nothing, this change will change checkerboard severity telemetry data, with this change we will not report incorrect severity for OOP iframes in Fission.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This change does just set diplayport data property when we initialize OOP iframes, it just makes things correct such as incorrect severity telemetry data, should not have impacts either on user interactions on rendering results. It may reduce the cases that users will see checkerboarding during scrolling inside OOP iframes but it's a good thing.
  • String changes made/needed:
Attachment #9224655 - Flags: approval-mozilla-beta?
Attachment #9224654 - Flags: approval-mozilla-beta?

Comment on attachment 9224655 [details]
Bug 1709460 - Try to initialize a displayport base for OOP iframe's root scroller with its visible rect. r?tnikkel

given the limited impact I think I prefer to let this ride the trains to 91

Attachment #9224655 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #9224654 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

Oops, I forgot mentioning this will fix one of the reasons that our checkerboard severity data on fission beta experiment looks odd (bug 1713360). Neha agreed on landing this change on beta.

Though I'd like to the approval request again, but it seems that one it has been rejected we can no longer re-request. I'd do NI instead.

Flags: needinfo?(jcristau)

Timothy suggested diagnosing nightly results with/without fission instead of trying to uplift the change to beta. Yeah, I agree with that.

So, here are results, with Fission and without Fission;

Checkerboard severity with Fission on Nightly

Checkerboard severity without Fission on Nightly

As you can see the severity has dropped down with Fission since June 15, whereas it looks same as before without Fission.

I am going to attach two images for the charts because the queries above might show us different results in future.

Flags: needinfo?(jcristau)

I'll second that. This isn't risky for users, and doesn't affect non-Fission data at all. We need it in order to be able to get any sort of remotely useful data from Fission users.

(In reply to Kris Maglione [:kmag] from comment #16)

I'll second that. This isn't risky for users, and doesn't affect non-Fission data at all. We need it in order to be able to get any sort of remotely useful data from Fission users.

Are you seconding comment 12 ("let's uplift to beta") or comment 13 ("let's not uplift to beta")?

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

Attachment

General

Created:
Updated:
Size: