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

66 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini 50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Marco Bonardo ext:(%20%3Cmbonardo%40mozilla.com%3E) af77ddf71b Bug 1376202 - Release sharedDBMutex prior to post-auto-finalizing sqlite3_close(). r=asuth
MozReview-Commit-ID: 9aRqQPDfeD7

--HG--
extra : rebase_source : 6ff3a16cc530c630d2fd9733af419485d45fe80b
2017-06-29 15:59:02 -07: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
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
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
Wes Kocher c0e1236f1a Merge autoland to m-c a=merge
MozReview-Commit-ID: LFtpTAueYrF
2017-06-20 18:24:29 -07:00
Carsten "Tomcat" Book de892834ed Merge mozilla-central to mozilla-inbound 2017-06-20 11:31:34 +02:00
Doug Thayer d65c88d3f0 Bug 1166166 - Shrink storage cache off main thread r=mak
Per bug: it can take around 200ms to shrink memory for
Places.sqlite. This can end up janking the browser if we hit a
memory-pressure. This patch simply removes the #if DEBUG guards
around the mAsyncExecutionThreadIsAlive boolean which is already
being updated and exposes it so that we can shrink memory off
the main thread when possible.

MozReview-Commit-ID: LoDGKrOXs8u

--HG--
extra : rebase_source : adf03f187e7297835566f3bac92a8be8a6147131
2017-06-01 14:46:53 -07:00
Marco Bonardo 8d20cc6802 Bug 1355561 - Add a new API to spinningly close the database when strictly needed, and ensure Close() does what it's named after. r=asuth
Introduce a new SpinningSynchronousClose API that allows to synchronously close
a connection that executed asynchronous statements, by spinning the events loop.
This is expected to be used rarely in particular cases like database corruption.
It is currently [noscript] since the only consumer is cpp, in the future we can
evaluate removing that, if we find more uses for it.

MozReview-Commit-ID: 7SPqutoF9jJ

--HG--
extra : rebase_source : d053e308192f335dfdca089668e56115b068ff8c
2017-04-12 17:44:39 +02: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
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Marco Bonardo 1d88de7d2f Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth
Avoids a thread-safety race condition on shutdown where we could try to finalize a statement twice.
Allows the async thread to be referenced until ShutdownAsyncThread, so async finalizers can make use of it.
Removes the no more useful mAsyncExecutionThreadIsAlive.
Nullifies the sqlite3_mutex pointer when the connection is closed, since it would be a dangling pointer.
Use a ScopeExit to ensure the connection and the mutex pointers are always nullified on failure.
Makes asyncClose bailout early if a Close method was already invoked before.
Makes AsyncInitDatabase not use AsyncClose to just shutdown the async thread.
Fixes various unfinalized statements in consumers code.
Makes mConnectionClosed better follow mDBConn status.
Replaces some mutex locking isClosed() calls with lockless isConnectionReadyOnThisThread.

MozReview-Commit-ID: 6sftFehsQTt

--HG--
extra : rebase_source : 2bf3088b500376e58e62e8f078d9950588adc649
2017-06-16 17:43:23 +02:00
Tom Tromey 99f4608655 Bug 1334278 - change mozilla::Smprintf to return a UniquePtr; r=froydnj
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management.  (Though after this patch there are
still a handful of spots needing SmprintfFree.)

MozReview-Commit-ID: COa4nzIX5qa

--HG--
extra : rebase_source : ab4a11b4d2e758099bd0794d5c25d799a7e42680
2017-03-03 08:17:27 -07:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Tom Tromey 42eaec768d Bug 1060419 - make mozStorageConnection.cpp and mozStorageStatement.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: Gy2CLg9AVpG

--HG--
extra : rebase_source : 06f66468d0d11346efab403729a2f62c437c5206
2016-12-09 10:27:17 -10:00
Bill McCloskey ef3d0f1c2e Bug 1331804 - Add more runnable names (r=ehsan)
MozReview-Commit-ID: 1QBmqfgY6WI
2017-01-24 16:34:37 -08:00
Wes Kocher f7ccafcb58 Backed out 8 changesets (bug 1331804, bug 1332100) for windows vm debug dt5 failures a=backout
Backed out changeset 8bf7f0e27c6c (bug 1331804)
Backed out changeset 600c0b9026c2 (bug 1331804)
Backed out changeset 3a5b5b9ecace (bug 1331804)
Backed out changeset c76432c9954e (bug 1331804)
Backed out changeset 46a9096745e7 (bug 1332100)
Backed out changeset 8b751230fa23 (bug 1331804)
Backed out changeset 2810212347fd (bug 1331804)
Backed out changeset be72b7763910 (bug 1331804)

MozReview-Commit-ID: Ywdsr4GZ4a
2017-01-24 15:12:21 -08:00
Bill McCloskey 80aaeed2fc Bug 1331804 - Add more runnable names (r=ehsan)
MozReview-Commit-ID: 1QBmqfgY6WI
2017-01-24 10:04:55 -08:00
Markus Stange 9c6944dca7 Bug 1323100 - Use nsThreadPoolNaming::GetNextThreadName and NS_NewNamedThread for the mozStorage thread. r=froydnj
MozReview-Commit-ID: 145CjwiQawB

--HG--
extra : rebase_source : 81a22eb81ba02ae822e95b6def4b34e112e79abe
2016-12-20 14:20:15 +01:00
Andi-Bogdan Postelnicu 64312a6104 Bug 1318282 - Use C++11's override and remove virtual where applicable in storage/. r=mak
MozReview-Commit-ID: AXchuOpF65X

--HG--
extra : rebase_source : 47536d5918bdb66cd467a1c31ca6545817e922d3
2016-11-17 12:36:25 +02:00
Andi-Bogdan Postelnicu a71b3f4e14 Bug 1318282 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in storage/. r=mak
MozReview-Commit-ID: HuudUDUcQYu

--HG--
extra : rebase_source : 2b7591b118fea1e0a1b42ae929106191e2b2e1f6
2016-11-17 12:33:18 +02:00
Marco Bonardo a587089548 Bug 1313021 - Use a MEMORY SQLITE_TEMP_STORE on Android and 64bit builds. r=asuth
MozReview-Commit-ID: IeXOY3tTStq

--HG--
extra : rebase_source : a5457303a07751cc9d3c1861630636b15cce8a9f
2016-11-03 22:11:59 +01:00
Marco Bonardo 462eaac7b8 Bug 1313310 - Use SQLITE_OMIT_DEPRECATED. r=asuth
MozReview-Commit-ID: C4pZ6EP799G

--HG--
extra : rebase_source : 5d213471d4d6785abe5ac79a6696b47b6681cc6e
2016-11-03 20:14:03 +01:00
Marco Bonardo 792726a2c3 Bug 1310152 - AsyncClone may try to reuse a freed Critical Section in Sqlite. r=asuth
MozReview-Commit-ID: LW0esWlNfQQ

--HG--
extra : rebase_source : 59e2510a9d4c2343dcde91a572a3d354a15c162f
2016-11-03 15:31:31 +01:00
Gijs Kruitbosch ae4301ef96 Bug 1285041 - ignore locking when trying to read chrome DB file, r=mak
MozReview-Commit-ID: 89f0YCxxgC8

--HG--
extra : rebase_source : 53efa0f0258728df54fc17a773cbf74c712b51e4
2016-07-18 16:46:45 +01:00
Phil Ringnalda 7287d4600d Backed out changeset ef7939c0332e (bug 1285041) for failures in test_storage_connection.js
CLOSED TREE
2016-09-15 20:04:30 -07:00
Gijs Kruitbosch fff8403f8a Bug 1285041 - ignore locking when trying to read chrome DB file, r=mak
MozReview-Commit-ID: 89f0YCxxgC8

--HG--
extra : rebase_source : be3ee58b00b4c8ae6ec41db9459f50abdce816f6
2016-07-18 16:46:45 +01: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
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
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
Marco Bonardo 949197fdb7 Bug 1283083 - Cloning a connection should re-attach databases to the clone. r=asuth
MozReview-Commit-ID: CSZqvJNWthB

--HG--
extra : rebase_source : 9213a9e73052e7d87cf12c64af2ad1a15496ace1
2016-06-29 17:33:15 +02:00
Chris Peterson 6a5ea85fa5 Bug 1278468 - Fix -Wshadow warnings in storage/ directory. r=mak
storage/TelemetryVFS.cpp:81:44 [-Wshadow] declaration shadows a field of '(anonymous namespace)::IOThreadAutoTimer'
storage/VacuumManager.cpp:192:25 [-Wshadow] declaration shadows a local variable
storage/VacuumManager.cpp:248:13 [-Wshadow] declaration shadows a local variable
storage/VacuumManager.cpp:249:14 [-Wshadow] declaration shadows a local variable
storage/VacuumManager.cpp:251:19 [-Wshadow] declaration shadows a local variable
storage/mozStorageConnection.cpp:971:15 [-Wshadow] declaration shadows a local variable
storage/mozStorageStatement.cpp:449:19 [-Wshadow] declaration shadows a local variable
storage/variantToSQLiteT_impl.h:97:16 [-Wshadow] declaration shadows a local variable

--HG--
extra : rebase_source : 4e966f23ff352b6f8ea8e992278ab8a952c69e01
2016-06-07 22:08:41 -07:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07: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
Jan Varga 7bb929b877 Bug 1182987 - Part 2: Add getQuotaObjects() to mozIStorageConnection; r=mak 2016-03-15 07:00:28 +01:00
sajitk 823704b8d6 Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in various files.r=benjamin 2016-01-28 10:35:00 -08:00
Jonathan Watt ccf5c4c6dc Bug 1253094, part 7 - Stop using DebugOnly for class/struct members in storage/. r=mak
MozReview-Commit-ID: 72nH7FVfUtZ
2016-02-26 15:52:08 +00: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
Wes Kocher b9d77f5943 Backed out changeset 2c56aed63687 (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE
--HG--
extra : commitid : 7egFNnxx2ut
2016-01-29 10:15:38 -08:00
sajitk 6fdb9b782e Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in various files. r=bsmedberg
--HG--
extra : rebase_source : 37e8f53a8aa5242058ab8fc867804cbc8940653e
2016-01-28 10:35:00 -05:00
Andrew Sutherland debfaf45f7 Bug 1237601 - Perform storage close synchronously if async thread cannot be started. r=bkelly
Also factors asyncClose tests out into their own file.
2016-01-07 11:18:00 -05:00
Nicholas Nethercote 8eb10da71a Bug 1186791 (part 3) - Replace nsBaseHashtable::EnumerateRead() calls in storage/ with iterators. r=mak.
--HG--
extra : rebase_source : 8fc71420355baa87b63f6c9c817a27395272cb33
2015-10-29 16:43:34 -07:00
Nicholas Nethercote acb6e8f1f1 Bug 1186791 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in storage/ with iterators. r=mak.
--HG--
extra : rebase_source : defddc0f2e490b5b1b41fd71bebedfc8b31a35bb
2015-10-29 16:04:42 -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