Closed
Bug 1453537
Opened 7 years ago
Closed 7 years ago
Add "init browser" phase in GeckoView startup
Categories
(GeckoView :: General, enhancement, P2)
Tracking
(firefox61 fixed)
RESOLVED
FIXED
mozilla61
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | fixed |
People
(Reporter: jchen, Assigned: jchen)
Details
Attachments
(7 files)
|
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
Some modules perform tasks between creating the browser element and binding the browser element to the window. We should add a separate onInitBrowser call for that.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 7•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967232 [details]
Bug 1453537 - 2. Name GV module overrides more consistently;
https://reviewboard.mozilla.org/r/235928/#review241664
Code analysis found 1 defect in this patch:
- 1 defect found by mozlint
You can run this analysis locally with:
- `./mach lint path/to/file` (JS/Python)
If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx
::: mobile/android/modules/geckoview/GeckoViewContentModule.jsm:69
(Diff revision 1)
> - unregister() {}
> +
> + // Override to detect settings change. Access settings via this.settings.
> onSettingsUpdate() {}
> +
> + // Override to enable module after setting a Java delegate.
> + register {}
Error: Parsing error: unexpected token { [eslint]
Comment 8•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967231 [details]
Bug 1453537 - 1. Use Map for GV modules;
https://reviewboard.mozilla.org/r/235926/#review241748
Attachment #8967231 -
Flags: review?(esawin) → review+
Comment 9•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967232 [details]
Bug 1453537 - 2. Name GV module overrides more consistently;
https://reviewboard.mozilla.org/r/235928/#review241750
::: mobile/android/chrome/geckoview/GeckoViewContentSettings.js:13
(Diff revision 1)
> // Handles GeckoView content settings including:
> // * tracking protection
> // * desktop mode
> class GeckoViewContentSettings extends GeckoViewContentModule {
> - init() {
> + onInit() {
> debug `init`;
Please fix debug logs ("onInit", "onEnable", ...).
::: mobile/android/chrome/geckoview/GeckoViewNavigationContent.js:16
(Diff revision 1)
> LoadURIDelegate: "resource://gre/modules/LoadURIDelegate.jsm",
> });
>
> // Implements nsILoadURIDelegate.
> class GeckoViewNavigationContent extends GeckoViewContentModule {
> - register() {
> + onEnable() {
We should document the register and enable mechanics more explicitly.
::: mobile/android/modules/geckoview/GeckoViewModule.jsm:79
(Diff revision 1)
>
> - register() {}
> + _unregister() {
> + if (!this.isRegistered) {
> + return;
> + }
> + this._eventProxy.unregisterListener();
I think we might want to remove automatic unregistering so that the module has to call it. Some modules may register listeners in onInit, which would break things.
Attachment #8967232 -
Flags: review?(esawin) → review+
Comment 10•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967233 [details]
Bug 1453537 - 3. Add a "onInitBrowser" call for GV module;
https://reviewboard.mozilla.org/r/235930/#review241752
Attachment #8967233 -
Flags: review?(esawin) → review+
Comment 11•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967234 [details]
Bug 1453537 - 4. Implement GeckoViewNavigation.onInitBrowser;
https://reviewboard.mozilla.org/r/235932/#review241756
Attachment #8967234 -
Flags: review?(esawin) → review+
Comment 12•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967235 [details]
Bug 1453537 - 5. Set browser remote attribute during onInitBrowser;
https://reviewboard.mozilla.org/r/235934/#review241758
That's a nice change!
Attachment #8967235 -
Flags: review?(esawin) → review+
Comment 13•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967236 [details]
Bug 1453537 - 6. Clean up Settings JS modules;
https://reviewboard.mozilla.org/r/235936/#review241760
::: mobile/android/modules/geckoview/GeckoViewSettings.jsm:46
(Diff revision 1)
> onInit() {
> - this._isSafeBrowsingInit = false;
> + this._useTrackingProtection = false;
> this._useDesktopMode = false;
> - this._displayMode = Ci.nsIDocShell.DISPLAY_MODE_BROWSER;
>
> - this.messageManager.loadFrameScript(
> + this.registerContent(
We can't use it here with automatic unregistering, see previous patch's comment.
::: mobile/android/modules/geckoview/GeckoViewSettings.jsm:68
(Diff revision 1)
> - SafeBrowsing.init();
> - this._isSafeBrowsingInit = true;
> - }
> + }
> +
> + set useTrackingProtection(aUse) {
> + aUse && SafeBrowsing;
Looks a bit odd.
Attachment #8967236 -
Flags: review?(esawin) → review+
| Assignee | ||
Comment 14•7 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8967236 [details]
Bug 1453537 - 6. Clean up Settings JS modules;
https://reviewboard.mozilla.org/r/235936/#review241760
> We can't use it here with automatic unregistering, see previous patch's comment.
`registerContent` shouldn't be affected by automatic unregistering. But I think I'll go ahead and remove automatic unregistering anyways.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 22•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8967513 [details]
Bug 1453537 - 2b. Don't unregister listeners automatically on disable;
https://reviewboard.mozilla.org/r/236192/#review241966
Attachment #8967513 -
Flags: review?(esawin) → review+
Comment 23•7 years ago
|
||
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a91a03cf5528
1. Use Map for GV modules; r=esawin
https://hg.mozilla.org/integration/autoland/rev/8ebfd97f230b
2. Name GV module overrides more consistently; r=esawin
https://hg.mozilla.org/integration/autoland/rev/e8b47563c732
2b. Don't unregister listeners automatically on disable; r=esawin
https://hg.mozilla.org/integration/autoland/rev/d6da57f4b96d
3. Add a "onInitBrowser" call for GV module; r=esawin
https://hg.mozilla.org/integration/autoland/rev/0b95977592df
4. Implement GeckoViewNavigation.onInitBrowser; r=esawin
https://hg.mozilla.org/integration/autoland/rev/095e2adce50b
5. Set browser remote attribute during onInitBrowser; r=esawin
https://hg.mozilla.org/integration/autoland/rev/61be6eea7441
6. Clean up Settings JS modules; r=esawin
Comment 24•7 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a91a03cf5528
https://hg.mozilla.org/mozilla-central/rev/8ebfd97f230b
https://hg.mozilla.org/mozilla-central/rev/e8b47563c732
https://hg.mozilla.org/mozilla-central/rev/d6da57f4b96d
https://hg.mozilla.org/mozilla-central/rev/0b95977592df
https://hg.mozilla.org/mozilla-central/rev/095e2adce50b
https://hg.mozilla.org/mozilla-central/rev/61be6eea7441
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Updated•6 years ago
|
Product: Firefox for Android → GeckoView
Updated•6 years ago
|
Target Milestone: Firefox 61 → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•