Mobile about:config determines pref existence incorrectly

RESOLVED FIXED in Firefox 40

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: capella, Assigned: capella, Mentored)

Tracking

unspecified
Firefox 40
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

(Whiteboard: [lang=javascript])

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
This is a good second or third bug for anyone who's already completed a change to Mobile FF, and has a working knowledge of Javascript.

There's two places in our about:config editor where we make a "pref-is-new? y/n" check [1], and [2]

Unfortunately, we're currently checking the dynamic document-list of items currently displayed, and we should be checking the internal global-list.

Both checks need to be modified to make the correct decision. The change at [1] just requires the invalid check to be corrected.

The change at [2] will involve an additional logic change. Currently the flow is:
   if (!pref-is-in-list) {
      // reload global-list and exit
   }
   // change item in document-list and fall-through

It needs to be changed to reflect:
   if (pref-in-document-list) {
      // change item in document-list and exit
   }
   if (!pref-in-global-list) {
      // reload global-list and exit
   }
   // Pref already in global list, will update document list
   // later, fall-through, do nothing for now


[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/config.js?rev=3bdce03e9ec0&mark=90-90#80
[2] http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/config.js?rev=3bdce03e9ec0&mark=475-475#459
(Assignee)

Comment 1

4 years ago
Created attachment 8598631 [details] [diff] [review]
bug1154646.diff

This is annoying - let's fix it.
Assignee: nobody → markcapella
Attachment #8598631 - Flags: review?(wjohnston)
Comment on attachment 8598631 [details] [diff] [review]
bug1154646.diff

Review of attachment 8598631 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/chrome/content/config.js
@@ +491,2 @@
>        document.location.reload();
>        return;

I guess you don't need this return now.
Attachment #8598631 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/b9ff07e7be3c
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
You need to log in before you can comment on or make changes to this bug.