Closed Bug 1505913 Opened 10 months ago Closed Last month

[Fission] Make Plugin Click-to-Play Fission-aware

Categories

(Core :: Plug-ins, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Fission Milestone M4
Tracking Status
firefox70 --- fixed

People

(Reporter: Felipe, Assigned: Gijs)

References

(Depends on 1 open bug, Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(1 file)

There were some test failures related to plugins click-to-play when using the browser.fission.simulate pref.

Also, by code inspection in PluginChild.jsm, it's clear that this code will need fixes for being compatible with oop iframes
Fission Milestone: --- → Future
Fission Milestone: Future → M4

Assuming nobody minds, I'd like to look at this.

Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED

At a high level, this change does the following:

  • move the pluginchild actor to be a JSWindowActorChild
  • move the parent handling from browser-plugins into a JSWindowActorParent
  • move the crash handling from ContentCrashHandlers.jsm to the parent actor,
    using a PluginManager object. It needs to talk to the actors (and vice
    versa), so this seemed a better fit than spreading actor implementation
    details to other JSMs.
  • switch to using plugin IDs to identify plugins cross-process, instead of
    combinations of names or other properties of the plugin tag. As part of that,
    ensured plugin IDs are unique between "fake" plugins and the other ones.

Some notes:

  • the previous implementation mixes runIDs (for NPAPI plugin process "runs")
    and GMP pluginIDs when doing crashreporting. AFAICT there is no guarantee
    these don't conflict, so I've split them out to avoid issues. There's a
    pluginCrashID object I pass around instead that has either a runID or
    pluginID. Happy to rename some more for clarity.
  • the previous implementation used pluginInfo and plugin for a bunch of
    different types of variables. I've tried to be consistent, where:
    • pluginElement is a DOM element for a plugin
    • activationInfo is a JS object used to track click to play state for a plugin
    • plugin is a plugintag as returned by the pluginhost service
    • pluginCrashID is an identifier for a crashed plugin (see previous point).
  • I'm still using broadcastAsyncMessage to tell the content processes about
    gmp plugin crashes and plugin crash submission updates, because there's no
    guarantee the actors
    open to suggestions there, too. I think our best bet might be moving that to
    IPDL-based IPC within the GMP code, but that feels like a separate bug.
Attachment #9077274 - Attachment description: Bug 1505913 - make plugin click-to-play and crash handling fission-compatible. → Bug 1505913 - make plugin click-to-play and crash handling fission-compatible, r?mconley
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2e16973bb965
make plugin click-to-play and crash handling fission-compatible, r=mconley
Status: ASSIGNED → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Regressions: 1568508

== Change summary for alert #22126 (as of Thu, 25 Jul 2019 05:10:16 GMT) ==

Improvements:

0.36% Base Content JS windows10-64-shippable-qr opt 4,157,778.67 -> 4,142,624.00
0.35% Base Content JS windows10-64-shippable opt 4,157,062.67 -> 4,142,570.67
0.34% Base Content JS windows10-64-shippable-qr opt 4,156,876.00 -> 4,142,570.67

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=22126

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