Commit graph

110 commits

Author SHA1 Message Date
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
Kit Cambridge
2aee7885cb Bug 1285408 - Add change source tracking for bookmarks. r=markh
MozReview-Commit-ID: I6IWhMWR1bG

--HG--
extra : rebase_source : b331e448871e44ee51923b4c512e0b8ad4206cd4
2016-08-11 13:13:22 -07: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
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
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
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
Kyle Huey
d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07: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
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
Nicholas Nethercote
e83b2d5475 Bug 1187138 (part 4) - Replace nsBaseHashtable::Enumerate() calls in toolkit/ with iterators. r=froydnj.
--HG--
extra : rebase_source : 18cb9f8330c784a6700ba0a94804a42812159b25
2015-11-24 16:53:46 -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
Marco Bonardo
ddb1ecd87c Bug 1150678 - Part 1: notify the old value in onItemChanged (only URI changes for now). r=ttaubert
--HG--
extra : commitid : KYeXHLc1S0W
2015-08-05 23:10:11 +02:00
Wes Kocher
c906ee5d44 Backed out 2 changesets (bug 1150678) for xpcshell bustage
Backed out changeset 1c24d237080c (bug 1150678)
Backed out changeset 9f1f1e11ca37 (bug 1150678)
2015-08-05 16:24:58 -07:00
Marco Bonardo
0aae79f32c Bug 1150678 - Part 1: notify the old value in onItemChanged (only URI changes for now). r=ttaubert
--HG--
extra : commitid : L3Sje2jJyiY
2015-08-05 23:10:11 +02:00
Andrew McCreight
fe85799ea3 Bug 1189369, part 5 - Use the nice cycle collector macro template for nsNavHistoryResult. r=mak
Also, fix up the CC template so it works.
2015-08-04 13:55:01 -07:00
Andrew McCreight
f197361a7f Bug 1189369, part 1 - Remove trailing whitespace from some nsNavHistory* files. r=mak 2015-08-04 13:55:01 -07:00
Andrew McCreight
37f672e11e Bug 1074416 - Don't AddRef or Release nav history result observers during CC traversal. r=smaug
Doing an AddRef or Release of a cycle collected object during CC
traversal can cause leaks. traverseResultObservers does this in two
places. First, it accidentally copies the array that is passed
in. Second, the GetValue() method that is being implicitly called in
the line with |aObservers.ElementAt(i);| does a QI.

This patch fixes the former problem by passing a reference. It fixes
the latter problem by returning the raw underlying pointer held by the
nsMaybeWeakPtrArray, which is what the CC wants anyways, because it
does not care about weak referents.
2015-07-29 20:36:00 -04:00
mchenryc
ef085a4209 Bug 1163447 - Allow Places tree selectItems() to recurse into folder-shortcuts. r=mak
--HG--
extra : commitid : HXZgBgnsjHO
2015-06-04 13:02:00 -07:00
Mohamed Waleed
f3a908411e Bug 1062894 - Avoid batching tag changes if number of changed tags is low. r=mak, ttaubert 2015-04-27 21:24:21 +02:00
Denis Volk
32e981896d Bug 1095098 - move do_QueryObject templates into their own header; r=froydnj 2015-04-15 12:47:03 -04:00
Mike Hommey
b077d9624d Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Nathan Froyd
b252a27930 Bug 1142503 - don't use QueryInterface when the compiler can do the cast for us; r=ehsan
Calling QueryInterface with a statically known IID should typically not
be necessary.  In those cases where it's not, the compiler can do the
cast for us, though we have to supply the reference-counting that
QueryInterface would do.

In passing, several redundant null-checks for the result of |new T| have
been deleted.
2015-03-12 09:43:50 -04: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
Asaf Romano
40a4768f10 Bug 1105866 - Implement folderShorcutNode.targetFolderGuid (guid version of folderShortcutNode.folderItemId). r=mak 2014-12-10 19:03:15 +02:00
Asaf Romano
40733d42bd Bug 1085291 - A bookmark node that is inserted by live-update code is missing bookmarkGuid value. r=mak (Relanding with the test file included this time). 2014-11-25 11:43:26 +02:00
Carsten "Tomcat" Book
3151484b04 Backed out changeset 6db486ed2de1 (bug 1085291) for breaking Builds on a CLOSED TREE 2014-11-25 09:25:11 +01:00
Asaf Romano
908d732cbf Bug 1085291 - A bookmark node that is inserted by live-update code is missing bookmarkGuid value. r=mak. 2014-11-25 09:06:37 +02:00
Marco Bonardo
b34a02ceac Bug 1095069 - Cannot copy or delete bookmarks from search results in library. r=mano
--HG--
rename : browser/components/places/tests/browser/browser_library_left_pane_commands.js => browser/components/places/tests/browser/browser_library_commands.js
2014-11-13 10:19:19 +01:00
Asaf Romano
d83f8d60e1 Bug 1068671 - folderReadOnly doesn't pertain to bookmarks or results. r=mak 2014-10-14 17:03:28 +03:00
Carsten "Tomcat" Book
459781f902 Backed out changeset b30d47d94a85 (bug 1068671) for bc1 test failures 2014-10-01 13:14:06 +02:00
Asaf Romano
896f516dd7 Bug 1068671 - Remove 'read-only' folders support from places. r=mak 2014-10-01 12:19:06 +03:00
Nicholas Nethercote
a7cf4142b4 Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc.
* * *
imported patch rm-dummy-params

--HG--
extra : rebase_source : c25987eb11bae197218d5fc53b77def19afa36ac
2014-08-06 06:31:21 -07:00
Daniel Holbert
4de138a84e Bug 992670 part 3 - Comment out failing assertion, with reference to followup bug. r=mak 2014-08-06 22:40:37 -07:00
Birunthan Mohanathas
1f7afaa7e1 Bug 992670 part 2 - Make all child insertions/removals non-temporary in nsNavHistoryContainerResultNode. r=mak 2014-08-06 22:40:36 -07:00
Birunthan Mohanathas
e6e472196f Bug 992670 part 1 - Fix always true assertion condition in nsNavHistoryResult.cpp. r=mak 2014-08-06 22:40:35 -07:00
Hiroyuki Ikezoe
760a6cfcbf Bug 1010634 - Use Contains instead of NoIndex to avoid relocation error. r=briansmith 2014-06-01 18:30:00 -04: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
Birunthan Mohanathas
7ac92ae5ea Bug 900903 - Part 2: Change uses of numbered macros in nsCycleCollectionParticipant.h to the variadic variants. r=smaug 2014-04-25 12:49:00 -04:00
Drew Willcoxon
eceebb9622 Bug 911307 - Reflect changes to top sites immediately in about:newtab (part 1, Places patch). r=mak 2014-03-28 23:30:04 -07:00
Phil Ringnalda
128149306e Backed out 2 changesets (bug 911307) for frequent timeouts in browser_newtab_perwindow_private_browsing.js
Backed out changeset 70638b7c97f1 (bug 911307)
Backed out changeset 3951f7e82b4c (bug 911307)
2014-03-29 12:13:11 -07:00
Drew Willcoxon
56944f3c4b Bug 911307 - Reflect changes to top sites immediately in about:newtab (part 1, Places patch). r=mak 2014-03-28 23:30:04 -07:00
Marco Bonardo
2563760419 Back out Bug 894331 to solve browser hangs when deleting history. a=lsblakk 2013-11-13 09:45:41 -05:00
Trevor Saunders
d43c55ca0e bug 949821 - use MOZ_UTF16 more and NS_LITERAL_STRING less r=froydnj 2013-12-12 20:50:01 -05:00
Ehsan Akhgari
fa9a2a8cf4 Bug 943993 - Build toolkit/components/places in unified mode; r=mak 2013-11-29 18:29:49 -05:00
Marco Bonardo
55f9714d25 Bug 914294 - Don't throw exceptions from the history result end batch macro to retain backwards compatibility.
r=mano
2013-10-15 14:30:33 +02:00
Birunthan Mohanathas
72f11bcb4b Bug 784739 - Switch from NULL to nullptr in toolkit/components/ (1/2); r=ehsan 2013-10-10 16:38:05 -04:00
Robert O'Callahan
03e7828db2 Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
--HG--
extra : rebase_source : 0787130b1814c74bfb38dc178de94022f0b2e64e
2013-09-02 20:41:57 +12:00