Closed Bug 1339007 Opened 7 years ago Closed 7 years ago

Replace async getEnabledStatus with initialProcessData for content process init

Categories

(Toolkit :: Form Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Iteration:
54.2 - Feb 20
Tracking Status
firefox54 --- fixed

People

(Reporter: steveck, Assigned: steveck)

References

Details

(Whiteboard: [form autofill:M1])

Attachments

(1 file)

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: nobody → schung
Status: NEW → ASSIGNED
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 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+
nit fixed, thanks!
Keywords: checkin-needed
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
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.