Commit Graph

34 Commits

Author SHA1 Message Date
Bill McCloskey
ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book
238bf154d5 Backed out changeset 4f6302a98ae4 (bug 1372405) 2017-06-21 13:59:26 +02:00
Bill McCloskey
67e8af4720 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
bbe9441993 Backed out changeset 9846de3bd954 (bug 1372405) 2017-06-20 08:27:02 +02:00
Bill McCloskey
f69608368b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng
e6dc9e02bc Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Marco Bonardo
4a869f12cd Bug 1337858 - Replace CopyFavicon in the Docshell with a proper favicons API. r=standard8
MozReview-Commit-ID: 8wjSbj0FTwE
2017-05-18 16:48:23 +02:00
Marco Bonardo
6b33830513 Bug 1359887 - Potential deadlock when forcing wal checkpoints on Places startup. r=past
Don't enforce wal checkpoints during Places startup, since that can possibly cause a deadlock that would
make some early synchronous API calls bailout. That would indeed cause unexpected intermittent failures
in tests.
Regardless, forcing checkpoints like this in modern filesystems is unlikely to add much value, since
the probabilities to lose the whole contents of the journal are very low.
Additionally we have better startup handling of invalid databases, so we should be able to recover in any case.

MozReview-Commit-ID: G7nISZkd8s2
2017-04-29 16:49:35 +02:00
Marco Bonardo
0f3a39aaf2 Bug 1359456 - Page-icon protocol is wrongly removing any ref from the page url. r=adw
MozReview-Commit-ID: FejFQj1Px7n
2017-04-28 17:47:10 +02:00
Marco Bonardo
857a0b399e Bug 1357664 - Don't delete all relations to expired icons when updating icons for a specific page. r=adw
MozReview-Commit-ID: JYHeuyvrJYp
2017-04-19 10:19:48 +02:00
Marco Bonardo
31d5330720 Bug 1357555 - Properly handle an expiration value of 0 when fetching an icon. r=adw
Favicons migrated from the old store have expiration set to 0.
The code is not expecting that, since expiration has always been positive, thus
those icons are always considered valid and never replaced. They should instead be
considered expired.

MozReview-Commit-ID: Cz0JB4IbURA
2017-04-18 23:51:05 +02:00
Iris Hsiao
336fc29c15 Backed out changeset 3507329c5999 (bug 1357555o) for eslint failure in test_expire_migrated_icons.js 2017-04-20 16:23:59 +08:00
Marco Bonardo
9d2fcbd039 Bug 1357555 - Properly handle an expiration value of 0 when fetching an icon. r=adw
Favicons migrated from the old store have expiration set to 0.
The code is not expecting that, since expiration has always been positive, thus
those icons are always considered valid and never replaced. They should instead be
considered expired.

MozReview-Commit-ID: Cz0JB4IbURA
2017-04-18 23:51:05 +02:00
Marco Bonardo
9b56138641 Bug 1356567 - root icons should still create a page association if the domain differs. r=adw,kitcambridge
Root domain icons are no more associated with their pages, BUT if the page uses
a root domain icon from another domain, it should still get an association with it
or we couldn't relate the two.

This also fixes an overlooked problem in PlacesTestUtils where Date objects
cross a boundary and fail instanceof checks. This causes failures in the same
test that this patch is modifying.
To protect from future similar issues some protection has been added to updatedPlaces
so that it will crash in debug builds.

MozReview-Commit-ID: 3MTKhGj3ehj
2017-04-14 20:34:27 +02:00
Carsten "Tomcat" Book
b64dbe3b57 Backed out changeset eb94759f0fcf (bug 1356567) for test failures in own test 2017-04-18 12:58:09 +02:00
Marco Bonardo
f10bff9f87 Bug 1356567 - root icons should still create a page association if the domain differs. r=adw,kitcambridge
Root domain icons are no more associated with their pages, BUT if the page uses
a root domain icon from another domain, it should still get an association with it
or we couldn't relate the two.

This also fixes an overlooked problem in PlacesTestUtils where Date objects
cross a boundary and fail instanceof checks. This causes failures in the same
test that this patch is modifying.
To protect from future similar issues some protection has been added to updatedPlaces
so that it will crash in debug builds.

MozReview-Commit-ID: 3MTKhGj3ehj
2017-04-14 20:34:27 +02:00
Marco Bonardo
165e65df87 Bug 977177 - Don't expire root domain icons with history, and don't associate pages to them. r=adw
Root domain icons should be retained as far as possible, and only expired when
a domain is removed from the database. We do that through the moz_hosts trigger.
Additionally, since we return root domain icons without the need for a direct
association, we can save a lot of database space and performance by not storing
associations at all for root domain icons.
This has some downsides, since we don't exactly know if the page was really
associated with that root icon or not, but the perf gains are far superior.
Note that we still create associations during migration, since it would be too
expensive to examine every single url to figure out if it's a root domain icon.

MozReview-Commit-ID: 3mlfcOV8ixC
2017-03-30 15:16:41 +02:00
Marco Bonardo
1167b6cacc Bug 977177 - Split ico files into native frames. r=adw
When optimizing an ico file, split it into its single resources and pick only
the sizes we care about. This also de-dupes same size resources.
The migration path doesn't split ico files, since it's a performance hot path
and we should try to reduce the I/O load at that time. The worst case is that
some icons may not look that much crisp until the next page reload.
Note that while the "resource" naming would be more appropriate for ico files,
compared to "frame" that is more appropriate for animations, the patch still
uses the frame name, cause it's far less generic and can be more easily
associated with the concept of a graphical asset. Regardless, it's not exposed
in any public API.

MozReview-Commit-ID: 3vrGXzJDfjX
2017-03-28 17:30:28 +02:00
Marco Bonardo
0defdaed15 bug 977177 - Fallback to the root domain icon. r=adw
When an icon for a specific page is not available, try to fallback for the root
domain icon.
This is valid for both getFaviconUrlForPage and getFaviconDataforPage, as well
as the page-icon: protocol.

MozReview-Commit-ID: JC4cx1PAY38
2017-03-28 11:50:53 +02:00
Marco Bonardo
9ec4611b7c Bug 977177 - Expire old page to icon relations to avoid serving deprecated icons. r=adw
Inserting new payloads for a page should expire old ones, otherwise if the page
should change favicons, we'd retain old associations forever.
At the same time, setting multiple payloads for a page should keep working.

MozReview-Commit-ID: 2y1XLUiKAQo
2017-03-16 14:51:03 +01:00
Marco Bonardo
c536e58644 Bug 977177 - Update favicons API consumers. r=adw
Updates consumers to the new behavior.
Some consumers are changed to use  the "page-icon:" protocol, since it's not
trivial to join the icons table and get a single result out of it. In most cases
the join would return multiple results since a page can have multiple icon payloads.
These consumers for now will return the biggest payload, bug 1347532 will fix
some of them to properly pass a #size=NN fragment.
Note that, even before, these were just "moz-anno:favicon:" uris, and the
payload had to be fetched from the database.
Some other consumers for now just fallback to the largest payload, by passing 0
to GetFaviconURLForPage.

The favicon optimization still happens on the main-thread, bug 1346139 will
handle that problem.

Most of the changes involve handling the modified IconData objects, that now
retain an array of payloads, rather than just one. But note that .ico files are
not yet split into single frames, due to imagelib missing APIs that will be handled
in bug 1337402.
The other changes involve fixing queries to properly join with the new tables.

Finally, note that thanks to the FOREIGN KEYS support, removing from moz_icons or
moz_pages_w_icons will also remove relations from moz_icons_to_pages.

The system only supports square icons, so icons are resized based on their larger side.

This doesn't include new tests, those will be in a following changeset.

MozReview-Commit-ID: JUkpquhpS8y
2016-09-28 16:14:30 +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
Tim Huang
b5bdd675d4 Bug 1277803 - Part 1 : Add a new ContentPolicy TYPE_INTERNAL_IMAGE_FAVICON for indicating a favicon loading. r=ckerschb 2016-10-13 15:43:54 +08:00
Wes Kocher
85edded572 Backed out 8 changesets (bug 1277803) for browser-chrome test failures a=backout
Backed out changeset 477890efdb88 (bug 1277803)
Backed out changeset 49da326bfe68 (bug 1277803)
Backed out changeset 2d17a40a9077 (bug 1277803)
Backed out changeset b1cb0a195ca1 (bug 1277803)
Backed out changeset c7d82459d152 (bug 1277803)
Backed out changeset 3be9a06248af (bug 1277803)
Backed out changeset 8d119ca96999 (bug 1277803)
Backed out changeset be767a6f7ecd (bug 1277803)
2016-10-12 14:26:00 -07:00
Tim Huang
28bb063301 Bug 1277803 - Part 1 : Add a new ContentPolicy TYPE_INTERNAL_IMAGE_FAVICON for indicating a favicon loading. r=ckerschb 2016-10-12 17:32:03 +08:00
Drew Willcoxon
c4e95293f3 Bug 798223 - Increase optimized favicon dimension in Places database from 16 to 32. r=mak
MozReview-Commit-ID: HTLPQR66HOn
2016-08-02 18:00:07 -07:00
Marco Bonardo
270696b2ca Bug 1283825 - Add a page-icon protocol to fetch the best icon for a url. r=adw
MozReview-Commit-ID: 3exDniH8Hkm
2016-06-30 18:17:44 +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
Gijs Kruitbosch
6178c6b816 Bug 1279208, r=mak
MozReview-Commit-ID: KOuTjwn9MSx
2016-06-09 13:25:07 +01:00
Christoph Kerschbaumer
b3c660bf43 Bug 1196013 - Use channel->ascynOpen2 in toolkit/components/places. r=billm r=sicking r=mak 2016-05-23 23:57:31 +02:00
Gijs Kruitbosch
10ad3819f0 Bug 1255270, r=mak
MozReview-Commit-ID: 5fInAZiZMhl
2016-05-23 10:09:13 +01:00
Marco Bonardo
9c39dbd4fd Bug 1269737 - Make AsyncFaviconHelpers more maintainable. r=adw
MozReview-Commit-ID: l0GnzPZK8w
2016-05-06 11:37:26 +02:00