Remember desktop mode preference after OOM

RESOLVED FIXED in Firefox 15

Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bnicholson, Assigned: bnicholson)

Tracking

unspecified
Firefox 16
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox15 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
We should maintain the desktop mode after restoring from OOM.
(Assignee)

Comment 1

5 years ago
Created attachment 637307 [details] [diff] [review]
patch
Attachment #637307 - Flags: review?(mark.finkle)
(Assignee)

Updated

5 years ago
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.
(Assignee)

Comment 4

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/4a5f794edd2d
https://hg.mozilla.org/mozilla-central/rev/4a5f794edd2d
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
(Assignee)

Comment 6

5 years ago
Uplifted as part of bug 766406.
status-firefox15: --- → fixed
You need to log in before you can comment on or make changes to this bug.