Граф коммитов

204 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Marco Bonardo 3a8adcdf32 Bug 1275878 - Part 2: Replace places-will-close-connection notification with a shutdown blocker. r=adw
MozReview-Commit-ID: A2sn2OreX4K

--HG--
extra : rebase_source : 6c9dd729c2aad0b5870f0cbf1e565a33376c4f56
2016-05-19 23:50:27 +02:00
Kit Cambridge 3da5c62b82 Bug 1380740 - Remove remaining visit title fallbacks for untitled bookmarks. r=mak
MozReview-Commit-ID: 1f4HMWzxXat

--HG--
extra : rebase_source : cba8855f18a12aa48ff9cd0b10036297738237b2
2017-07-13 19:08:40 -07:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Marco Bonardo bfc44708bc 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

--HG--
extra : rebase_source : 07376076eb42c84caaedeffd75f133d83a6c3d70
2017-06-09 18:51:09 +02:00
Kit Cambridge 31ccf3dc94 Bug 1360872 - Return empty strings for `null` bookmark titles. r=mak
MozReview-Commit-ID: Dd2sEfYvnBt

--HG--
extra : rebase_source : 963b09955610d099b1acb508472a2a3c24202d73
2017-06-06 14:37:22 -07:00
Sebastian Hengst 2cfb02f19d Backed out changeset c0fd6c0590be (bug 1360872) for unused parentId at toolkit/components/places/Bookmarks.jsm:461. r=backout 2017-06-30 00:16:35 +02:00
Kit Cambridge e80441db92 Bug 1360872 - Return empty strings for `null` bookmark titles. r=mak
MozReview-Commit-ID: Dd2sEfYvnBt

--HG--
extra : rebase_source : bea2d2589b2a09ba70a5c8e2b50ceee21acf3f0b
2017-06-06 14:37:22 -07:00
Mark Banner 63bd606b32 Bug 1119282 - Update most browser/components/places browser mochitests to pass with async Places transations and fix some async transaction issues. r=mak
MozReview-Commit-ID: Lc5oWCx1onJ

--HG--
extra : rebase_source : 6272b9cc6bc5907e3d022d647a9dd33c41db23a5
2017-06-27 15:08:31 -07:00
Sebastian Hengst c880c0301d Backed out changeset 5659f6c9a7c5 (bug 1119282) 2017-06-29 04:00:21 +02:00
Mark Banner c4048deb35 Bug 1119282 - Update most browser/components/places browser mochitests to pass with async Places transations and fix some async transaction issues. r=mak
MozReview-Commit-ID: Lc5oWCx1onJ

--HG--
extra : rebase_source : 6272b9cc6bc5907e3d022d647a9dd33c41db23a5
2017-06-27 15:08:31 -07:00
Mats Palmgren e7a32e265e Bug 1376471 - Just use Put rather than Get+Remove+Put when an entry already exist. r=froydnj
MozReview-Commit-ID: EQDSF4mkQZ3
2017-06-28 01:03:17 +02:00
Bill McCloskey f115503a0b 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 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f 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 ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Marco Bonardo 4a1b0e63d5 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

--HG--
extra : rebase_source : 789300afb5d700095bd83aabf1a37200218ff210
2017-03-30 15:16:41 +02:00
Marco Bonardo 19cfdf37f2 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

--HG--
rename : toolkit/components/places/tests/unit/test_svg_favicon.js => toolkit/components/places/tests/favicons/test_svg_favicon.js
extra : rebase_source : fa49c4a81d6ab6b34a2f19ee4175e889a6e9d734
2016-09-28 16:14:30 +02:00
Marco Bonardo ext:(%20%3Cmbonardo%40mozilla.com%3E) 6ed7963bc1 Bug 1306276 - Deprecate History RemovePage and RemovePages. r=standard8
MozReview-Commit-ID: 3NSaXKy1hP3

--HG--
extra : rebase_source : da03f694db3b690cfceba3a7a6c62832b8b1930c
2017-03-22 12:44:54 +01:00
Gijs Kruitbosch c1503f1bc6 Bug 1344282 - prep: add a makeGuid method to nsINavHistory, r=mak
MozReview-Commit-ID: JKIjtcqyTzc

--HG--
extra : rebase_source : 81361b26314c8d94959b8894d50b126363625ee6
2017-03-13 22:22:57 +00:00
Gijs Kruitbosch b0f2da2a20 Bug 1341097 - part 3: don't dispatch oodles of titlechanged notifications for new history entries, r=mak
MozReview-Commit-ID: 7jHOcCQ5ZBb

--HG--
extra : rebase_source : 6dff335e78857e7c860ebe7ec6ea415fe0f9e3f6
2017-02-27 18:26:21 +00:00
Makoto Kato 709e59c8e2 Bug 1225696 - Part 2. Use DateTimeFormat instead of dateFormat.properties. r=mak
MozReview-Commit-ID: 9ufUVeppwHk

--HG--
extra : rebase_source : 12ab7a77656bafa3b0ff6591279694055899d076
2017-02-20 14:22:21 +09:00
Tom Tromey d2667a2b27 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L

--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Wes Kocher 6ff8201ffe Merge inbound to central, a=merge
MozReview-Commit-ID: 4mN7daXzULJ
2017-02-08 16:08:42 -08:00
Mark Banner 0af0826d29 Bug 1336233 - Fix intermittent failures in browser_multi_redirect_frecency.js by ensuring the idle service updates for frecency are ignored. r=mak
MozReview-Commit-ID: L8AgWOAGF9g

--HG--
extra : rebase_source : 01ef4f69900561c373974ea91015c9ed377c81a3
2017-02-06 14:16:20 +00:00
Zibi Braniecki b8f991e41b Bug 1335983 - Migrate nsCollation::CreateCollection to use LocaleService::GetAppLocale. r=jfkthame
MozReview-Commit-ID: 5GEnL7Kihpj

--HG--
extra : rebase_source : 413d880035b49da82db0530379425d31ac31a82e
2017-02-07 12:52:03 -08:00
Wes Kocher a9ce32d9a5 Backed out 2 changesets (bug 1335983) for build bustage a=backout
Backed out changeset 5a9559ded976 (bug 1335983)
Backed out changeset de2b0d90e2da (bug 1335983)

MozReview-Commit-ID: 377KQDU1QqJ
2017-02-07 12:34:30 -08:00
Zibi Braniecki 6d98bad59d Bug 1335983 - Migrate nsCollation::CreateCollection to use LocaleService::GetAppLocale. r=jfkthame
MozReview-Commit-ID: bJVrVj2dAS

--HG--
extra : rebase_source : f3a28e003415f0c58462a73b5fd987455e102fc5
2017-02-06 14:57:09 -08:00
Sebastian Hengst ab62b551a1 Backed out changeset 7fbc8eb28f78 (bug 1336233) for Windows build bustage at nsNavHistory.cpp(3100). r=backout on a CLOSED TREE 2017-02-07 17:41:54 +01:00
Mark Banner 269a85ad70 Bug 1336233 - Fix intermittent failures in browser_multi_redirect_frecency.js by ensuring the idle service updates for frecency are ignored. r=mak
MozReview-Commit-ID: L8AgWOAGF9g

--HG--
extra : rebase_source : f47a5cc0c5aee0ac0e88adffa912e9983065e862
2017-02-06 14:16:20 +00:00
Valentin Gosu e703455691 Bug 1275746 - nsNavHistory::AsciiHostNameFromHostString return empty string if host is empty r=mak
MozReview-Commit-ID: 3AKgNCXPKoU
2016-07-13 00:06:07 +03:00
Mark Banner ef6375ca0d Bug 737836 - Don't rely on past visits for frecency calcuations for redirects. r=mak
MozReview-Commit-ID: GfgZSInN9Lv

--HG--
extra : rebase_source : a052eebb1e5ffd2825b556c8a5702ec57f2570de
2017-01-18 14:09:09 +00:00
Marco Bonardo a9ba5c6a15 Bug 1318650 - Searching Places views by url became extremely slow. r=adw
MozReview-Commit-ID: 67SztEKHCn

--HG--
extra : rebase_source : 88d3df60f89110bbe73a955ba525c145e4bdea81
2016-11-18 16:51:27 +01:00
Gerald Squelart 0affeb4ab0 Bug 1316432 - Fix nsCOMPtr constructions&assignments from 0 - r=froydnj
Giving '0' (literal zero) to nsCOMPtr is now ambiguous, as both
nsCOMPtr(decltype(nullptr)) and nsCOMPtr(T*) could be used.
In any case, our coding standards mandate the use of 'nullptr' for pointers.
So I'm changing all zeroes into nullptr's where necessary.

MozReview-Commit-ID: LXiZTu87Ck6

--HG--
extra : rebase_source : f9dcc6b06e9ebf9c30a576f9319f76a51b6dc26f
2016-11-10 14:11:27 +11:00
Valentin Gosu 99164c0eef Bug 1305204 - (Part 1) Backout bug 1275746 a=backout
MozReview-Commit-ID: FtOalze9SdY
2016-10-23 14:24:41 +02:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Carsten "Tomcat" Book 553a2da922 merge mozilla-inbound to mozilla-central a=merge 2016-08-10 15:54:26 +02:00
Mohammed Habeeb c47ba3499a Bug 1261313 - Remove RemoveVisitsByTimeframe API. r=adw
MozReview-Commit-ID: 8Ykvc2td2hx
2016-08-09 16:44:17 +05:30
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Nathan Froyd a5dd4da994 Bug 1292301 - reduce reference-counting in Places; r=adw
By using nsCOMArray::Forget, we can pass the references we hold in an
nsCOMArray directly to the XPCOM caller, without having to go through an
extra cycle of AddRef/Release calls.  This way should be slightly faster
and it also results in smaller code.  Notice that we don't have to worry
about removing the OOM check in the places that use Forget(), because we
were already using moz_xmalloc to allocate the outparam array, and
moz_xmalloc aborts the process on OOM, just as Forget() does.

The nsNavHistoryFolderResultNode::GetQueries change is thrown in for fun.
2016-08-05 22:03:44 -04:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Valentin Gosu f0fea77c54 Bug 1275746 - nsNavHistory::AsciiHostNameFromHostString return empty string if host is empty r=mak
MozReview-Commit-ID: 3AKgNCXPKoU
2016-07-13 15:19:37 +03:00
Marco Bonardo 0bd3c0c381 Bug 1283825 - Add a page-icon protocol to fetch the best icon for a url. r=adw
MozReview-Commit-ID: 3exDniH8Hkm

--HG--
extra : rebase_source : 299b288933f1a826aadffef4e9fab9559a7950ff
2016-06-30 18:17:44 +02:00
Marco Bonardo 3837320431 Bug 889561 - Reduce the size of places.sqlite by removing the url unique index from moz_places. r=adw
MozReview-Commit-ID: 2kxaXnUYIwT

--HG--
extra : rebase_source : bbcaf85a0346b5347fc94053b4f193e4b89f2995
2016-06-29 14:47:36 +02:00
Carsten "Tomcat" Book a982df321d Backed out changeset ceff61c9fc5a (bug 889561) for frequent testfailures on pgo in /bookmarks/test_
--HG--
extra : rebase_source : 84d364e67739738da807b9d83c3338ebd8a086a6
2016-06-29 13:54:51 +02:00
Marco Bonardo 67c3ad7930 Bug 889561 - Reduce the size of places.sqlite by removing the url unique index from moz_places. r=adw
MozReview-Commit-ID: 2kxaXnUYIwT

--HG--
extra : rebase_source : e03928033aa795c9a1cdb34d4f4618b0eb1d6890
2016-06-20 13:22:10 +02:00
Nathan Froyd 150bcb573b Bug 1278925 - micro-optimize nsCOMArray appending with already_AddRefed AppendElement; r=erahm
In all of the places touched by this patch, the smart pointer we're
appending is about to become unused, so simply .forget()'ing its
reference into the appropriate nsCOMArray works just fine.
2016-06-20 18:38:10 -04:00
Marco Bonardo 41b74693db Bug 1277235 - add typed and visitCount to onVisit. r=adw
MozReview-Commit-ID: 3XfBCiOgyAu

--HG--
extra : rebase_source : 9f98a7a838e4ac56ae82bd13c330f181268228e5
2016-06-01 16:42:15 +02:00