Closed Bug 1615403 Opened 5 years ago Closed 5 years ago

Wrap {Browsing,Window}Context objects sent over IPC with MaybeDiscarded

Categories

(Core :: DOM: Content Processes, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Fission Milestone M5
Tracking Status
firefox75 --- fixed

People

(Reporter: nika, Assigned: nika)

References

(Blocks 1 open bug)

Details

Crash Data

Attachments

(9 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

There have been various issues, such as bug 1612894, over time due to crashes caused by code not checking for IsDiscarded before sending a BrowsingContext over IPC. This bug adds a new MaybeDiscarded wrapper type which allows sending a discarded BrowsingContext over IPC to another process. Helper IsNullOrDiscarded, IsNull, and IsDiscarded methods make validating that the BrowsingContext is valid easier and more explicit.

In addition, serializers for BrowsingContext* and WindowContext* are removed, allowing this issue to be avoided in the future.

See Also: → 1614138

Adds a new MaybeDiscarded wrapper type which allows sending a maybe-discarded
BrowsingContext over IPC to another process which must be explicitly checked for
nullness and discarded status before being used.

These serializers have been superceded by the new
MaybeDiscarded<BrowsingContext> and MaybeDiscarded<WindowContext> serializers
added in earlier parts.

Attachment #9126579 - Attachment description: Bug 1615403 - Part 7: Remove old BrowsingContext & WindowContext serializers, → Bug 1615403 - Part 8: Remove old BrowsingContext & WindowContext serializers,
No longer blocks: 1615480
Blocks: 1614138
See Also: → 1616081
Attachment #9126579 - Attachment description: Bug 1615403 - Part 8: Remove old BrowsingContext & WindowContext serializers, → Bug 1615403 - Part 9: Remove old BrowsingContext & WindowContext serializers,
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bf5b4421e52 Part 1: Introduce a new MaybeDiscarded type, r=farre https://hg.mozilla.org/integration/autoland/rev/061325bfa2b7 Part 2: Use MaybeDiscarded for direct IPC arguments, r=farre https://hg.mozilla.org/integration/autoland/rev/aca2e3d525ca Part 3: Use MaybeDiscarded for postMessage source, r=farre https://hg.mozilla.org/integration/autoland/rev/08f1d33f2661 Part 4: Use MaybeDiscarded for PSHistory, r=peterv https://hg.mozilla.org/integration/autoland/rev/47a116922e81 Part 5: Use MaybeDiscarded for RestoreBrowsingContextChildren, r=farre https://hg.mozilla.org/integration/autoland/rev/be2f00ff66e6 Part 6: Use MaybeDiscarded for WindowGlobalInit, r=farre https://hg.mozilla.org/integration/autoland/rev/69ece5421024 Part 7: Use MaybeDiscarded for PExternalAppHelperParent, r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/4ee2aa96e99a Part 8: Use MaybeDiscarded for new focus methods, r=hsivonen https://hg.mozilla.org/integration/autoland/rev/3c87f77c919c Part 9: Remove old BrowsingContext & WindowContext serializers, r=farre
Regressions: 1617063

I've been looking into this, and now have a ni? on bug 1617063. Clearing my ni? here.

Flags: needinfo?(nika)
Depends on: 1618126
No longer depends on: 1618126
Regressions: 1618126
Crash Signature: [@ mozilla::dom::PContentChild::SendCacheBrowsingContextChildren]
Depends on: 1623989
Crash Signature: [@ mozilla::dom::PContentChild::SendCacheBrowsingContextChildren] → [@ mozilla::dom::PContentChild::SendCacheBrowsingContextChildren] [@ mozilla::ipc::IPDLParamTraits<T>::Read]
Blocks: 1623989
No longer depends on: 1623989
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: