Commit graph

102 commits

Author SHA1 Message Date
Ehsan Akhgari
eb8235f7ab Bug 1343863 - Make sure that places Database object doesn't get leaked if the profile folder doesn't exist or is locked; r=mak 2017-03-06 09:42:51 -05:00
Marco Bonardo
09233f2a5d Bug 1342946 - Fix wrong MOZ_ASSERT(true) in places/Database.cpp. r=standard8
MozReview-Commit-ID: 1gkIRqN1yYE

--HG--
extra : rebase_source : 2927f32454961578738851d35cb2bf9dd710b703
2017-02-28 13:53:16 +01:00
Kit Cambridge
564cc476e6 Bug 1258127 - Update the Places schema to track bookmark sync changes. r=mak,rnewman
MozReview-Commit-ID: K27JzgU4KnB

--HG--
extra : rebase_source : d5444da8f6d77d66eb174bf09ed3252d5fd55327
2016-11-20 08:22:02 -08:00
Kit Cambridge
6a43fd2448 Bug 1312494 - Fix up queries that point to the wrong folder in _ensureMobileQuery. r=tcsc
This patch also reports validation errors for left pane queries on the
server, and removes incorrect mobile query migration code.

MozReview-Commit-ID: FT7kAZJapqE

--HG--
extra : rebase_source : 1aa2a14a245bc0bb2a044d951a4c5d274b9d9f13
2016-10-24 12:06:00 -07:00
Kit Cambridge
14321604da Bug 1302901 - Create a Places mobile bookmarks root. r=mak
MozReview-Commit-ID: IESvIHCM2fK

--HG--
extra : rebase_source : 14db95c76cc8286380d80ef5717151bbd90532bd
2016-09-29 13:44:08 -07:00
Marco Bonardo
d399b52d03 Bug 1150678 - Changing url of a bookmark with a keyword breaks the keyword forever. r=adw
MozReview-Commit-ID: 89Od4PKpQse

--HG--
extra : rebase_source : 4fc77a9e4c2241787041a57da10907f32250babd
2016-08-30 11:04:22 +02:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08: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
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
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
Gregory Szorc
696501c7e0 Bug 1272025 - Add preference to use volatile storage with Places database; r=mak
We have data showing that the Places SQLite database can consume
gigabytes of I/O during Firefox test automation jobs. This is
because a number of tests load pages as rapdily as possible,
effectively stress testing Places and SQLite. As the SQLite
database is committed to, we incur I/O for the WAL journal
and when flushing/synchronizing commits. This can add up to a
lot of overhead, especially on spinning disks.

It is important for Places to run during many tests. But it
isn't necessarily important to run with robust I/O guarantees:
SQLite itself has tests that ensure different journal and
synchronizing modes work as advertised.

This commit introduces a preference that changes the SQLite
journal and synchronization modes to be less robust. We use
an in-memory journal so no I/O is incurred for journal writing.
We disable synchronization during commit so no expensive
file(system) flushing is performed. Because setting this
preference would be dangerous for end users, we only honor the
pref if a scary sounding environment variable is set. Hopefully
that's enough of an obstacle to prevent people from footgunning
themselves.

A preliminary Try run reveals this has the potential to shave
hundreds of megabytes of I/O from various jobs. Although this
commit stops short of changing the configuration in automation
to use the new volatile storage preference.

MozReview-Commit-ID: KCoDVzwkSbg

--HG--
extra : rebase_source : 4e630f4341fc8c07e16383480356bd1bff4d4ba2
2016-05-11 11:00:37 -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
Katie Broida
0170b7f16b Bug 1257599 - Rename 'Unsorted Bookmarks' into 'Other Bookmarks'. r=jaws a=kwierso
MozReview-Commit-ID: 7iMM0vg9rUo
2016-03-31 16:17:30 -07:00
Cedric Desgranges
71a7d543ce Bug 1143712 - Remove moz_bookmarks_roots table. r=mak
MozReview-Commit-ID: JXs86bRffyo
2016-03-16 11:56:25 +01: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
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
Aidin Gharibnavaz
686438c658 Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley 2016-02-10 08:23:00 +01:00
Carsten "Tomcat" Book
5b358688b7 Backed out changeset c18e29c1b369 (bug 1164581) for cpp unit tests test failures
--HG--
extra : rebase_source : fb6fd434c8e3f4b5fa53ea645a54c07cab207894
2016-02-08 11:17:38 +01:00
Aidin Gharibnavaz
69cf7e035f Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley
--HG--
extra : rebase_source : 3c6bba6613a14e48239d302bdd0f7fe2e322265d
2016-02-07 10:56:00 +01:00
Chris Peterson
a0c2f29590 Bug 1236324 - Annotate intentional switch fallthroughs to suppress -Wimplicit-fallthrough warnings in toolkit/components/places/. r=mak
toolkit/components/places/Database.cpp:182:5: [-Wimplicit-fallthrough] unannotated fall-through between switch labels
toolkit/components/places/nsAnnotationService.cpp:215:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
toolkit/components/places/nsAnnotationService.cpp:227:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
toolkit/components/places/nsAnnotationService.cpp:297:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
toolkit/components/places/nsAnnotationService.cpp:309:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
toolkit/components/places/nsNavHistoryResult.cpp:2420:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
toolkit/components/places/nsNavHistoryResult.cpp:2446:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
toolkit/components/places/nsNavHistoryResult.cpp:2878:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-11-22 13:59:54 -08: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
0ff7248107 Bug 1210517 - Create nsVariant directly rather than via do_CreateInstance(). r=froydnj
The goal here is to leave creation stuff mostly for JS, so we can
convert it entirely over to a non-threadsafe cycle-collected version
without breaking any existing C++ users.

I didn't do this for a remaining use in nsGlobalWindow.h to avoid
including nsVariant.h all over the place.
2015-10-07 08:17:42 -07:00
Marco Bonardo
f52a821fd6 Bug 1170719 - OMT crash in nsXPCWrappedJS::AddRef() due to re-creating database after shutdown. r=Yoric
--HG--
extra : commitid : 4mhysTKX8XL
2015-07-25 11:07:24 +02: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
Dragana Damjanovic
7987d2203e Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Phil Ringnalda
900c693e30 Merge m-c to m-i 2015-07-03 19:15:06 -07:00
Juan Gomez
258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Timur Valeev
1bb05cadb4 Bug 1169753 - Remove favicons GUIDs. r=mak
--HG--
rename : toolkit/components/places/tests/migration/test_current_from_v16.js => toolkit/components/places/tests/migration/test_current_from_v11.js
extra : rebase_source : 47f69e11676926b5a4e3a8053596df41d9010aee
2015-07-01 11:50:34 +03:00
Ryan VanderMeulen
2e35b1209f Merge inbound to m-c. a=merge 2015-05-29 09:32:46 -04:00
Timur Valeev
e14fb47c21 Bug 1127763 - Some database might be missing the favicons guid index. r=mak 2015-05-27 15:52:34 +03: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
Marco Bonardo
9e8248e6b2 Bug 1154877 - Content process shouldn't use the Places Database. r=billm 2015-04-29 10:57:24 +02:00
Ryan VanderMeulen
994a9a8830 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
58f0e147c3 Bug 1043863 - Use AsyncShutdown to shutdown Places. r=mak
--HG--
extra : transplant_source : 0%06m%9A%9D%9C.%CD%EB%D4%AC%93%90%B2%AB%DB%8B%18%9B%13
2015-05-05 12:44:16 +02:00
Ryan VanderMeulen
5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez
702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Marco Bonardo
bb8a7ba0a8 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
883849ee32 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
Marco Bonardo
941b1d7ea2 Bug 1125113 - Change the keywords schema associating them with uris. r=ttaubert 2015-03-20 09:39:20 +01:00
Asaf Romano
db963fd7aa Bug 1107308 - Round dateAdded and lastModified values to milliseconds precision in places cpp components. r=mak 2014-12-04 14:09:48 -08:00
Marco Bonardo
0cab188e85 Bug 1071505 - use constant GUIDs for Places roots. r=mano 2014-11-04 17:40:33 +01:00
Marco Bonardo
922edae9ac bug 1047811 - Part 2 - Use async transactions in Places. r=Mano 2014-09-10 12:46:17 +02:00
Carsten "Tomcat" Book
fd40edf863 Backed out changeset 925427a6d0b1 (bug 1047811) 2014-09-10 13:07:12 +02:00
Marco Bonardo
0007621071 bug 1047811 - Part 2 - Use async transactions in Places. r=Mano 2014-09-10 12:46:17 +02:00
Althaf Hameez
679d802ec0 Bug 1017502 - Add a foreign_count column to moz_places r=mak 2014-08-01 16:53:02 +02:00
Benoit Jacob
210693da34 Bug 1028588 - Fix dangerous public destructors in toolkit/ - r=ehsan 2014-06-23 18:40:02 -04:00
Birunthan Mohanathas
58641805f1 Bug 869836 - Part 6: Use EqualsLiteral instead of Equals where possible. r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas
5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00