Closed Bug 1636227 Opened 4 years ago Closed 4 years ago

Don't reset _sameProcessAsFrameLoader on first browser initialization.

Categories

(Core :: XUL, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

See commit message.

LazyFC changes the way we initialize browsers in a subtle way which is
important for print preview and PiP.

When creating a print preview browser / PiP, we rely on getting the right
process via _sameProcessAsFrameLoader. This is set very early on the
lifetime of the browser element, after it's upgraded but before its
connectedCallback() calls.

What happens with LazyFC is that we append the browser to the document,
then set its sameProcessAsFrameLoader, then initialize the browser from
connectedCallback(). That calls resetFields() after setting the
_sameProcessAsFrameLoader, which clears it out, not good.

Without LazyFC we initialize it via frame construction, as soon as the
browser is attached to the document, so all ends up working out.

Explicitly avoid clearing this field out if not initialized yet, instead
of the hasOwnProperty check which was for the very same thing, just
about XBL initialization.

Depends on D74281

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e614cbba042d
Don't reset _sameProcessAsFrameLoader on first browser initialization. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: