Closed Bug 1154646 Opened 9 years ago Closed 9 years ago

Mobile about:config determines pref existence incorrectly

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
Firefox 40
Tracking Status
firefox40 --- fixed

People

(Reporter: capella, Assigned: capella, Mentored)

Details

(Whiteboard: [lang=javascript])

Attachments

(1 file)

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
Attached patch bug1154646.diffSplinter Review
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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: