Closed
Bug 1492771
Opened 8 years ago
Closed 8 years ago
Make GeckoSession non-final
Categories
(GeckoView :: General, enhancement, P3)
GeckoView
General
Tracking
(geckoview62 wontfix, firefox62 wontfix, firefox63 wontfix, firefox64 fixed)
RESOLVED
FIXED
mozilla64
People
(Reporter: paul, Assigned: paul)
Details
Attachments
(1 file)
|
1.39 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
Bug 1486778 made GeckoSession final, making it impossible to extend GeckoSession (necessary for Servo support).
| Assignee | ||
Comment 1•8 years ago
|
||
Assignee: nobody → paul
It generally does not make much sense for consumers to subclass GeckoSession, which is why I made it final. Additionally, since GeckoView is not intended to be an abstraction layer for other engines, I'm not inclined to make API changes that cater to this type of usage.
I really think Servo should reconsider GeckoView compatibility as a goal and try to solve this at a higher level. The Android Components[0] "engine" may be a good fit.
[0] https://github.com/mozilla-mobile/android-components/
| Assignee | ||
Updated•8 years ago
|
Attachment #9010631 -
Flags: review?(nchen)
| Assignee | ||
Updated•8 years ago
|
Attachment #9010631 -
Flags: review?(nchen)
| Assignee | ||
Comment 3•8 years ago
|
||
James, understood. I'll talk to the FxReality folks and see what should be the best approach then.
I already suggested to use Android Component: https://github.com/MozillaReality/FirefoxReality/issues/80
Comment 4•8 years ago
|
||
I think there are some arguments for subclassing GeckoSession. Subclassing is pretty common on Android to change the behavior of Application, Activity, View, etc... GeckoView itself is non-final.
There are some use cases where subclassing would be useful. For example, if the app wants to collect some telemetry whenever `GeckoSession.loadUri` is called, or if the app wants to associate every `GeckoSession` instance with some piece of data. In those cases there are workarounds, but subclassing would be the most straightforward way.
Jim and I talked about this a little more, and while it may make sense to subclass GeckoSession for reasons similar to the ones listed in comment #4, I think we need to be cautious about the protected stuff that's exposed and which methods can be overridden. From that perspective, LayerSession is a pretty big API wart (which is why I added 'final'). We'll accept the patch to remove 'final' from GeckoSession, but do not expect to be able to override every method in the future.
| Assignee | ||
Updated•8 years ago
|
Attachment #9010631 -
Flags: review?(snorp)
Attachment #9010631 -
Flags: review?(snorp) → review+
Pushed by jwillcox@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a7f1d2b04291
Make GeckoSession non-final r=snorp
Updated•8 years ago
|
status-firefox62:
--- → wontfix
status-firefox63:
--- → wontfix
status-firefox64:
--- → affected
status-geckoview62:
--- → wontfix
Priority: -- → P3
Comment 7•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Updated•7 years ago
|
Product: Firefox for Android → GeckoView
Updated•7 years ago
|
Target Milestone: Firefox 64 → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•