Commit graph

184 commits

Author SHA1 Message Date
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
Marco Bonardo
22a82c8e00 Bug 1209027 - Reduce queries load on visits addition. r=adw
MozReview-Commit-ID: AvW7WB2LXZE

--HG--
extra : rebase_source : bb5ab637dfe69f2b4587932bd1c506e18b81bca2
2016-05-31 15:19:16 +02:00
Marco Bonardo
392c65b534 Bug 1261386 - Avoid history flooding from repeated reloads. r=adw
MozReview-Commit-ID: FhU8nOoNUHb

--HG--
extra : rebase_source : ff75adb252b13f4042da49d4572fb807c3d0d823
2016-05-26 17:49:40 +02:00
Kris Maglione
0c9d76f23e Bug 1277405: Clear Places observers at XPCOM shutdown. r=mak
MozReview-Commit-ID: 6JYMX7TXDLZ

--HG--
extra : rebase_source : e3828d8cc57246ef2633dc7d7ef7145437f2ebf6
extra : amend_source : 702d193f2cb0ad02a578bc4b07b9ea94e43f2ce6
2016-06-01 16:47:34 -07:00
Kris Maglione
2327dbb60e Bug 1269398: Add visitType, visitId, and fromVisitId fields to history visit query results. r=mak
MozReview-Commit-ID: BCsztVsCH98

--HG--
extra : rebase_source : 5f0ae7221b1107d3a0a7de8d7b702fbb897adef4
2016-05-13 13:47:24 -07:00
Marco Bonardo
37c2fdd36a Bug 1262887 - Long URLs stored in history cause slow address bar. r=adw
MozReview-Commit-ID: 8h2nVKBe6tP

--HG--
extra : rebase_source : 1ab6f2d5a9bfdf04dabafdbb825e95d2fe95e5a8
2016-04-22 11:47:31 +02:00
Kyle Huey
c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Timur Valeev
6d55e4907c Bug 1254923 - Remove RemoveAllPages API. r=mak
--HG--
extra : rebase_source : fd02b587686a1967d3c61a750e2bc4082dcabab9
2016-03-09 19:34:51 +03:00
Marco Bonardo
a942905031 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

--HG--
extra : rebase_source : 5715efe580348b3810000d67a0a692dece36d306
2016-02-23 02:21:03 +01:00
Andrew Krawchyk
3080ab6847 Bug 1220654 - Replace removeVisitsTimeframe with History.removeVisitsByFilter and deprecate it. r=mak
***
yield on removeVisitsByFilter in tests

MozReview-Commit-ID: JGDaJGEmtoD
***
update bookmarked place tests, inline object declarations

MozReview-Commit-ID: Cxec22UHui0
***
updates for code review

MozReview-Commit-ID: AIRqrJ0B6GQ

--HG--
rename : toolkit/components/places/tests/unit/test_removeVisitsByTimeframe.js => toolkit/components/places/tests/history/test_removeVisits.js
extra : amend_source : dbe2442dceefae9bf79a77f09a9a889f18d4a65b
2016-02-16 14:52:59 -05:00
Marco Bonardo
77808a4218 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

--HG--
extra : rebase_source : 5cd01a803fbc1f72dc5174dd0c5a5b5aea473fc2
2016-02-04 13:51:34 +01:00
Marco Bonardo
84f50654a3 Bug 1243779 - Remove uriIsPrefix option from nsINavHistoryQuery.r=adw
MozReview-Commit-ID: CM2Jm6iApct

--HG--
extra : rebase_source : 360606632ddf47dd0902311ad230b1f8930e462b
2016-02-10 17:16:23 +01:00
Marco Bonardo
43b99cedf6 Bug 1240013 - Crash in nsNavBookmarks::OnVisit by setting long location.hash. r=Yoric
--HG--
extra : commitid : 22HsGbBqJ8f
extra : rebase_source : 9b7794cc6d81f8de6c43b303779835f06eca7271
2016-01-26 18:43:53 +01:00
Nicholas Nethercote
beb6cb5381 Bug 1187138 (part 3) - Replace nsBaseHashtable::Enumerate() calls in toolkit/ with iterators. r=froydnj.
--HG--
extra : rebase_source : 716759dac80357e3cdf11c2a555ed32c116a84cc
2015-11-24 16:53:46 -08:00
Andrew Krawchyk
853a55e6e0 Bug 1124185 - Replace removeAllPages with history.clear() and deprecate it. r=mak
--HG--
extra : transplant_source : %A1QQ%C1T%99y%9B%92%3A%D6Jc%E9%D1UoQ%C3X
2015-10-28 13:51:59 -04:00
Nicholas Nethercote
343f285eca Bug 1186785 - Replace nsBaseHashtable::EnumerateRead() calls in toolkit/ with iterators. r=froydnj.
--HG--
extra : rebase_source : d472ec1638cb1697af0d2f2dbae4f4229bea1a80
2015-10-19 15:46:46 -07:00
Nathan Froyd
01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Andrew McCreight
058dc9a336 Bug 1189369, part 2 - Don't implicitly convert nsMaybeWeakPtr to an nsCOMPtr. r=mak
This is only used in a few places, and it obscures what is happening.
2015-08-04 13:55:01 -07:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Emanuel Hoogeveen
7d1e52f2ff Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
David Rajchenbach-Teller
38a8ed9399 Bug 1043863 - Use AsyncShutdown to shutdown Places. r=mak
--HG--
extra : rebase_source : 3a593651ac1fc995e01d00af037aaac8b81c7c32
2015-05-05 12:44:16 +02:00