Kill GlobalHistory.java and make a simple JNI API to check, add and update history

NEW
Unassigned

Status

()

Firefox for Android
Data Providers
4 years ago
4 years ago

People

(Reporter: mfinkle, Unassigned)

Tracking

(Blocks: 1 bug, {perf})

Trunk
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Let's move all the real logic into nsAndroidHistory.cpp

Background from bug 949104 comment 5:
---------------------------

* We implement CanAddVisit in GlobalHistory.java which is not optimal. nsAndroidHistory.cpp will call VisitURI and SetURITitle via JNI into GeckoAppShell, which starts a background thread and calls the GlobalHistory methods. Thos mthods then call the local CanAddVisit, which can return false. Why bother to make a JNI call and post a runnable to the background thread if we are only going to ignore the visit? Let's move CanAddVisit back into nsAndroidHistory. GlobalHistory.add and GlobalHistory.update are only called via the JNI stub in GeckoAppShell. We should be fine with moving CanAddVisit into nsAndroidHistory.

* The code to support a:visited runs through nsAndroidHistory, via GeckoAppShell, into GlobalHistory. Again, I'd like to move this entirely into nsAndroidHistory, much like desktop's History.cpp does. I think it would be more performant. 

Let's basically work to kill GlobalHistory.java and make a simple JNI API to check, add and update history, which is called from nsAndroidHistory.cpp

---------------------------
Marking as blocking Bug 934030, because it's related, even if not directly blocking, and See Also sucks. Need moar Bugzilla flags.
Blocks: 934030
OS: Linux → Android
Hardware: x86_64 → All
Keywords: perf
No longer blocks: 934030
Blocks: 934030
Filed bug 949639 to move CanAddURI since it's simpler.
You need to log in before you can comment on or make changes to this bug.