Closed Bug 949913 Opened 9 years ago Closed 9 years ago

Don't store page refreshes as history visits


(Firefox for Android Graveyard :: Data Providers, defect)

Not set


(firefox27 verified, firefox28 verified, firefox29 verified)

Firefox 29
Tracking Status
firefox27 --- verified
firefox28 --- verified
firefox29 --- verified


(Reporter: mfinkle, Assigned: mfinkle)




(1 file)

The desktop History.cpp service does not store refreshes as visits. They do a quick check of this URI and the last URI to see if they are the same. If they are, we don't save the visit.

They also use a buffer of recent visits. They need this to handle the case of error pages. The scenario seems to be:

1. Start a page load but then drop network
2. A network error page is shown, the visit is not saved, but the URI is the real page URI.
3. Network is now online
4. Press "Try again" and we attempt to load the same URI, which would be ignored because it's the same as the previous URI.

To stop #4 from happening, we check that the URIs are the same *and* the URI was a recent visit. Since the error page in #2 was not visited, it's not a recent visit. So we do save a visit for the second attempt.

This patch also adds the simple observer notification that happens on desktop when we save a visit.

The code is a simple port from desktop.
Attachment #8347066 - Flags: review?(blassey.bugs)
Comment on attachment 8347066 [details] [diff] [review]
Don't save reloads v0.1

Review of attachment 8347066 [details] [diff] [review]:

::: mobile/android/components/build/nsAndroidHistory.cpp
@@ +14,4 @@
>  using namespace mozilla;
>  using mozilla::dom::Link;
> +//using mozilla::services::GetObserverService;

Attachment #8347066 - Flags: review?(blassey.bugs) → review+
Will this affect stored history data or only histroy data going forward? I expect the latter.
(In reply to Kevin Brosnan [:kbrosnan] from comment #3)
> Will this affect stored history data or only histroy data going forward? I
> expect the latter.

Correct. Only data stored going forward will be affected. The good news is that we expire old data and "time" will push the bad history items off the lists.
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Blocks: 947390
Comment on attachment 8347066 [details] [diff] [review]
Don't save reloads v0.1

[Approval Request Comment]
Bug caused by (feature/regressing bug #): I want to see if this patch affects the "SQL DB Locked" crashes we get on all channels but Nightly. It could be that Nightly is too small, but this patch is safe and I'd like to see if it has an affect on the crashes on Aurora. If it has an affect, we can request moving to Beta.

User impact if declined: Just testing a theory. The "SQL DB Locked" crashes are in the top 5 for Beta and Release.

Testing completed (on m-c, etc.): It's been on m-c for a while
Risk to taking this patch (and alternatives if risky): Low risk
String or IDL/UUID changes made by this patch: None
Attachment #8347066 - Flags: approval-mozilla-aurora?
Attachment #8347066 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment on attachment 8347066 [details] [diff] [review]
Don't save reloads v0.1

[Approval Request Comment]
No crashes on Aurora since 12/31/2013. Let's uplift to Beta and see if it's just coincidence.
Attachment #8347066 - Flags: approval-mozilla-beta?
Attachment #8347066 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified as fixed on 27 Beta 8 and latest Aurora and Nightly(2014-01-22). 
Device:LG Optimus 4X (Android 4.1.2)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.