Commit Graph

854 Commits

Author SHA1 Message Date
Dave Townsend
6278f7672e Bug 1239354: Replace old-style generator function with star functions. r=asuth 2016-01-13 08:58:15 -08:00
Andrew Sutherland
6f74d9e031 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
Andrew Sutherland
5529ec75cf Bug 1237601 - Centralize storage xpcshell promise helpers (support patch). r=bkelly 2016-01-12 17:27:33 -05:00
Andrea Marchesini
2d7253a040 Bug 1231378 - part 4 - Fix uninitialized members of classes in netwerk/widget/storage/uriloader/memory/tools, r=smaug 2016-01-12 18:16:59 +00:00
Carsten "Tomcat" Book
8ce45e3221 Backed out changeset d6b0ffe1a7b3 (bug 1231378) 2016-01-12 15:48:54 +01:00
Andrea Marchesini
f98d215bd8 Bug 1231378 - part 4 - Fix uninitialized members of classes in netwerk/widget/storage/uriloader/memory/tools, r=smaug 2016-01-12 13:57:37 +00:00
Chris Peterson
35b2b12236 Bug 1235237 - Annotate intentional switch fallthrough to suppress -Wimplicit-fallthrough warning in storage/. r=mak
storage/mozStoragePrivateHelpers.cpp:234:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-11-22 22:09:23 -08:00
Nicholas Nethercote
84b71404df Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
Marco Bonardo
70d43a3693 Bug 1230549 - Storage should pass more eslint rules. r=yoric 2015-12-04 17:00:03 +01:00
Marco Bonardo
58dbae0e50 Bug 1230549 - Make Storage pass basic eslint. r=yoric 2015-12-04 15:52:43 +01:00
Nathan Froyd
1d9140f7f6 Bug 1225923 - part 1 - convert all needs-to-copy instances of AppendElement(nsDependentString(...)); r=erahm
When people write:

  array.AppendElement(nsDependentString(...));

(resp. nsDependentCString), it's not clear whether they expect the newly
constructed dependent string to live in the array, or whether they're
just making a nsString-like holder whose contents can be freely copied
into the array's newly-created nsString.  Sometimes the latter is what
you prefer, and sometimes the former.  In all cases, however, the latter
behavior is what you get.

Let's try to make that behavior more explicit by pre-constructing
nsString elements and then using Assign to show that copying is taking
place.  This patch involves no functional change in behavior (it ought
to be epsilon faster due to using AppendElements, rather than repeatedly
calling AppendElement).
2015-11-18 10:25:19 -05:00
Nicholas Nethercote
d9a57fbac7 Bug 1186791 (part 3) - Replace nsBaseHashtable::EnumerateRead() calls in storage/ with iterators. r=mak. 2015-10-29 16:43:34 -07:00
Nicholas Nethercote
82a0d5c8be Bug 1186791 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in storage/ with iterators. r=mak. 2015-10-29 16:04:42 -07:00
Nicholas Nethercote
edc9389b0f Bug 1186791 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in storage/ with iterators. r=mak. 2015-10-29 16:04:41 -07:00
Nathan Froyd
c3ee1ac2df Bug 1219238 - remove AutoArray from mozStorageSQLFunctions.cpp; r=mak
nsAutoTArray is practically the same thing; we should just use that and
avoid code duplications.
2015-10-27 21:22:52 -04:00
Tooru Fujisawa
8ed3f7bb89 Bug 1217982 - Remove for-each from storage/. r=mak 2015-10-19 03:53:14 +09:00
Nathan Froyd
e4e2da55c9 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
2015-10-18 01:24:48 -04:00
Eric Rahm
f944fa828d Bug 1194023 - Part 2: Only check for sort operations if mozStorage logging is enabled. r=mak 2015-09-25 16:33:22 -07:00
Eric Rahm
099a28260c Bug 1194023 - Part 1: Filter out warnings about sort operations on CREATE INDEX statements. r=mak 2015-09-25 15:27:48 -07:00
Tooru Fujisawa
7fbb71a90c Bug 1207499 - Part 9: Remove use of expression closure from storage/. r=mak 2015-09-23 18:42:19 +09:00
Jeff Walden
a33c1c9f14 Bug 1179003 - Convert the infallible objectClassIs proxy hook into a fallible getBuiltinClass hook that indicates class type via outparam. r=efaust, r=bz on DOM bits, r=billm on IPC bits 2015-08-28 21:55:40 -07:00
Andrew McCreight
2e4be7587d Bug 1201271 - Warn about unused results for more methods of nsTArray. r=froydnj
This leaves alone the AppendElement methods.
2015-09-15 15:30:44 -07:00
Shu-yu Guo
45211869c8 Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Nicholas Nethercote
69d088e45f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Chris Peterson
cd0fd3466a Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow warnings. r=glandium 2015-08-25 09:14:38 -07:00
Nathan Froyd
c9a9b22e7b Bug 1193022 - clean up reference-counting in storage/; r=mak 2015-07-01 13:11:11 -04:00
Marco Bonardo
69048d4b5f bug 1189896 - Do not preallocate Sqlite connections caches for now. r=asuth 2015-08-05 21:54:20 +02:00
Jan de Mooij
38d21aa34b Bug 1184564 part 2 - Use Value instead of jsval in dom/ and storage/. r=bz 2015-07-18 21:45:35 +02:00
Birunthan Mohanathas
47ed3a3675 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
Juan Gomez
01df2f691b Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Andrew McCreight
b1dd06af68 Bug 958641 - De-holder nsIXPConnect::WrapNative. r=gabor 2015-07-01 11:17:17 -07:00
Jan de Mooij
708e28e6b7 Bug 1177892 part 3 - Remove OBJECT_TO_JSVAL. r=evilpie 2015-06-30 21:09:46 -07:00
Jan de Mooij
c3dfaeab46 Bug 1177892 part 1 - Remove BOOLEAN_TO_JSVAL and STRING_TO_JSVAL. r=evilpie 2015-06-30 11:20:56 -07:00
Ryan VanderMeulen
9b6df02fe8 Backed out changesets ad58c270ce87 and 849151330d60 (bug 1177892) for B2G bustage.
CLOSED TREE
2015-06-30 15:48:11 -04:00
Jan de Mooij
ae8d5d837c Bug 1177892 part 1 - Remove BOOLEAN_TO_JSVAL and STRING_TO_JSVAL. r=evilpie 2015-06-30 11:20:56 -07:00
Jan Varga
1585104454 Bug 1130775 - Convert synchronized ops and storage registration into unified directory locks; r=bent 2015-06-30 14:59:27 +02:00
Jan de Mooij
c42999b66d Bug 1177825 - Remove JSVAL_* constants. r=evilpie 2015-06-29 18:36:44 -07:00
Ryan VanderMeulen
e6131fc8b8 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez
2128198065 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-06-24 14:11:00 -04:00
Ben Turner
d1ad3d2695 Bug 1149815 - Pass storage function failure codes through to callers, r=asuth. 2015-06-20 09:08:20 -07:00
Eric Rahm
9100016c49 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Eric Rahm
6d13987359 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-03 15:22:28 -07:00
Carsten "Tomcat" Book
9432818a46 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)
2015-06-02 13:05:56 +02:00
Eric Rahm
14740fdf18 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Eric Rahm
83ec610692 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 22:17:19 -07:00
Wes Kocher
fcc808d96c Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
579c7d8013 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00
Eric Rahm
a50b98baa8 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 14:31:00 -07:00
Birunthan Mohanathas
f7fa42cc65 Bug 968520 - Add mozilla::fallible to FallibleTArray::AppendElements calls. r=froydnj 2015-05-28 11:07:43 -07:00
Jason Orendorff
c686caa971 Bug 1140482 - Add JSPROP_RESOLVING. Give NativeDefineProperty standard behavior in cases where a non-resolving define needs to trigger a resolve hook. r=Waldo. 2015-05-01 14:03:17 -05:00