Commit Graph

78 Commits

Author SHA1 Message Date
Drew Willcoxon
433cf16c1b Bug 1467627 - Calculate origin frecency as the sum of all URL frecencies instead of the max. r=mak
MozReview-Commit-ID: KZi9C7olvsj
2018-07-04 14:01:28 -07:00
Mark Banner
04568e0b5a Bug 1460579 - Replace the 'bookmarkPropertiesDialog/folderLastUsed' annotation with a key/value pair in moz_meta. r=mak
MozReview-Commit-ID: GpEPxOMDret
2018-05-11 07:35:59 +01:00
Mark Banner
cf84e76a1a Bug 824502 - Migrate folder=<id> based queries to parent=<guid> for Places' bookmark queries. r=mak
MozReview-Commit-ID: 9A4SdNpp9wU
2018-05-04 17:03:13 +01:00
Drew Willcoxon
975278327e Bug 1461753 - Add places.sqlite migration for calculating initial frecency stats. r=mak
MozReview-Commit-ID: F7fZiVkLXxW
2018-05-18 22:50:54 -07:00
Marco Bonardo
9b38afbc29 Bug 1432583 - Better corruption handling for favicons.sqlite. r=standard8
MozReview-Commit-ID: LEotg2dbibB
2018-05-09 14:53:59 +02:00
Drew Willcoxon
2956900b67 Bug 1239708: Improve awesomebar autofill. Part 1: Core follow-ons. r=mak
MozReview-Commit-ID: 1mfqU6mOyR9
2018-05-14 11:21:47 -07:00
Mark Banner
04db093e93 Bug 478035 - Re-create the built-in root folders if they are missing in the places database. r=mak
MozReview-Commit-ID: FU7o6q5NpdR
2018-04-18 18:29:19 +01:00
Mark Banner
ef10b7a31e Bug 478035 - Move the code for obtaining the places built-in folder ids from nsNavBookmarks to Database. r=mak
MozReview-Commit-ID: 74we2Z47xY
2018-04-18 15:53:07 +01:00
Marco Bonardo
2c543eaafc Bug 1452660 - Tag queries pointing to an invalid folder are being rewritten as empty urls. r=standard8
MozReview-Commit-ID: FUmmYewl8Vt
2018-04-11 15:45:23 +02:00
Marco Bonardo
66236eb3bc Bug 1293445 - 2 - Migrate RESULTS_AS_TAG_CONTENTS queries to place:tag queries. r=kitcambridge,standard8
MozReview-Commit-ID: HgKQAqmT2Ez
2018-03-26 16:44:41 +02:00
Kit Cambridge
7f570b8ba3 Bug 1426554 - Add a key-value metadata table to Places. r=mak
MozReview-Commit-ID: 3Q8FQmorZrM
2018-03-03 11:19:22 -08:00
Mark Banner
7efffcedb3 Bug 1310295 - Provide a Places database migration routine to remove non-built-in roots. r=mak
MozReview-Commit-ID: G2vdW3PRlqo
2018-03-02 11:09:12 +00:00
Dorel Luca
37af71af05 Backed out 2 changesets (bug 1310295) for Mochitest and TV failures on browser/components/places/tests/browser/browser_bookmark_folder_moveability.js
Backed out changeset a277657bfffa (bug 1310295)
Backed out changeset b1af75c617ea (bug 1310295)
2018-03-14 18:23:46 +02:00
Mark Banner
fc84c897fc Bug 1310295 - Provide a Places database migration routine to remove non-built-in roots. r=mak
MozReview-Commit-ID: G2vdW3PRlqo
2018-03-02 11:09:12 +00:00
Marco Bonardo
a6d907b810 Bug 1313188 - Multiple bookmark keywords for same (uri, postData) pair possible. r=kitcambridge,standard8
MozReview-Commit-ID: 662vWkemAMq
2018-02-06 15:58:31 +01:00
Marco Bonardo
13eef17b68 Bug 1346554 - Incremental vacuum favicons.sqlite. r=standard8
MozReview-Commit-ID: 9bcCgkF5uU1
2018-01-18 15:06:39 +01:00
Marco Bonardo
d0e5e5bd45 Bug 1411538 - Try to recover tables from a corrupt places.sqlite. r=standard8
MozReview-Commit-ID: FvuKwIqSt7b
2017-12-07 14:05:29 +01:00
Marco Bonardo
4ac144bd13 Bug 1356531 - Remove moz_places_faviconindex and old Places migrations. r=Paolo
MozReview-Commit-ID: CUCuW4iMSrk
2017-10-20 12:48:37 +02:00
Marco Bonardo
f028264c14 Bug 1410457 - Places.sqlite may be marked as corrupt if schema migration mixes up sync and async execution. r=Paolo
MozReview-Commit-ID: 7O18MLdHU08
2017-10-20 17:14:17 +02:00
Marco Bonardo
c3a2401529 Bug 1399879 - The Places hash SQL function is expensive on large urls. r=adw
This patch limits the amount of chars we hash and avoids some string copies.

MozReview-Commit-ID: AAcLtTzrYlb
2017-09-18 10:31:20 +02:00
Ed Lee
06a97dd34a Bug 1396282 - Add query for getting Highlights (recent bookmarks and recent history with metadata). r=mak
Adds index to moz_bookmarks.dateAdded for use by Highlights query for recent bookmarks.
MozReview-Commit-ID: 7Gs8H0kUij2
2017-09-02 13:15:04 -07:00
Marco Bonardo
6dd1b175e4 Bug 1275878 - Part 2: Replace places-will-close-connection notification with a shutdown blocker. r=adw
MozReview-Commit-ID: A2sn2OreX4K
2016-05-19 23:50:27 +02:00
Marco Bonardo
2e63b9b6bb Bug 1371677 - Delay the database connection in the history service as far as possible. r=adw
Makes initing Places services cheaper, by delaying the connection creation to the first time
it's actually needed.
Same way, delays reading the bookmark roots at the first time they are requested.
Deprecates the concept of lazy observers, since they are no more needed, we can just use addObserver.
Simplifies the startup path: always sends "places-init-complete" (both as a category and a topic) when
the connection starts and adds a "locked" database state when we can't get a working connection.
Makes PlacesCategoriesStarter register for the new category, since it's cheaper than being a bookmarks
observer.
Fixes a couple race conditions in keywords and expiration due to new startup timings.
Removes a test in test_keywords.js that is no more easily feasible, since it'd requires a pre-build
places.sqlite that should be kept up-to-date at every version.

MozReview-Commit-ID: 6ccPUZ651m0
2017-06-09 18:51:09 +02:00
Marco Bonardo
e98198fc81 Bug 1356812 - Use telemetry to report unfixable corrupt Places databases. r=bsmedberg,past
MozReview-Commit-ID: EZKfMlnCKCf
2017-06-23 18:15:46 +02:00
Nan Jiang
ccab846cc2 Bug 1352502 - Part 1. Add description and preview_image_url to Places. r=mak
MozReview-Commit-ID: 4dvVboTm4kf
2017-05-23 14:54:13 -04:00
Marco Bonardo
c0a2287ba5 Bug 1361322 - Don't try to open the favicons database on startup for existing profiles. r=adw
Instead of opening and closing the favicons database at every startup to check whether
it's corrupt, just use the ATTACH DATABASE query result to achieve that.
Also avoid replacing places.sqlite in case of non-fatal errors during the connection
initialization.

MozReview-Commit-ID: 4VW3dtoSH07
2017-05-24 15:19:39 +02:00
Marco Bonardo
5799c4aefd Bug 1355414 - places.sqlite schema migration fails if an application has never used the bookmarks service. r=past
MozReview-Commit-ID: 13YXf2On75J
2017-04-11 16:04:23 +02:00
Marco Bonardo
fbfba8faf2 Bug 977177 - Move favicons to a separate store. r=adw
This patch moves favicons blobs to a separate database names favicons.sqlite.
The dabatase is then ATTACHED to the main Places connection, so that its tables
can be used as if they were all part of the same database.
The favicons.database contains 3 tables:
  1. moz_pages_w_icons
     This is the way to join with moz_places, through page_url_hash and page_url.
     We are not using the place id to avoid possible mismatches between places.sqlite
     and favicons.sqlite. This way the database is "portable" and reusable even
     if places.sqlite changes.
  2. moz_icons
     Contains icons payloads, each payload can either be an SVG or a PNG. These
     are the only stored formats, any other format is rescaled and converted to
     PNG. ICO files are split into single frames and stored as multiple PNGs.
     SVG are distinguishable through width == UINT16_MAX
     In future the table will also contain mask-icon color for SVG and average
     color for PNGs.
     The fixed_icon_url_hash is "fixed" to allow quickly fetch root icons, that
     means icons like "domain/favicon.ico" that can also be reused for any page
     under that domain.
  3. moz_icons_to_pages
     This is the relation table between icons and pages.
     Each page can have multiple icons, each icon can be used by multiple pages.
     There is a FOREIGN_KEY constraint between this (child) table and icons
     or pages (parents), so that it's not possible to insert non-existing ids
     in this table, and if an entry is removed from a parent table, the relation
     will be automatically removed from here.
     Note though that removing from the relation table won't remove from the
     parent tables.
Since the relations are now many-many, it's no more possible to simply join
places with the icons table and obtain a single icon, thus it's suggested that
consumers go through the "page-icon" protocol.
The migration process from the old favicons table is async and interruptible,
it will be restarted along with the favicons service until the temp preference
places.favicons.convertPayloads is set to true.


MozReview-Commit-ID: CUCoL9smRyt
2016-11-14 16:22:46 +01:00
Kit Cambridge
10499d8361 Bug 1258127 - Update the Places schema to track bookmark sync changes. r=mak,rnewman
MozReview-Commit-ID: K27JzgU4KnB
2016-11-20 08:22:02 -08:00
Kit Cambridge
7a889a2eee Bug 1302901 - Create a Places mobile bookmarks root. r=mak
MozReview-Commit-ID: IESvIHCM2fK
2016-09-29 13:44:08 -07:00
Marco Bonardo
3c8be8a7e0 Bug 1150678 - Changing url of a bookmark with a keyword breaks the keyword forever. r=adw
MozReview-Commit-ID: 89Od4PKpQse
2016-08-30 11:04:22 +02:00
Marco Bonardo
8c84a82cf7 Bug 889561 - Reduce the size of places.sqlite by removing the url unique index from moz_places. r=adw
MozReview-Commit-ID: 2kxaXnUYIwT
2016-06-29 14:47:36 +02:00
Carsten "Tomcat" Book
7817a7f352 Backed out changeset ceff61c9fc5a (bug 889561) for frequent testfailures on pgo in /bookmarks/test_ 2016-06-29 13:54:51 +02:00
Marco Bonardo
81cc21d652 Bug 889561 - Reduce the size of places.sqlite by removing the url unique index from moz_places. r=adw
MozReview-Commit-ID: 2kxaXnUYIwT
2016-06-20 13:22:10 +02:00
Marco Bonardo
90b42d97cf Bug 1262887 - Long URLs stored in history cause slow address bar. r=adw
MozReview-Commit-ID: 8h2nVKBe6tP
2016-04-22 11:47:31 +02:00
Cedric Desgranges
d5c104e0cd Bug 1143712 - Remove moz_bookmarks_roots table. r=mak
MozReview-Commit-ID: JXs86bRffyo
2016-03-16 11:56:25 +01:00
Marco Bonardo
2ce7866435 Bug 1250363 - Speed up history removals through a simulated per-statement trigger. r=yoric
This aims at speeding up DELETE FROM moz_places like queries.
The primary reason of slowness is the FOR EACH ROW trigger that takes care of updating the moz_hosts table when places are removed.
Unfortunately Sqlite doesn't support FOR EACH STATEMENT triggers, that means the trigger will hit multiple times for pages in the same host.
The patch introduces an additional temp table to accumulate hosts during a delete, then a trigger takes care of updating moz_hosts only once per touched host, rather than once per removed place.

MozReview-Commit-ID: BlJRLQZoC07
2016-02-23 02:21:03 +01:00
Marco Bonardo
8876034697 Bug 1244650 - Failure to clear Forms and Search Data on exit. r=yoric
The problem is due to sanitization happening too late in the shutdown cycle.
The Sanitizer depends on Places shutdown, that recently moved to async shutdown.
That change caused shutdown to happen completely at profile-before-change, unfortunately
during that phase it's impossible to predict which services are already shutdown.
The patch restores the previous Places shutdown procedure, thus clients are notified
earlier, during profile-change-teardown.

Additional meaningful changes:
* Fixes FX_SANITIZE_TOTAL telemetry to properly count total time taken by sanitize.
* Makes each cleanup operation isolated from other errors to try cleaning up as most as possible.
* In case of multiple sanitization sub steps, each step is isolated by a try/catch, the last seen exception is reported upstream.
* Makes FX_SANITIZE_HISTORY actually measure history, not other random stuff.
* Removes TOPIC_SIMULATE_PLACES_MUST_CLOSE_1 since we can now just use profile-change-teardown for shutdown phase 1.

MozReview-Commit-ID: HroLvbi25IC
2016-02-04 13:51:34 +01:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Marco Bonardo
82e7620380 Bug 1170719 - OMT crash in nsXPCWrappedJS::AddRef() due to re-creating database after shutdown. r=Yoric 2015-07-25 11:07:24 +02:00
Timur Valeev
f7fe659a3a Bug 1169753 - Remove favicons GUIDs. r=mak 2015-07-01 11:50:34 +03:00
Ryan VanderMeulen
889a1d90cd Merge inbound to m-c. a=merge 2015-05-29 09:32:46 -04:00
Timur Valeev
b0f59422a7 Bug 1127763 - Some database might be missing the favicons guid index. r=mak 2015-05-27 15:52:34 +03:00
David Rajchenbach-Teller
530ad877b1 Bug 1043863 - Use AsyncShutdown to shutdown Places. r=mak 2015-05-05 12:44:16 +02:00
Ryan VanderMeulen
6e8ebcf333 Backed out changesets ddad4d54c31e and ef85fdfd2fc7 (bug 1043863) for making browser_thumbnails_storage.js permafail on WinXP opt. 2015-05-26 14:05:18 -04:00
David Rajchenbach-Teller
fe8f4d68b5 Bug 1043863 - Use AsyncShutdown to shutdown Places. r=mak 2015-05-05 12:44:16 +02:00
Andrea Marchesini
18b38ad706 Bug 1156632 - Remove unused forward class declarations - patch 4 - netwerk image and dom, r=ehsan 2015-04-22 08:29:20 +02:00
Andrea Marchesini
ad97ae68b8 Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Marco Bonardo
681386c692 Bug 1146299 - Fix bookmark keywords, after the previous schema migration broke most of them. r=ttaubert 2015-03-24 16:22:29 +01:00
Ehsan Akhgari
ea41d8de48 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00