Replace async getEnabledStatus with initialProcessData for content process init

RESOLVED FIXED in Firefox 54

Status

()

Toolkit
Form Manager
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: steveck, Assigned: steveck)

Tracking

unspecified
mozilla54
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox54 fixed)

Details

(Whiteboard: [form autofill:M1])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

3 months ago
After bug 1333682 landed, we could leverage Services.cpmm.initialProcessData to get the status as init instead of async message since content is in content process.
(Assignee)

Updated

3 months ago
Assignee: nobody → schung
(Assignee)

Updated

3 months ago
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)
Comment on attachment 8837532 [details]
Bug 1339007 - Replace async getEnabledStatus with initialProcessData for content process init,

https://reviewboard.mozilla.org/r/112678/#review114100

::: browser/extensions/formautofill/FormAutofillParent.jsm:75
(Diff revision 1)
>      Services.obs.addObserver(this, "advanced-pane-loaded", false);
>  
>      // Observing the pref (and storage) changes
>      Services.prefs.addObserver(ENABLED_PREF, this, false);
>      this._enabled = this._getStatus();
> +    Services.ppmm.initialProcessData.autofillEnabled = this._enabled;

Please move this to a place that gets automatically updated when `_enabled` changes so that it's correct when new processes start after `init` if the status changed after the init of the parent.

::: browser/extensions/formautofill/test/unit/test_enabledStatus.js:18
(Diff revision 1)
>    do_check_eq(formAutofillParent._onStatusChanged.called, true);
> +  do_check_eq(Services.ppmm.initialProcessData.autofillEnabled, false);
>  

Please add a test for the issue I mentioned
Comment on attachment 8837532 [details]
Bug 1339007 - Replace async getEnabledStatus with initialProcessData for content process init,

https://reviewboard.mozilla.org/r/112678/#review114104
Attachment #8837532 - Flags: review?(MattN+bmo)
Comment hidden (mozreview-request)
Comment on attachment 8837532 [details]
Bug 1339007 - Replace async getEnabledStatus with initialProcessData for content process init,

https://reviewboard.mozilla.org/r/112678/#review114538

::: browser/extensions/formautofill/FormAutofillParent.jsm:156
(Diff revision 2)
> +   *
> +   * @param {boolean} newStatus The latest status we want to set for _enabled
> +   */
> +  _setStatus(newStatus) {
> +    this._enabled = newStatus;
> +    Services.ppmm.initialProcessData.autofillEnabled = newStatus;

Why not put this in onStatusChanged?
Attachment #8837532 - Flags: review?(MattN+bmo) → review+
Comment hidden (mozreview-request)
(Assignee)

Comment 7

3 months ago
nit fixed, thanks!
Keywords: checkin-needed

Comment 8

3 months ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/419a12740203
Replace async getEnabledStatus with initialProcessData for content process init, r=MattN
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/419a12740203
Status: ASSIGNED → RESOLVED
Last Resolved: 3 months ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.