Closed Bug 1082224 Opened 10 years ago Closed 10 years ago

Can't visit any pages in guest sessions

Categories

(Firefox for Android Graveyard :: General, defect)

35 Branch
All
Android
defect
Not set
normal

Tracking

(firefox34 unaffected, firefox35 verified, firefox36 verified, fennec34+)

VERIFIED FIXED
Firefox 36
Tracking Status
firefox34 --- unaffected
firefox35 --- verified
firefox36 --- verified
fennec 34+ ---

People

(Reporter: wesj, Assigned: wesj)

Details

(Keywords: regression, reproducible)

Attachments

(1 file)

We broke this entirely when RestrictedProfiles was fixed up recently.
Attached patch PatchSplinter Review
We now send all urls to the RestrictedProfiles check to see if we should load them. Before the java code would always reject all requests when in Guest mode. For url loads, it should reject based on the url.
Attachment #8504365 - Flags: review?(mark.finkle)
Assignee: nobody → wjohnston
Status: NEW → ASSIGNED
OS: Linux → Android
Hardware: x86_64 → All
Attachment #8504365 - Flags: review?(mark.finkle) → review+
We should be able to launch Fennec in guest mode for some really simple tests, right?
Comment on attachment 8504365 [details] [diff] [review]
Patch

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

::: mobile/android/base/RestrictedProfiles.java
@@ +174,5 @@
>          }
>  
> +        if (getInGuest()) {
> +            if (Restriction.DISALLOW_BROWSE_FILES == restriction) {
> +                return canLoadUrl(url);

Consider instead putting this at the *top*, and do:

  if (Restriction.DISALLOW_BROWSE_FILES.id == action) {
      return canLoadUrl(url);
  }

This'll get called on every page load for guest profiles, so we might as well avoid two method calls, three loop steps and three comparisons, just to figure out if we're trying to browse.
tracking-fennec: --- → ?
Flags: in-testsuite?
Flags: in-moztrap?(fennec)
Just out of interest, I timed this on my Nexus 5 by doing something like:

let start = performance.now();
if (ParentalControls....) {
}
console.log(performance.now() - start);

For cases where we don't restrict this takes around 0.1ms - 0.2ms (yes ms). For cases where we do it takes 35ms, all of which is in the call to docShell.displayLoadError.
tracking-fennec: ? → 34+
34 works for me? Did you mean 35?
This might be the cause of Bug 1083846.
Comment on attachment 8504365 [details] [diff] [review]
Patch

Approval Request Comment
[Feature/regressing bug #]: Bug 1080304
[User impact if declined]: Can't open any pages in guest sessions
[Describe test coverage new/current, TBPL]: Obviously, no? Testing profiles on tbpl is hard...
[Risks and why]: Low risk. Just moves some code to a different place. Could impact page load times, but in my testing the impact is tiny (sub ms).
[String/UUID change made/needed]: None.
Attachment #8504365 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/566e8300d241
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Attachment #8504365 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Visiting pages  works ok in Guest Mode, so:
Verified fixed on:
Device: Nexus 5 (Android 4.4)
Build: Firefox for Android 36.0a1 (2014-10-22)
Also visiting pages works ok in Guest Mode on latest Aurora:Firefox for Android 35.0a2 (2014-10-23)
Status: RESOLVED → VERIFIED
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: