Closed Bug 769097 Opened 13 years ago Closed 13 years ago

Remember desktop mode preference after OOM

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox15 fixed)

RESOLVED FIXED
Firefox 16
Tracking Status
firefox15 --- fixed

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Attachments

(1 file)

We should maintain the desktop mode after restoring from OOM.
Attached patch patchSplinter Review
Attachment #637307 - Flags: review?(mark.finkle)
Blocks: 766406
Comment on attachment 637307 [details] [diff] [review] patch >diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js > this.id = ++gTabIDFactory; >+ this.desktopMode = aParams.desktopMode == true; Use parens to make this a bit more readable: this.desktopMode = (aParams.desktopMode == true); but I think we need more since desktopMode is optional and we want to be more explicit: this.desktopMode = ("desktopMode" in aParams) ? aParams.desktopMode : false; r+ with the nits
Attachment #637307 - Flags: review?(mark.finkle) → review+
Comment on attachment 637307 [details] [diff] [review] patch >diff --git a/mobile/android/components/SessionStore.js b/mobile/android/components/SessionStore.js >- let params = { selected: isSelected, delayLoad: true, title: entry.title }; >+ let params = { >+ selected: isSelected, >+ delayLoad: true, >+ title: entry.title, >+ desktopMode: tabData.desktopMode == true >+ }; Actually, what if the sessionstore.js file has no "desktopMode" data? Will this throw an exception? I guess it won't and desktopMode would be null which evaluates to false. So we are OK.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
Uplifted as part of bug 766406.
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: