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

57 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner e72c3371d9 Bug 1479722 - Remove nsIAnnotationService::setPageAnnotation and removePageAnnotation. r=mak
Depends on D2582

Differential Revision: https://phabricator.services.mozilla.com/D2583

--HG--
extra : moz-landing-system : lando
2018-08-01 09:47:24 +00:00
Mark Banner 607107cbb6 Bug 1479764 - Remove nsIAnnotationObserver and annotation notifications. r=mak,lina
MozReview-Commit-ID: I9nNefvgch9

Differential Revision: https://phabricator.services.mozilla.com/D2565

--HG--
extra : moz-landing-system : lando
2018-07-31 21:34:42 +00:00
Mark Banner d406e4961d Bug 1479053 - Remove unused/unnecessary methods from nsIAnnotationService. r=mak
MozReview-Commit-ID: I9qq71RLXYH

Depends on D2473

Differential Revision: https://phabricator.services.mozilla.com/D2474

--HG--
extra : moz-landing-system : lando
2018-07-31 11:40:55 +00:00
Mark Banner 3285ea59f0 Bug 1479053 - Remove nsIAnnotationObserver::onPageAnnotationSet/Removed. r=mak
MozReview-Commit-ID: JkUhtuV1fvU

Differential Revision: https://phabricator.services.mozilla.com/D2473

--HG--
extra : moz-landing-system : lando
2018-07-31 11:40:52 +00:00
Marco Bonardo 76a39716f5 Bug 1475558 - Remove annotations expiration policies to speed up expiration and removals. r=Standard8
Remove expiration policies from annotations, keeping only EXPIRE_NEVER. Remove all the code handling expiration of those. Fix tests to pass proper arguments.

Differential Revision: https://phabricator.services.mozilla.com/D2128

--HG--
extra : moz-landing-system : lando
2018-07-25 16:40:30 +00:00
Mark Banner 404a37b5c0 Bug 1475245 - Remove some unused/test-only functions on nsIAnnotationService. r=mak
MozReview-Commit-ID: LIIvA0eCpDI

Differential Revision: https://phabricator.services.mozilla.com/D2098

--HG--
extra : moz-landing-system : lando
2018-07-12 14:48:17 +00:00
Mark Banner d9cffeba70 Bug 1450223 - Remove unnecessary synchronous annotation lookups from the places context menu. r=mak
MozReview-Commit-ID: Ck2eaeVAjXs

--HG--
extra : rebase_source : 8de9f419570773d922a6d73c6f44069ffe403376
2018-03-29 15:49:39 +01:00
Mark Banner fdf9eb269a Bug 1047819 - Remove unused nsIAnnotationService::copyPageAnnotations/copyItemAnnotations. r=mak
MozReview-Commit-ID: nIsuDReLoZ

--HG--
extra : rebase_source : dc07376a459dabb6e69d06f1332c68ded96e67a6
2018-03-29 10:24:39 +01:00
Mark Banner a7f15108e0 Bug 1047819 - Add an extra parameter to nsIAnnotationService.getItemAnnotationInfo to avoid an extra sync database lookup in PlacesUtils.getAnnotationsForItem. r=mak
MozReview-Commit-ID: FXncB1TRFXw

--HG--
extra : rebase_source : 331ffd3e45f23ef7e375a3e496716dfb1cfd14c0
2018-03-28 21:05:27 +01:00
Kit Cambridge f50dcb6368 Bug 1417101 - Remove the annotation observer from the bookmarks service. r=mak
Since `SetItemAnnotation` already queries `moz_bookmarks`, we can fetch
and pass the changed bookmark's info directly to
`nsNavBookmarks::NotifyItemChanged`, without going through the anno
observer.

This patch refactors the internal `Set*` methods to receive an optional
`BookmarkData` for item annotation changes, and fire `OnItemChanged`
notifications after notifying anno observers. `NotifyItemChanged` also
updates the bookmark's last modified time if requested.

MozReview-Commit-ID: Hz5qiOmAjsD

--HG--
extra : rebase_source : a3bd929290e64c91ba2d2acb01e4e55b1e07181b
2017-11-16 16:49:03 -08:00
Noemi Erli 40495fde1b Backed out changeset e0eab399db59 (bug 1417101) for Static errors in toolkit/components/places/target r=backout on a CLOSED TREE 2017-11-18 02:48:42 +02:00
Kit Cambridge 870acfd373 Bug 1417101 - Remove the annotation observer from the bookmarks service. r=mak
Since `SetItemAnnotation` already queries `moz_bookmarks`, we can fetch
and pass the changed bookmark's info directly to
`nsNavBookmarks::NotifyItemChanged`, without going through the anno
observer.

This patch refactors the internal `Set*` methods to pass an optional
`BookmarkData` from `SetItemAnnotation`, and fire `OnItemChanged`
notifications after notifying anno observers. `NotifyItemChanged` also
updates the bookmark's last modified time if requested.

MozReview-Commit-ID: Hz5qiOmAjsD

--HG--
extra : rebase_source : 37170f4661341e3a401f8210ceec84cbf439b4b2
2017-11-16 16:49:03 -08:00
Mark Banner 1a2f65447b Bug 1405317 - When inserting trees of bookmarks, avoid updating the last modified date when marking annotations. r=mak
MozReview-Commit-ID: Ik8DKwtiXoM

--HG--
extra : rebase_source : 4e6f0b5b1778cd8b9355a35908baccd850d7c5ca
2017-10-03 21:18:10 +01: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
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Kit Cambridge 319e736ab8 Bug 1314084 - Implement `nsIAnnotationService::getObservers`. r=mak
MozReview-Commit-ID: 42y8d1fbfJO

--HG--
extra : rebase_source : 8c7514cfa5d6747312d8882efdbb7083fb55d9a6
2016-10-31 11:13:14 -07: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
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
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 2b1ae6e2ca Bug 1153267 - part 1 - use smart-pointer .forget() instead of NS_ADDREF+assign; r=ehsan 2015-03-31 10:03:49 -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
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
Benoit Jacob 210693da34 Bug 1028588 - Fix dangerous public destructors in toolkit/ - r=ehsan 2014-06-23 18:40:02 -04:00
Victor Porof 9ce7e9c089 Bug 1007203 - Always add categories when pushing to the pseudostack, r=djvj 2014-05-23 17:12:29 -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
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -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 PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Birunthan Mohanathas 3440613a39 Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo
--HG--
rename : mfbt/Util.h => mfbt/ArrayUtils.h
2013-12-08 21:52:54 -05:00
Asaf Romano f089a143e9 Bug 895839 - Remove support for binary annotations. r=mak. sr=gavin. 2013-08-03 14:06:47 +03:00
Benoit Girard 042e2c83ad Bug 851611 - Part 3: Rename headers. r=jrmuizel
--HG--
rename : tools/profiler/sampler.h => tools/profiler/GeckoProfiler.h
rename : tools/profiler/sps_sampler.h => tools/profiler/GeckoProfilerImpl.h
extra : rebase_source : 6ea7c660764a4390cdd8dd91561fff1d7bad6035
2013-03-18 15:25:50 +01:00
Benoit Girard c47f308258 Bug 851611 - Part 2: Update profiler calls. r=jrmuizel
--HG--
extra : rebase_source : f76accc3d3dd86c75cb3e9750734f23ec9c29941
2013-03-16 00:47:02 -04:00
Ed Morley ab0833645c Backed out changeset c75481a07302 (bug 851611) 2013-03-18 14:10:35 +00:00
Ed Morley 3091d3e2b6 Backed out changeset d195190adc48 (bug 851611)
--HG--
rename : tools/profiler/GeckoProfiler.h => tools/profiler/sampler.h
rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/sps_sampler.h
2013-03-18 14:10:30 +00:00
Benoit Girard b03f14270d Bug 851611 - Part 3: Rename headers. r=jrmuizel
--HG--
rename : tools/profiler/sampler.h => tools/profiler/GeckoProfiler.h
rename : tools/profiler/sps_sampler.h => tools/profiler/GeckoProfilerImpl.h
extra : rebase_source : 552fe1d3ff61d15b264aaf86f7c8cb4f4eff69d1
2013-03-18 14:41:02 +01:00
Benoit Girard 919018414b Bug 851611 - Part 2: Update profiler calls. r=jrmuizel
--HG--
extra : rebase_source : 3032aaf7e50cdf9c350da688ec34e50a695fc7ca
2013-03-16 00:47:02 -04:00
Marco Bonardo 7235347b03 Bug 838349 - Fix bogus use of assertions in Places
r=trivial
2013-02-06 02:37:07 +01:00
Ehsan Akhgari 565d0479c3 Bug 817477 - Remove support for global private browsing mode; r=jdm,glandium
--HG--
rename : browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js.in => browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js
rename : browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js.in => browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js
2013-01-29 13:12:13 -05:00
Marco Bonardo 17cc116f68 Bug 822710 (part 1) - Implement a new getAnnotationsHavingName method.
r=Mano sr=gavin
2012-12-21 15:19:04 +01:00
Josh Matthews f07cac3737 Bug 723005 - Remove all checks for global privacy status in history-related code, and add them to callers when appropriate. r=mak sr=gavin 2012-02-18 01:40:10 -05:00
Randell Jesup 65539ef89c Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Marco Bonardo bfe5d70ad6 Bug 706420 - intermittent failure in test_annos_expire_session.js
r=dietrich
2012-02-17 14:24:54 +01:00
Jeff Muizelaar 19d31dec25 Bug 718440. Add more sampler labels to various places. r=bgirard
This shows the problems described in bug 710068.
2012-01-17 15:33:04 -05:00
Matt Brubeck 3aa150e837 Back out 88733ce1bef3 (bug 718440) because of Windows build failure 2012-01-17 15:15:47 -08:00
Jeff Muizelaar e18b95dabf Bug 718440. Add more sampler labels to various places. r=bgirard
This shows the problems described in bug 710068.
2012-01-17 15:33:04 -05:00
Marco Bonardo 431a4249db Bug 696900 - Avoid any shutdown work in Places when possible.
r=dietrich
2011-10-27 11:11:47 +02:00