Give empty protected constructors to field-only GV classes

RESOLVED FIXED in Firefox 65

Status

enhancement
P2
normal
RESOLVED FIXED
8 months ago
7 months ago

People

(Reporter: agi, Assigned: agi)

Tracking

(Blocks 2 bugs)

Trunk
mozilla65
Dependency tree / graph

Firefox Tracking Flags

(geckoview64 wontfix, firefox64 wontfix, firefox65 fixed)

Details

Attachments

(1 attachment)

read-only field-only classes like |SecurityInformation| are really hard to use in tests because they don't have a protected constructor. We should give them a dummy empty protected constructor that embedders can use to create Mock classes.
Blocks: 1508977
This adds a dummy `protected`, empty constructor to all field-only classes that
don't have one or can't because the constructor uses a private API. This will
allow embedders to mock our field-only classes or construct them without having
to use reflection.
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/093ef9c7cb94
add protected constructor to field-only classes in GeckoView. r=snorp,esawin
https://hg.mozilla.org/mozilla-central/rev/093ef9c7cb94
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
64=wontfix because we don't need to uplift this constructor change to 64 Beta.
status-geckoview64=wontfix
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 65 → mozilla65
You need to log in before you can comment on or make changes to this bug.