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

473 Коммитов

Автор SHA1 Сообщение Дата
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Kris Maglione 5395a3712b Bug 1363482: Part 3 - Preload string bundles off-thread during startup. r=erahm
MozReview-Commit-ID: 3Fig5BS9xMz

--HG--
extra : rebase_source : 0eab403521cdb37c86a66f61c0cbcf291b699041
2017-08-31 17:23:08 -07:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Nicholas Nethercote d4e19d954a Bug 1388253 - Convert nsTextFormatter:[v]smprintf() use to [v]ssprintf(). r=erahm.
[v]ssprintf() is just a better way of doing things.

--HG--
extra : rebase_source : 25337787b9557f8a7080a67645dba70609a8f646
2017-08-09 10:41:14 +10:00
Kirk Steuber 260150bd23 Bug 1377377 - Preload string bundles during idle time r=smaug
MozReview-Commit-ID: H0hNHmzBWhO

--HG--
extra : rebase_source : dd83a3d97f5f1245ec4e18dde65b58d610fbfccc
2017-08-04 09:26:04 -07:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Boris Zbarsky d51238dc20 Bug 1380549. Remove unnecessary strdup in stringbundle code. r=glandium
We just have one allocator around now.
2017-07-17 23:21:31 -04:00
Nicholas Nethercote 72a757ac00 Bug 1381410 (part 5) - Reorder nsStringBundle. r=emk.
This patch moves the destructor after the constructor, puts the
NS_IMPL_ISUPPORTS line in a more sensible spot, and moves the Get*() functions
before the Format*() functions in order to match the order in
nsIStringBundle.idl.

--HG--
extra : rebase_source : 54250432bd084acd628ab1834bd344687a2f961d
2017-07-17 18:37:32 +10:00
Nicholas Nethercote 5ea6cc2798 Bug 1381410 (part 4) - Add missing monitor enter in nsStringBundle::Format*() functions. r=emk.
GetStringFromName() enters mReentrantMonitor(), and the other Get*() functions
go through GetStringFromName(). But none of the Format*() functions enter the
monitor.

This patch moves some repeated code from GetStringFromName() and
FormatStringFromName() into GetStringFromNameHelper(), including the monitor
entry. All the Get*() and Format*() functions now use
GetStringFromNameHelper(), which means they now all enter the monitor.

--HG--
extra : rebase_source : 5d4c1931fb374d7aa10d6851f5ad8c0c774ffa79
2017-07-17 18:36:16 +10:00
Nicholas Nethercote cd092e2d5d Bug 1381410 (part 3) - Simplify nsExtensibleStringBundle::GetStringFromID(). r=emk.
Similar to the previous patch, this patch changes GetStringFromID() to call
GetStringFromName(), but this time in nsExtensibleStringBundle.

--HG--
extra : rebase_source : 38b12f5f0010396b2606969fb0c7baef96debe21
2017-07-17 18:34:31 +10:00
Nicholas Nethercote e33bd03721 Bug 1381410 (part 2) - Remove nsStringBundle::GetStringFromIDHelper(). r=emk.
GetStringFromIDHelper() is very similar to GetSringFromNameHelper(). This patch
removes the former, and changes GetStringFromID() to call GetStringFromName(),
similar to how FormatStringFromID() calls FormatStringFromName().

--HG--
extra : rebase_source : ca1d6abffde106d5409b71c8c181fd604fc974ce
2017-07-17 18:32:57 +10:00
Nicholas Nethercote 59910cce0a Bug 1381410 (part 1) - Rename two protected methods in nsStringBundle. r=emk.
nsStringBundle has two public methods GetStringFrom{ID,Name}() and two
very similar helper methods with the same name. It's easy to get confused
between the two -- indeed, it may be the reason for the data race that this bug
is about -- so this patch renames the helper functions by adding a "Helper"
suffix.

--HG--
extra : rebase_source : 75a15e91c50c4b50b2984377980785b64fcf8852
2017-07-17 18:32:16 +10:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Zibi Braniecki c4783f92b9 Bug 1005640 - Flush StringBundle cache when app-locales change. r=valentin
StringBundle caches bundles, so when language chain changes we should
flush the cache to enable new strings to be loaded.
This also affects localized prefs like intl.accept_languages.

Then in HttpHandler we have to mark the value as dirty so that next
time it's called it actually recalculates using flushed string bundle
with the new locale.

MozReview-Commit-ID: DKWEDUli4yH

--HG--
extra : rebase_source : 75ecc4204deca066d7492d1494492a91685f36be
2017-04-18 01:03:05 -07:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Nicholas Nethercote 7983580fc4 Bug 1323904 - Remove the return value from nsStringBundleService::getStringBundle(). r=emk.
It's unused.

--HG--
extra : rebase_source : 29cd1956a3eaab769fae2b23203d7200661c9fc2
2016-12-16 13:31:22 +11:00
Sebastian Hengst b546cd8468 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: intl. r=RyanVM
MozReview-Commit-ID: 6jNipDaL7br

--HG--
extra : rebase_source : 9186ab26dfc74cb2c4dbb24e5cb7279d6a8b33c2
2016-11-05 11:29:19 +01:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -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
Christoph Kerschbaumer 5b7c3ec0ea Bug 1205153 - Use channel->Open2() in intl/strres/nsStringBundleTextOverride.cpp (r=sicking) 2015-09-15 19:49:55 -07:00
Christoph Kerschbaumer 20fdbb959b Bug 1197923 - Use channel->Open2() in intl/strres/nsStringBundle.cpp (r=sicking) 2015-09-02 11:37:16 -07:00
Nicholas Nethercote f44287005f 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.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Birunthan Mohanathas 7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Emanuel Hoogeveen 7d1e52f2ff Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Eugen Sawin bf7710b503 Bug 1158131 - Add local resource whitelisting for string bundle channels. r=snorp
---
 intl/strres/nsStringBundle.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

--HG--
extra : rebase_source : ffda1dbcbe46d0c0864b523d09785a4c2a61b6c9
2015-04-30 18:07:49 +02:00
David Major ebde6b9f4f Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium
--HG--
extra : rebase_source : 0c47c99bb8b92f8361a51fd81b20a2cc8647a986
2015-04-27 19:59:27 -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
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
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
Christoph Kerschbaumer 54b8e4e5e4 Bug 1110469 - Remove NS_OpenURI (r=sworkman) 2015-01-11 20:26:40 -08:00
Chris Peterson 22d0c4b343 Bug 1107814 - Part 1: Mark more directories as FAIL_ON_WARNINGS for all compilers. r=gps 2014-12-04 16:24:03 -08:00
Andrew Halberstadt d292ee73f1 Bug 1066735 - Remove root b2g and android specific xpcshell manifests, r=chmanchester 2014-10-07 18:18:28 -04:00
Birunthan Mohanathas 2018920696 Bug 1070709 - Collapse test-only moz.build files under intl/ into ancestor moz.build files. r=mshal 2014-09-26 07:20:23 +03:00
Christoph Kerschbaumer b297c5a069 Bug 1038756: Callsites creating a channel in /intl/ (r=smontagu) 2014-09-21 09:43:27 -07:00
Mike Hommey 5f6ba110e6 Bug 1043802 - Remove TOOLS_DIRS and TEST_TOOLS_DIRS. r=gps 2014-07-29 08:55:55 +09:00
Birunthan Mohanathas 46675362ed Bug 1038537 - Part 6: Flatten intl/strres/{public,src}/ directories. r=smontagu
--HG--
rename : intl/strres/public/nsIStringBundle.idl => intl/strres/nsIStringBundle.idl
rename : intl/strres/public/nsIStringBundleOverride.idl => intl/strres/nsIStringBundleOverride.idl
rename : intl/strres/src/nsStringBundle.cpp => intl/strres/nsStringBundle.cpp
rename : intl/strres/src/nsStringBundle.h => intl/strres/nsStringBundle.h
rename : intl/strres/src/nsStringBundleService.h => intl/strres/nsStringBundleService.h
rename : intl/strres/src/nsStringBundleTextOverride.cpp => intl/strres/nsStringBundleTextOverride.cpp
rename : intl/strres/src/nsStringBundleTextOverride.h => intl/strres/nsStringBundleTextOverride.h
2014-07-24 10:56:39 -07:00
Mike Hommey bc5d6801bb Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Andrew McCreight c1d7ee1d1a Bug 1034915 - Don't explicitly call delete on nsExtensibleStringBundle. r=ehsan 2014-07-08 13:46:24 -07:00
Benoit Jacob c08add5679 Bug 1028588 - Fix dangerous public destructors in intl/ - r=ehsan 2014-06-23 18:40:02 -04:00
Andrew McCreight 6b94f1bb01 Bug 971264 - Remove nsHashtable. r=bsmedberg 2014-05-15 09:52:57 -07: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
Anuj Agarwal 15252448a5 Bug 984125 - Convert nsStringBundleService::mBundleMap to nsDataHashtable. r=ehsan 2014-04-22 12:48:46 -07:00
Andrew McCreight a969ec0a42 Bug 997963, part 9 - Make bundleCacheEntry_t FINAL, have COUNT_CTOR. r=ehsan 2014-04-21 16:34:07 -07:00
Andrew McCreight e4e56b3a74 Bug 997963, part 8 - Fix typos in string bundle comment. r=ehsan 2014-04-21 09:41:57 -07:00