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

1429 Коммитов

Автор SHA1 Сообщение Дата
Eric Rahm 6058ba50a3 Bug 1423798 - Remove headers included for backwards compat in nsString.h. r=njn on a CLOSED TREE
Remove the headers included for "backwards compatibility" and just include them
where required.

--HG--
extra : source : e2beba7e6875120ebbbcadf24bcbcb5b86411a94
extra : amend_source : 11f07a27431cd468511f0bd45afe36150c6e342c
2017-12-06 19:36:57 -08:00
Csoregi Natalia f488657fbd Backed out changeset e2beba7e6875 (bug 1423798) for failing Browser Chrome tests browser_temporary_permissions_expiry.js on Windows 7 debug. r=backout on a CLOSED TREE 2017-12-09 07:23:35 +02:00
Gurzau Raul 0fcc1a37e6 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-12-09 00:57:59 +02:00
Eric Rahm 74880b3483 Bug 1423798 - Remove headers included for backwards compat in nsString.h. r=njn
Remove the headers included for "backwards compatibility" and just include them
where required.

--HG--
extra : rebase_source : 03e703a81ed4b80f4f116ff36d8787464ce5acba
2017-12-06 19:36:57 -08:00
Eric Rahm 922fd574f8 Bug 1423781 - Remove nsVoidableString. r=njn
--HG--
extra : rebase_source : 25d33d7d8096cb888767d00dcda821275e9906db
2017-12-06 17:33:23 -08:00
Eric Rahm 07c97a5afe Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.

--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
2017-12-06 16:52:51 -08:00
Sylvestre Ledru 5de63ef061 Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 5orfnoude7h

--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Paul Bone 572d5164f3 Bug 1410276 - Add a canary field to nsStringBuffer r=bz
This version of the patch hopefully causes fewer performance regressions.
It might be good to apply this and catch some more assertions.

--HG--
extra : rebase_source : b8674308d581bed4baf6f64a9dd23f2cf995028b
2017-11-09 15:17:35 +11:00
Sebastian Hengst 6ad3193382 Backout a3785ec9a48c / bug 1410276 on request from pbone - Add a canary field to nsStringBuffer. r=backout 2017-11-08 01:45:38 +02:00
Chris Peterson 4a8bdd4ca5 Bug 1412048 - Replace some NS_RUNTIMEABORT(var) calls with MOZ_CRASH_UNSAFE_PRINTF. r=froydnj data-review=francois
MOZ_CRASH_UNSAFE_PRINTF causes data collection because crash strings are annotated to crash-stats and are publicly visible. Firefox data stewards must do data review on usages of this macro. However, all the crash strings this patch collects with MOZ_CRASH_UNSAFE_PRINTF are already collected with NS_RUNTIMEABORT.

MozReview-Commit-ID: 5ujXa9MHH5Z

--HG--
extra : rebase_source : 1367e6ac3c6085341e36cb0859d91417245ea472
extra : source : 3edeb64a40afd79d5c01ae0f0d3ab2777a2e744b
2017-10-26 00:49:00 -07:00
Andrew McCreight 989d6728ca Bug 1412119 - Re-fix mode lines in xpcom. r=erahm 2017-10-26 14:39:00 -04:00
Paul Bone 72289df407 Bug 1410276 - Add a canary field to nsStringBuffer. r=bz 2017-10-25 23:21:47 +11:00
Sylvestre Ledru ae9444af4d Bug 1411034 - Remove the const to fix the -Wignored-qualifiers warning r=erahm
MozReview-Commit-ID: 8AvGwUQsdE8

--HG--
extra : rebase_source : 25b61a81b83ff3fa65ab15a23af92a56e3a6be12
2017-10-23 22:42:35 +02:00
Eric Rahm e0bdf23b2e Bug 1403083 - Part 1: Properly disable string functions for invalid char types. r=froydnj
In order to properly disable template functions with `std::enable_if` we need
to use the resulting type. This only works if we use a dependent type in the
template params, hence the need to shadow the `T` param.

Proper usage is now of the form:

template<typename Q = T, typename EnableIfChar = CharOnlyT<Q>>
Foo();

--HG--
extra : rebase_source : da7855403d9e683d06d3858e26805e9d8e338208
2017-10-03 12:44:44 -07:00
Ryan VanderMeulen cb612851ed Merge inbound to m-c. a=merge 2017-10-18 21:01:34 -04:00
Andrew McCreight 70333838d1 Bug 1403959, part 3 - Manually fix some xpcom/ eslint failures and enable it. r=froydnj
Renames are because another location also defined that
variable. Unused definitions are eliminated.

The .eslintrc.js file makes eslint expect XPCShell global variables.

MozReview-Commit-ID: Fafm5o45bme

--HG--
extra : rebase_source : ab71132a60e90bd30f34766bd828b18dd608f8b3
2017-09-28 16:12:52 -07:00
Andrew McCreight 4ae455cdc5 Bug 1403959, part 2 - Automatically generated eslint fixes. r=froydnj
These were generated with |./mach eslint --fix xpcom| with the
.eslintignore and xpcom/tests/unit/.eslintrc.js changes from the next
patch.

MozReview-Commit-ID: 8pKkICSK3JQ

--HG--
extra : rebase_source : bbc98050928f27160d8ca63d38aa0c383be95878
2017-09-28 15:49:04 -07:00
Nika Layzell 2e20b0d128 Bug 1377351 - Part 5: Add a workaround for gcc 4.9 compiler bug, r=froydnj
MozReview-Commit-ID: CHywpZ4fvXf
2017-10-18 13:00:22 -04:00
Nika Layzell 4146e6b110 Bug 1377351 - Part 3: Expose nsA[C]String::Assign(nsA[C]String&&) overload as take_from to rust, r=froydnj
MozReview-Commit-ID: 4YNPi3iRo78
2017-10-18 13:00:15 -04:00
Nika Layzell 2ff829eabc Bug 1377351 - Part 2: Add move overloads to nsA[C]String assignment and constructors, r=froydnj
MozReview-Commit-ID: 81U51pgshZI
2017-10-18 13:00:12 -04:00
Nika Layzell 1fe9edd088 Bug 1377351 - Part 1: Add move overload to nsA[C]String::Assign, r=froydnj
MozReview-Commit-ID: 5bloaYcvpgr
2017-10-18 13:00:09 -04:00
Nicholas Nethercote 9e0714dd26 Bug 1403506 - Remove nsTFixedString<T>. r=erahm.
(patch is actually r=erahm,mystor)

nsTFixedString<T> is only used as a base class for nsTAutoStringN<T, N>, so
this patch merges the former into the latter, cutting some code and simplifying
the string class hierarchy.

Because the "Fixed" name is now gone, the patch also renames
StringDataFlags::FIXED as INLINE and ClassDataFlags::FIXED as INLINE.

The patch also removes nsFixed[C]String and ns_auto_[c]string! from Rust code
because nsAutoString can't be implemented directly in Rust due to its move
semantics. There were only two uses of ns_auto_string! outside of tests so this
seems like a minor loss.

MozReview-Commit-ID: 8ntximghiut

--HG--
extra : rebase_source : f36edbae0553adcfee356fb8b311097ff7424786
2017-09-27 20:19:33 +10:00
Tom Ritter a24cf9bf2e Bug 1402328 Use a Dummy template parameter to avoid fully specializing structs inside of template classes r=froydnj
Full specialization is allowed in MSVC, but not in gcc.

MozReview-Commit-ID: 9QI6YWc5Rvr

--HG--
extra : rebase_source : 7387899a6d76832afbe15e088b80a82adee59ca3
2017-09-22 10:26:26 -05:00
Nicholas Nethercote e3c9cbb969 Bug 1401813 - Rename Null[C]String() as Void[C]String(). r=erahm.
XPCOM's string API doesn't have the notion of a "null string". But it does have
the notion of a "void string" (or "voided string"), and that's what these
functions are returning. So the names should reflect that.

--HG--
extra : rebase_source : 4e3f982e0873877174a08a25413595ff66f7d20e
2017-09-22 14:35:46 +10:00
Tom Tromey f993bb28d0 Bug 1401821 - nsTextFormatter "*" width argument comes before the actual argument; r=froydnj
Bug 1388789 introduced a bug breaking formats like "%*.f".  The problem
was that the next "natural" argument was taken before the "*" width
argument.

MozReview-Commit-ID: BZack9faY7a

--HG--
extra : rebase_source : a14485914ef9e29e38f29be6c1df1372ce5e722f
2017-09-21 09:43:28 -06:00
Tom Tromey 971dbd3853 Bug 1388789 - clean up \0 emission in nsTextFormatter; r=froydnj
nsTextFormatter unconditionally emitted a trailing \0, leading some code
elsewhere to have to work around this.  This changes the code to only
emit it in snprintf.

MozReview-Commit-ID: G3CBpAPp9Tn

--HG--
extra : rebase_source : 36666476a4f796e2553c9fa31daa54d245ae3b5f
2017-09-06 09:38:58 -06:00
Tom Tromey 2165753f7b Bug 1388789 - normalize null string handling in nsTextFormatter; r=froydnj
The char* and char16_t* cases handled null strings differently;
normalize them to both emit "(null)".

MozReview-Commit-ID: IzRkc3pSSjl

--HG--
extra : rebase_source : f43a1a852a2c8aa3d6607c7202f7cd42fdd5740a
2017-09-06 08:38:44 -06:00
Tom Tromey f2a652249e Bug 1388789 - make nsTextFormatter runtime type-safe; r=froydnj
Change nsTextFormatter functions to template functions, box their
arguments, and then make the formatter mostly impervious to type
mismatches.  Most formatting is done according to the type of the actual
argument.

MozReview-Commit-ID: H8WmyxFCb7s

--HG--
extra : rebase_source : ad98ad6243825f1a892fc6a641d155e239b12a6b
2017-09-01 14:03:56 -06:00
Tom Tromey 0d7e17591f Bug 1388789 - change return values of nsTextFormatter::vs{s,v}printf; r=froydnj
nsTextFormatter::vsnprintf is defined to return uint32_t(-1) on error.
However, it was not doing this.

nsTextFormatter::vssprintf is defined as infallible; enforce this by
having it return void.

MozReview-Commit-ID: LdOhIHzRvAT

--HG--
extra : rebase_source : 7164eb47a89ecebfa50d40684eea1325de0172ba
2017-09-05 13:17:49 -06:00
Tom Tromey 586209d1a8 Bug 1388789 - handle unrecognized escapes in nsTextFormatter; r=froydnj
nsTextFormatter tried to pass unrecognized escapes in the format string
through to the output.  However, if the format held a width or
precision, that text was not output.  It seems better to me to try to
preserve the format text as-is.

MozReview-Commit-ID: HoBykpfzK7C

--HG--
extra : rebase_source : 9b071db3800e3e75cabb4995a920818dfb35b03d
2017-09-01 08:31:49 -06:00
Tom Tromey f6829c2b79 Bug 1388789 - replace hex strings with static arrays; r=froydnj
nsTextFormatter used nsAutoString for arrays of hex digits; but this
didn't seem to provide any benefit.

MozReview-Commit-ID: EYHtnAzJL8h

--HG--
extra : rebase_source : 6906075f06478b7c10229201de46e36d08d1f7f8
2017-09-01 06:25:11 -06:00
Tom Tromey 28f29da69d Bug 1388789 - remove prio.h include from nsTextFormatter.h; r=froydnj
This header is not needed here.

MozReview-Commit-ID: 1msozRXsHXR

--HG--
extra : rebase_source : 93e624fb5dd938cee6019fd30991b210e21f0aae
2017-08-31 15:22:36 -06:00
Tom Tromey fc652f4718 Bug 1388789 - make va_list nsTextFormatter private; r=froydnj
The runtime type-checking rewrite of nsTextFormatter will not support
va_list uses.  So, make these functions private and fix the sole user.

MozReview-Commit-ID: IBWALVzIcHC

--HG--
extra : rebase_source : a822697c81c1a054359fc2ecd894d51f95686548
2017-08-31 15:21:37 -06:00
Nathan Froyd cc6fc72d00 Bug 1399315 - declare explicit instantiations of Compare as NS_FASTCALL; r=erahm
The template declaration and definition of Compare use NS_FASTCALL,
while the explicit instantiation of Compare does not, which produces
complaints from newer compilers.  Add NS_FASTCALL to the explicit
instantiation so that things match up.
2017-09-13 17:42:44 -04:00
Chris Pearce 42abbda386 Bug 1399309 - Make nsTSubstring.cpp include MathAlgorithms.h. r=froydnj
nsTSubstring.cpp is calling RoundUpPow2 which is defined in MathAlgorithms.h.

Without this, we get a build failure in non-unified builds.


MozReview-Commit-ID: Dz7VIZk4dLw

--HG--
extra : rebase_source : 7795784894bfca6e921d38cedaa4f543317c2165
2017-09-13 13:50:05 +12:00
Xidorn Quan e5dc8373fe Bug 1397942 - Disable C5037 in xpcom/string to workaround MSVC bug. r=froydnj
MozReview-Commit-ID: Gzx3gtt9eIF

--HG--
extra : rebase_source : 9d7ae1592ece8444265926e78630005d8776c57e
2017-09-08 15:08:39 +10:00
Eric Rahm 030b39d813 Bug 1393230 - Part 3: Convert the xpcom string classes to be templated on char type. r=njn, r=fitzgen, r=sfink
This removes the double-include macro hackery that we use to define two
separate string types (nsAString and nsACString) in favor of a templated
solution.

Annotations for Valgrind and the JS hazard analysis are updated as well as
the rust binding generations for string code.

--HG--
extra : rebase_source : 63ab2c4620cfcd4b764d42d654c82f30f984d016
extra : source : 9115364cd4aa078c49bba7911069f8178e55166f
2017-08-14 14:22:50 -07:00
Henri Sivonen d2b0cdbc9c Bug 1395527 part 2 - Delegate IsASCII and IsUTF8 to encoding_rs. r=froydnj
MozReview-Commit-ID: 49AGBPjW4Ca

--HG--
extra : rebase_source : 78dc1b549c97e5e4fb0dc625acdab23806b3e941
2017-09-01 11:53:31 +03:00
Sebastian Hengst e03f524d85 Backed out changeset d59b62713c66 (bug 1395527) 2017-09-02 10:38:20 +02:00
Henri Sivonen 3c7fa0536e Bug 1395527 part 2 - Delegate IsASCII and IsUTF8 to encoding_rs. r=froydnj
MozReview-Commit-ID: 49AGBPjW4Ca

--HG--
extra : rebase_source : fb20025e98f97210c58c3cf9767eae06ad92349b
2017-09-01 11:53:31 +03:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Nicholas Nethercote 6f90531fbd Bug 1390428 (part 8) - Remove nsXPIDLCString use in NullCString(). r=erahm.
This change makes NullCString() work the same way as NullString().

--HG--
extra : rebase_source : 3835cd75f1cf95c9d0884cb9a73250123129dd07
2017-08-17 14:25:23 +10:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Nicholas Nethercote dc5e4a62cf Bug 1386103 (part 2, attempt 3) - Convert nsFixed[C]String uses to nsAuto[C]String. r=erahm. 2017-08-09 20:41:40 +10:00
Nicholas Nethercote 65b902e3ea Bug 1386103 (part 1, attempt 3) - Specify nsAuto[C]String storage size via template parameter. r=dbaron. 2017-08-09 20:41:38 +10:00
Nicholas Nethercote 4d15e13fc4 Bug 1390036 (part 3) - Remove nsXPIDLString. r=erahm.
--HG--
extra : rebase_source : 87094fef8b919094926ec1be26867985a7fe8708
2017-08-14 15:25:04 +10:00
Nicholas Nethercote 64c9cd5e75 Bug 1390036 (part 2) - Remove nsXPIDLString use from NullString(). r=dbaron.
This requires adding a new constructor for ns[C]String that can be used to
create an IsVoid string.

--HG--
extra : rebase_source : 8cb078bd0a41e63af0d9d144b9eef369875a05e0
2017-08-14 14:46:53 +10:00
Phil Ringnalda 858a553b02 Backed out 2 changesets (bug 1386103) for Android x86 build bustage
Backed out changeset eec506d87d03 (bug 1386103)
Backed out changeset 3f9ec011c9bd (bug 1386103)

MozReview-Commit-ID: 8ak71R7vUOC
2017-08-08 22:08:54 -07:00
Nicholas Nethercote 7512aa2dea Bug 1386103 (part 2) - Convert nsFixed[C]String uses to nsAuto[C]String. r=erahm.
In all of these cases the fixed buffer has the same lifetime as the string
object, so we can use nsAuto[C]String for simplicity.

For the 128-length ones in dom/xul/ I just switched to the default of 64 for
simplicity, because the choice of 128 didn't seem that important. (These code
paths weren't hit when I started the browser and opened a few sites.)

Finally, the patch also changes LoggingIdString to use
nsAutoCStringN<NSID_LENGTH>, similar to NullPrincipalURI.
2017-08-01 11:58:56 +10:00
Nicholas Nethercote e9daf4d245 Bug 1386103 (part 1) - Specify nsAuto[C]String storage size via template parameter. r=dbaron.
This patch parameterizes nsAuto[C]String, renames them as nsAuto[C]StringN, and
redefines nsAuto[C]String as typedefs for nsAuto[C]StringN<64>.

(The alternative would be to templatize nsAuto[C]String and use a default
parameter, but that would require writing "nsAuto[C]String<>" everywhere.)
2017-08-01 11:58:45 +10:00
Nicholas Nethercote 3b50454376 Bug 1388253 - Remove nsTextFormatter:[v]smprintf(). r=erahm.
--HG--
extra : rebase_source : 27f080dda37d107f64eb8f341c6ebb20b874471b
2017-08-09 10:41:21 +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
Tristan Bourvon 3bd6c5f20a Bug 1374024 - add static-analysis annotation for class functions that return dangling pointers. r=mystor
MozReview-Commit-ID: 44Ltj5FZAZD
2017-07-13 12:00:06 +02:00
Nicholas Nethercote 3ab0f8b30f Bug 1384834 (part 4) - Improve comments for Adopt() and getter_Copies(). r=erahm.
--HG--
extra : rebase_source : a7bb27bbdade092bd087a014d31d9c6d019e1d72
2017-08-01 06:06:36 +10:00
Nicholas Nethercote e5d1c73749 Bug 1384834 (part 3) - Remove nsAdopting[C]String. r=erahm.
--HG--
extra : rebase_source : a87c357fb0166620a33a40e1a01af32d5e7a907d
2017-07-28 11:21:49 +10:00
Julian Seward 408d24da56 Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.

--HG--
extra : rebase_source : fb47bf450771c3c9ee3341dd14520f5da69ec4f5
2017-07-24 19:23:52 +02:00
Nicholas Nethercote d97f8b05ed Bug 1381726 - Remove nsTextFormatter::smprintf_free(). r=erahm.
We can just use free() instead.

--HG--
extra : rebase_source : d1fa65550f22d0531ec4cc3b173fb2de36dee6e6
2017-07-25 09:09:27 +10:00
L. David Baron 97a8a3c332 Bug 1381080 patch 7 - Mark nsLiteral[C]String constructor as constexpr. r=erahm
MozReview-Commit-ID: 5ASqQAGBqq

--HG--
extra : transplant_source : y%CB%BE%82%E7%E0%C9%2C%DE%26%1A%86%C8%17_%1E%A6E%9C%7B
2017-07-20 15:47:00 -07:00
L. David Baron 6a5b0be9fc Bug 1381080 patch 4 - Assert that strings whose static type requires a null-terminated buffer aren't assign a non-null-terminated buffer. r=erahm
I actually couldn't figure out a way to trigger this assertion with the
current string code without doing invalid casts, but there are things we
may want to add to the string code in the future that might risk hitting
this (e.g., move constructors, promoting various rebind methods to
nsA[C]String), so I think it's worth asserting.

MozReview-Commit-ID: 4R0dYuTfrFW

--HG--
extra : transplant_source : %B6%87I%0E%7F%21%CC2%19%CD%A7%E6TRA%9D%AEO%90%D7
2017-07-20 15:46:59 -07:00
L. David Baron cb0e6b4512 Bug 1381080 patch 3 - Encapsulate setting mData/mLength/mDataFlags in a new method. r=erahm
This is needed for patch 4.

MozReview-Commit-ID: 4BFlTtQdtoN

--HG--
extra : transplant_source : %7C%F7%FDN%E5%7Df%0C%7D%10%EF%C0%25%B9%D6%18%1E%93%BE%A0
2017-07-20 15:46:59 -07:00
L. David Baron 7c15789222 Bug 1381080 patch 2 - Encapsulate setting to empty buffer in a new method. r=erahm
This is needed for patch 4.

MozReview-Commit-ID: 7xKQv37cy5k

--HG--
extra : transplant_source : %ED%16%85q%7F%E7%117%29%D2c%C2%21%20%D7%C9%BA%CCC%CC
2017-07-20 15:46:59 -07:00
L. David Baron eb59a21402 Bug 1381080 patch 1 - Add ClassFlags::NULL_TERMINATED to strings that require null-termination. r=erahm
This is needed for patch 4.

MozReview-Commit-ID: 5ikQFIL9O0i

--HG--
extra : transplant_source : %88%80%E3%04%11%7E%7F%A4%7E%15%1B%1A%84%E2%13%3E%F6%E8%2A%1C
2017-07-20 15:46:58 -07:00
Carsten "Tomcat" Book f193d6bbd3 Backed out changeset a5c0a74876ae (bug 1376323) for causing bug 1379578 2017-07-13 16:24:26 +02:00
Carsten "Tomcat" Book 95745c2ae6 Backed out changeset ced6c13e61e9 (bug 1376472) 2017-07-13 16:23:54 +02:00
L. David Baron 57e3e8641f Bug 1343715 - Remove nsA[C]String::SetDataFlags. r=dmajor
MozReview-Commit-ID: EDQbH9pZKtZ

--HG--
extra : transplant_source : %FA%16%DC%A2C%DAM%F8%AC9%B6%F3d%DF%9E%5B%80%99%7E%B3
2017-07-10 12:23:11 -07:00
L. David Baron c59666d841 Bug 1343715 - Split nsTSubstring::mFlags into separate variables for class and data flags. r=dmajor
MozReview-Commit-ID: JW1p5BxpHKA

--HG--
extra : transplant_source : %20e%CF%FA%60%A2%1Bn%1A%C6%A2%DBAy%3C%E0b%0C%077
2017-07-10 12:23:10 -07:00
L. David Baron 539cb0d5a7 Bug 1343715 - Use SetDataFlags in ForgetSharedBuffer. r=dmajor
I believe this should fix some incorrect clearing of F_CLASS_FIXED.

MozReview-Commit-ID: 4ga2NEM9M5Z

--HG--
extra : transplant_source : %ECF%CF%D0%F6%19%9F%24%86%EFR%CAVZ%ED%60%D5nU%D8
2017-07-10 12:23:10 -07: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
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Ehsan Akhgari 8e07c31301 Bug 1376472 - Annotate likely branches in nsTSubstring_CharT::StripTaggedASCII(); r=froydnj 2017-06-27 18:18:31 -04:00
Ehsan Akhgari cb111ebec5 Bug 1376323 - Unroll the loop in nsTSubstring_CharT::StripTaggedASCII() in order to speed up StripCRLF(); r=froydnj 2017-06-27 01:56:57 -04:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Nicholas Nethercote 1572f96f5d Bug 1374580 (part 1) - Remove nsASingleFragment{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsASingleFragmentString  --> nsAString
- nsASingleFragmentCString --> nsACString

--HG--
extra : rebase_source : e6a1ddc8938fecd9a735b15e872c054edf4c7910
2017-06-20 19:18:17 +10:00
Eric Rahm ab9516d40d Bug 1353593 - Part 2: Remove wwc functions. r=froydnj
This removes the use of |wwc| functions in favor of char16ptr_t's implicit
conversion operators.

MozReview-Commit-ID: GHONYieMPla
2017-06-12 16:20:49 -07:00
Milan Sreckovic 831111d1d7 Bug 1361724: Remove unused offset parameter from StripChar, StripChars, StripTaggedASCII, StripCRLF. r=froydnj
MozReview-Commit-ID: 3MV5TFMxGjn

--HG--
extra : rebase_source : de7ee1fd36e1b18427c67d9ac6e98f50f780a498
2017-05-17 13:49:52 -04:00
Nathan Froyd e75f6bd810 Bug 1353755 - remove nsCharTraits::assign; r=erahm
We don't need the tiny helper function for single-character assignment,
and the multi-argument assign() method is the only thing that uses it,
which is also itself unused.  So remove them both.
2017-05-22 09:23:09 -04:00
Eric Rahm e449ec82f3 Bug 1356025 - Add Capacity checks to nsTSubstring constructor. r=froydnj
MozReview-Commit-ID: 6RIwuvalcRz
2017-05-15 16:52:43 -07:00
Milan Sreckovic f6ada26ae2 Bug 1358297: Part 4. Optimize Strip/CompressWhitespace as a special case using ASCIIMask. r=froydnj
MozReview-Commit-ID: 2RVV3rPqOhl

--HG--
extra : rebase_source : 4ea81a961124b8a273472ba70cb333d1527cba9d
2017-05-10 13:12:42 -04:00
Milan Sreckovic 725d1c193f Bug 1358297: Part 3. Create special case for stripping CR and LF on TSubstring, and use it in all the places that it is called. Use ASCIIMask to make it fast. r=froydnj
MozReview-Commit-ID: 5ugh3Ma0OtH

--HG--
extra : rebase_source : 956a7a0535c3b7433fadfa65d0cfc26d9915f61a
2017-05-10 13:12:36 -04:00
Milan Sreckovic 40b6fdfb4b Bug 1358297: Part 2. Helper class to mask ascii characters, letting us do a faster test for membership in a string/character set. r=froydnj
MozReview-Commit-ID: 1s3mYNVThoD

--HG--
extra : rebase_source : d9c845addaa4a7a326b787a99f5cc83abb567848
2017-05-10 13:12:30 -04:00
Tom Tromey aa6e054b71 Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj
This annotates vsprintf-like functions with MOZ_FORMAT_PRINTF.  This may
provide some minimal checking of such calls (the GCC docs say that it
checks for the string for "consistency"); but in any case shouldn't
hurt.

MozReview-Commit-ID: HgnAK1LiorE

--HG--
extra : rebase_source : 9c8d715d6560f89078c26ba3934e52a2b5778b6a
2017-05-04 12:10:19 -06:00
Nathan Froyd f6465f98b9 Bug 1362194 - part 1 - add a fallible CopyASCIItoUTF16 function; r=mccr8
We already have all the machinery to expose a function like this, we
just need to write it.
2017-05-05 11:33:36 -04:00
Henri Sivonen 778981d9cc Bug 1359353 - Make the backing buffers of XPCOM strings available as mutable slices. r=mystor.
MozReview-Commit-ID: KeJ2Qb3R5ET

--HG--
extra : rebase_source : 175a6dcac973d72a167a4e0e8d6d7e3c695203c8
2017-04-25 13:17:48 +03:00
Nathan Froyd 2989feb7d7 Bug 1353810 - add a --enable-rust-debug option; r=chmanchester
For people working on Rust code, compiling in debug mode (Cargo's "dev"
profile) is convenient: debug assertions are turned on, optimization is
turned off, and parallel compilation inside of rustc itself can be
used.  These things make the build faster and the debugging experience
more pleasant.

To obtain that currently, one needs to --enable-debug at the Gecko
toplevel, which turns on debug assertions for the entire browser, which
makes things run unreasonably slowly.  So it would be desirable to be
able to turn *off* debug mode for the entirety of the browser, but turn
on debug mode for the Rust code only.

Hence this added switch, --enable-rust-debug, which does what it
suggests and defaults to the value of --enable-debug.  For our own
sanity and because we judge it a non-existent use case, we do not
support --enable-debug --disable-rust-debug.
2017-04-12 21:49:25 -04:00
L. David Baron f2802b9d4c Bug 1353181 followup - Fix non-DEBUG warnings-as-errors bustage. 2017-04-04 21:42:18 -07:00
L. David Baron 1b6a8f407e Bug 1353181 - Make nsStringBuffer's reference count use the minimum memory synchronization needed. r=froydnj
This is the same optimization made for ThreadSafeAutoRefCnt in bug
1277709.  However, nsStringBuffer uses a 32-bit reference count all the
time, so it can't easily use ThreadSafeAutoRefCnt.

MozReview-Commit-ID: LpB3xaYbaEE

--HG--
extra : transplant_source : %89%FA%02%402%B1%83%17%81%09%EEw%B0%85%A0%B2%8DK/%D6
2017-04-04 20:59:21 -07:00
Eric Rahm d98d879754 Bug 1353143 - Part 3: Switch PR_ASSERT usage to MOZ_ASSERT. r=froydnj 2017-04-04 14:36:17 -07:00
Henri Sivonen c514501f1a Bug 1295611 - Add mozilla::Span. r=froydnj,gerv.
MozReview-Commit-ID: HGNDClVctbE
2017-03-31 13:32:18 +03:00
Michael Layzell 891ba54825 Bug 1348398 - Remove Gecko_Truncate[C]String as it is no longer used, r=froydnj 2017-03-24 15:14:28 -04:00
Carsten "Tomcat" Book 7419b36815 merge mozilla-inbound to mozilla-central a=merge 2017-03-24 14:24:21 +01:00
Valentin Gosu 427ac28f38 Bug 1344498 - Add fallible StripWhitespace r=njn
MozReview-Commit-ID: 8UOTEBlFxfO

--HG--
extra : rebase_source : 2c32cf4b39f9e601b9ebe1a51639000dea9f14f7
2017-03-23 12:52:31 +01:00
Eric Rahm 5246441bae Bug 1349719 - Share max capacity logic in nsTString. r=froydnj
This refactors the max capacity logic so that both |MutatePrep| and |Adopt| can
share it.

MozReview-Commit-ID: CMn4kiAoWub
2017-03-23 12:32:53 -07:00
Michael Layzell a09ec7fe77 Bug 1347224 - Part 2: Re-add Gecko_Truncate[C]String temporarially to avoid stylo breakage, r=froydnj
MozReview-Commit-ID: 1EhKt434D3k
2017-03-20 14:41:10 -04:00
Michael Layzell 2be5900b6b Bug 1347224 - Part 1: Expose fallible methods on the rust ns[C]String bindings, r=froydnj
This patch adds a series of fallible methods for the rust ns[C]String
bindings, as well as the `set_length` method, which is the same as the
`SetLength` method in C++. `set_length` is marked as unsafe.

The decision was made to make the fallible methods seperate from the
infallible methods, and to use seperate Rust->C++ bindings for each of
them, rather than only binding the fallible bindings, and unwrapping
them in rust-land. This is to try to match the C++ API as closely as
possible, and to ensure that the behavior matches.

MozReview-Commit-ID: FkSomkFUFGD
2017-03-20 14:40:45 -04:00
Boris Zbarsky 5a5123809e Bug 1276186. Stop using the locale-sensitive AppendPrintf in code that is supposed to always use '.' as a decimal separator. r=dbaron
MozReview-Commit-ID: ILXSgv5QUr4
2017-03-14 23:16:32 -04:00
David Major 66530030b2 Bug 1344629 - Part 10: Bonus fix: Remove NS_LITERAL_STRING_INIT macros. r=dbaron
As of the previous patch, these are now unused and aren't really buying us much.

MozReview-Commit-ID: HGliIFAcBb7

--HG--
extra : rebase_source : f39105fcb15e1c7eccae5088b34352e849f1b2b6
2017-03-14 15:26:37 +13:00
David Major 96a4158a43 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
David Major 1c35859304 Bug 1344629 - Part 6.5: Allow get() on nsLiteralStrings, excluding temporaries. r=dbaron
This prevents the antipattern found in bug 1341513.

MozReview-Commit-ID: JhxgC7aQDUA

--HG--
extra : rebase_source : b1ff0d240df87b2cbb415183dc93acc8bde7960a
2017-03-14 15:26:36 +13:00
David Major 09c0dcc72b Bug 1344629 - Part 5: Make string tuples work with nsTStringRepr. r=dbaron
This requires some adjustment to Equals(). Previously, when you wrote:
fooString.Equals(barString + bazString)
you'd get a tuple for the operator+, which implicitly converts to nsTSubstring, which resolves into nsTSubstring::Equals(const nsTSubstring&).

Now that Equals has moved one level up:
nsTStringRepr::Equals(const nsTStringRepr&)
The compiler can't make the double-leap from nsTSubstringTuple -> nsTSubstring -> nsTStringRepr.
So I implemented this manually.

MozReview-Commit-ID: 5x8XhndOToJ

--HG--
extra : rebase_source : ab0ec1259af522ea47a237e01f69dd28e593eacd
2017-03-14 10:04:15 +13:00
David Major 522a09c17f Bug 1344629 - Part 4: Cleanup: make string tuples not think in terms of "substring". r=dbaron
In the next patch, tuples will work on nsTStringRepr rather than nsTSubstring, so the notions of TO_SUBSTRING and substring_type are not quite right.

MozReview-Commit-ID: LpUwmGQAWVO

--HG--
extra : rebase_source : 6142500a3d4218d74dda11736b94cf08d6f55335
2017-03-14 10:02:55 +13:00
David Major b7e6bde277 Bug 1344629 - Part 3: Move const accessors from nsTSubstring to nsTStringRepr. r=dbaron
All nsTStringRepr methods must be const, so the mutators remain on nsTSubstring.

I left a small number of const methods on nsTSubstring, e.g. Capacity(), the rationale being that you would only be interested in this method if you intend to mutate the string.

I considered splitting up the typedefs block and leaving behind the ones related to mutation (e.g. nsWritingIterator) but I think it makes for clearer documentation to have them all in one place.

MozReview-Commit-ID: 7dEaRgc8NLK

--HG--
extra : rebase_source : 01b387b7e5bf2f21d6af1afcccf6ec0d7e8a2ac7
2017-03-14 10:02:50 +13:00
David Major fc4fab5ae2 Bug 1344629 - Part 2: Add nsTStringRepr as the new root of the string hierarchy. r=dbaron
I've named it after the similar ns(C)StringRepr in the rust bindings code.

This is just the minimal definition of the structure. Bulk move of methods coming in next patch.

MozReview-Commit-ID: 4aQrpIWRTm7

--HG--
extra : rebase_source : e89d6fbacbaf6e26028e13848ce2877c8f245ba6
2017-03-14 10:01:35 +13:00
David Major 29d7d9433c Bug 1344629 - Part 1: String class cleanup and dead code removal. r=dbaron
Cleanup in preparation for upcoming patches:

- By using an accessor method, nsTPromiseFlatString no longer needs to be a friend.
- The explicit uint32_t constructors are unused.
- The abstract_string_type typedef is unused (and will be potentially confusing in the next patch, so removing).
- The three-param ctor for nsTSubstring no longer needs to be public "for convenience".
- friend class nsTObsoleteAStringThunk_CharT no longer exists.

MozReview-Commit-ID: 4ibJLNzn13k

--HG--
extra : rebase_source : d5a947f398a6dfc801f644f437bae9125424d4d0
2017-03-14 09:28:49 +13:00
Iris Hsiao 5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major 84c2879b84 Bug 1344629 - Part 10: Bonus fix: Remove NS_LITERAL_STRING_INIT macros. r=dbaron
As of the previous patch, these are now unused and aren't really buying us much.

MozReview-Commit-ID: HGliIFAcBb7

--HG--
extra : rebase_source : f39105fcb15e1c7eccae5088b34352e849f1b2b6
2017-03-14 15:26:37 +13:00
David Major e7336ecc95 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
David Major 9236e31186 Bug 1344629 - Part 6.5: Allow get() on nsLiteralStrings, excluding temporaries. r=dbaron
This prevents the antipattern found in bug 1341513.

MozReview-Commit-ID: JhxgC7aQDUA

--HG--
extra : rebase_source : b1ff0d240df87b2cbb415183dc93acc8bde7960a
2017-03-14 15:26:36 +13:00
David Major e9f635bcee Bug 1344629 - Part 5: Make string tuples work with nsTStringRepr. r=dbaron
This requires some adjustment to Equals(). Previously, when you wrote:
fooString.Equals(barString + bazString)
you'd get a tuple for the operator+, which implicitly converts to nsTSubstring, which resolves into nsTSubstring::Equals(const nsTSubstring&).

Now that Equals has moved one level up:
nsTStringRepr::Equals(const nsTStringRepr&)
The compiler can't make the double-leap from nsTSubstringTuple -> nsTSubstring -> nsTStringRepr.
So I implemented this manually.

MozReview-Commit-ID: 5x8XhndOToJ

--HG--
extra : rebase_source : ab0ec1259af522ea47a237e01f69dd28e593eacd
2017-03-14 10:04:15 +13:00
David Major 02daf1d0c9 Bug 1344629 - Part 4: Cleanup: make string tuples not think in terms of "substring". r=dbaron
In the next patch, tuples will work on nsTStringRepr rather than nsTSubstring, so the notions of TO_SUBSTRING and substring_type are not quite right.

MozReview-Commit-ID: LpUwmGQAWVO

--HG--
extra : rebase_source : 6142500a3d4218d74dda11736b94cf08d6f55335
2017-03-14 10:02:55 +13:00
David Major 6ebaf62ee9 Bug 1344629 - Part 3: Move const accessors from nsTSubstring to nsTStringRepr. r=dbaron
All nsTStringRepr methods must be const, so the mutators remain on nsTSubstring.

I left a small number of const methods on nsTSubstring, e.g. Capacity(), the rationale being that you would only be interested in this method if you intend to mutate the string.

I considered splitting up the typedefs block and leaving behind the ones related to mutation (e.g. nsWritingIterator) but I think it makes for clearer documentation to have them all in one place.

MozReview-Commit-ID: 7dEaRgc8NLK

--HG--
extra : rebase_source : 01b387b7e5bf2f21d6af1afcccf6ec0d7e8a2ac7
2017-03-14 10:02:50 +13:00
David Major 4ff2c67fc1 Bug 1344629 - Part 2: Add nsTStringRepr as the new root of the string hierarchy. r=dbaron
I've named it after the similar ns(C)StringRepr in the rust bindings code.

This is just the minimal definition of the structure. Bulk move of methods coming in next patch.

MozReview-Commit-ID: 4aQrpIWRTm7

--HG--
extra : rebase_source : e89d6fbacbaf6e26028e13848ce2877c8f245ba6
2017-03-14 10:01:35 +13:00
David Major c04f2c4296 Bug 1344629 - Part 1: String class cleanup and dead code removal. r=dbaron
Cleanup in preparation for upcoming patches:

- By using an accessor method, nsTPromiseFlatString no longer needs to be a friend.
- The explicit uint32_t constructors are unused.
- The abstract_string_type typedef is unused (and will be potentially confusing in the next patch, so removing).
- The three-param ctor for nsTSubstring no longer needs to be public "for convenience".
- friend class nsTObsoleteAStringThunk_CharT no longer exists.

MozReview-Commit-ID: 4ibJLNzn13k

--HG--
extra : rebase_source : d5a947f398a6dfc801f644f437bae9125424d4d0
2017-03-14 09:28:49 +13:00
David Major 7e6c4486b9 Bug 1346100 - Use nsDependentSubstring for the substring splitter's pieces. r=dbaron 2017-03-13 15:56:23 +13:00
David Major af163b2b51 Bug 1346099: Fix a typo in the string splitter. r=dbaron
This just-so-happened to work because nobody refers to the splitter directly by name.

The added gtest doesn't actually prove that this patch fixes anything, but I figured we could use a wide string for good measure.

MozReview-Commit-ID: 1ADy4X44HO1
2017-03-13 11:19:49 +13:00
Carsten "Tomcat" Book 087da3f0d9 merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
David Major ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
Wes Kocher e447319b94 Merge inbound to central, a=merge
MozReview-Commit-ID: DuLPg9KE8Ci

--HG--
rename : browser/components/extensions/ext-theme.js => toolkit/components/extensions/ext-theme.js
rename : browser/components/extensions/schemas/theme.json => toolkit/components/extensions/schemas/theme.json
rename : browser/components/extensions/test/browser/browser_ext_themes_chromeparity.js => toolkit/components/extensions/test/browser/browser_ext_themes_chromeparity.js
rename : browser/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js => toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js
rename : browser/components/extensions/test/browser/browser_ext_themes_lwtsupport.js => toolkit/components/extensions/test/browser/browser_ext_themes_lwtsupport.js
2017-03-02 14:57:41 -08:00
Tom Tromey 3f70992816 Bug 1341880 - do not emit trailing \0 in PrintfState; r=glandium
MozReview-Commit-ID: 2di7CsDCWLF

--HG--
extra : rebase_source : f5469d4b3e818204848123ea163c7f0f08563f7c
2017-02-27 13:29:54 -07:00
Benjamin Smedberg ac59a7e7f3 Bug 1332639 followup. I apparently didn't actually remove the nsStringAPI.* files, but that was the intention, r=oops
MozReview-Commit-ID: GJBNWAmO6iy

--HG--
extra : rebase_source : 1ebfee5b368d0358ed1dad46ff84cc5bf57bb834
2017-03-02 09:23:08 -05:00
Benjamin Smedberg d9c7494134 Bug 1332639 - Remove the external string API: nsStringAPI.h/cpp and nsEmbedString.h, r=glandium
MozReview-Commit-ID: 9dZcmMAI0Vk

--HG--
extra : rebase_source : 5561cf7f3318c60f082fff02c5e78aba661f6437
2017-02-27 11:41:52 -05:00
Jonathan Kew 3873ed8f1c Bug 1344555 - Make nsTSubstring::Split a const method. r=gcp 2017-03-06 10:31:02 +00:00
Honza Bambas 7478e3a8b9 Bug 1340577 - Add release-grade assertions to various XPCOM string API implementations to avoid input causing an overflow. r=froydnj
--HG--
extra : rebase_source : af6aaf66863cb6a981a4d8f0deeac8e0f40278c1
2017-02-21 11:38:00 -05:00
Tom Tromey d2667a2b27 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L

--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Tom Tromey 0b7fe52949 Bug 1060419 - remove SprintfState typedef; r=froydnj
MozReview-Commit-ID: 9ygDxy8pBLT

--HG--
extra : rebase_source : 88e1b16509d2d329e01518b06d2232b8422934b2
2017-01-13 14:54:14 -07:00
David Major 6feec2967a Bug 1339968 - Remove NS_MULTILINE_LITERAL_STRING. r=froydnj 2017-02-17 15:24:11 +13:00
Vincent Lequertier 5864a38dc4 Bug 1329243 - Fix nsAdoptingString -Wextra copy constructor warning; r=froydnj
MozReview-Commit-ID: DEicxRecJUu

--HG--
extra : rebase_source : 612fa3d002ed906102ab24b3d338eb0087ca5f60
2017-01-23 20:50:01 +01:00
Michael Layzell 0dadca05f7 Bug 1335203 - Synchronize rust debug-assertions with C++ DEBUG, r=froydnj
MozReview-Commit-ID: JPD9eNFg89S
2017-02-01 13:54:22 -05:00
Emilio Cobos Álvarez 0a5eaecfac Bug 1335204: Remove DEBUG-only ifdef for Gecko_IncrementStringAdoptCount. r=mystor
MozReview-Commit-ID: KhwAxk1fHUn

--HG--
extra : rebase_source : 80d844bf069ae09f0a9588d93fd49c57a3725c52
2017-01-30 23:17:19 +01:00
Gian-Carlo Pascutto f004938bbb Bug 1330326 - Add Split() function on String classes. r=froydnj
MozReview-Commit-ID: 3xug2xMR60j

--HG--
extra : rebase_source : e39f37936f5b07411921b9875a85fd55241847be
2017-01-30 12:34:35 +01:00
Emilio Cobos Álvarez c7cae408eb Bug 1334579: Integrate nsstring bindings with leak logging. r=mystor
MozReview-Commit-ID: 368DwwuaMqr

--HG--
extra : rebase_source : e8e2149ca7169556df668615d654423ae9080097
2017-01-27 21:12:22 +01:00
Sebastian Hengst f679eaafc6 Backed out changeset 558774589f3e (bug 1330326) for Windows build bustage in nsTSubstring.h. r=backout on a CLOSED TREE 2017-01-27 21:00:49 +01:00
Gian-Carlo Pascutto 305eb7cc8b Bug 1330326 - Add Split() function on String classes. r=froydnj
MozReview-Commit-ID: 3xug2xMR60j

--HG--
extra : rebase_source : 60a9e37c2c7727eb6fbd69bfeee0f1292a0d880e
2017-01-24 12:07:00 +01:00
Benjamin Smedberg 4b13a903e5 Bug 1332631 part E - file moves from xpcom/glue to xpcom/string, r=froydnj
MozReview-Commit-ID: AGHVJ5uYOoI

--HG--
rename : xpcom/glue/nsTextFormatter.cpp => xpcom/string/nsTextFormatter.cpp
rename : xpcom/glue/nsTextFormatter.h => xpcom/string/nsTextFormatter.h
extra : rebase_source : 18e1bf4f93d9174ff6808ea08b22f3c308df7da1
extra : histedit_source : 3436c455836aeb2583dd1418a1bad259cb779af1
2017-01-20 14:19:22 -05:00
Nathan Froyd 1eb20054a8 Bug 1332648 - remove bogus string radix/case #defines; r=erahm
Nothing uses these defines, so we should remove them lest anybody get
confused.  I would have also removed kAutoDetect (who would want to do
this?!), but kAutoDetect is used in one place in the tree, and I didn't
want to hold up the deletion of these two items with trying to fix that
one place.
2017-01-20 16:37:35 -05:00
Boris Zbarsky bdfd8efaa4 Bug 1330759 part 6. Make the null-termination asserts in nsStringBuffer::ToString into diagnostic asserts. r=froydnj 2017-01-18 22:20:15 -05:00
Boris Zbarsky 1ae3af9b2c Bug 1330759 part 5. Back out the nsTSubstring changes we made in bug 1324430, because they can lead to non-null-terminated nsStrings. r=froydnj 2017-01-18 22:20:15 -05:00
Hiroyuki Ikezoe a4cf573971 Bug 1330824 - Add truncate for nsAString and nsACString. r=mystor
MozReview-Commit-ID: 2ND5ra3buxI
2017-01-14 15:02:14 +09:00
Andrea Marchesini 2dba3e889e Bug 1324430 - Implement nsTSubstring_CharT::Assign with length for a better string buffer sharing, r=froydnj 2016-12-23 17:22:21 +01:00
Olli Pettay 38db072da0 Bug 1324808 - Improve string allocation, r=nfroyd 2016-12-22 00:23:07 +02:00
Benjamin Smedberg eebe7c8cdb Bug 1306329 part A - nsUTF8Utils is used from outside libxul, and NS_WARNING now only works from within libxul, so make its usage conditional, r=froydnj
MozReview-Commit-ID: HRYpj8C9c5k

--HG--
extra : rebase_source : 835701132df22a2713c79a36a337194626624e1c
2016-11-04 14:12:15 -04:00
Tomislav Jurin 348bfffc19 Bug 1296189 - Replace NS_RUNTIMEABORT("some string literal message") with MOZ_CRASH(). r=froydnj 2016-12-02 13:46:53 -08:00
Eric Rahm 4c42b01cc8 Bug 1318766 - Validate length in SubstringTuple. r=froydnj
MozReview-Commit-ID: JuwQS8jpKcX
2016-12-02 10:35:35 -08:00
Eric Rahm 1a94cc7a4a Bug 1317545 - Check new length in ReplaceSubstring. r=froydnj
MozReview-Commit-ID: 5Qvusd3twhM
2016-11-28 13:29:04 -08:00
Masatoshi Kimura 9c32f727eb Bug 1318857 - Unhide nsTSubstring_CharT::StripChars in nsTString_CharT. r=froydnj
MozReview-Commit-ID: CyQhH2y9lbm

--HG--
extra : rebase_source : d733decec808e7a74deefe149672ec4bdbc7f3f1
2016-11-20 00:53:37 +09:00
Tooru Fujisawa 6f9d4ca127 Bug 1283710 - Part 5: Rename message to toStringResult if it is the result of toString. r=bholley,jwalden,froydnj 2016-08-14 20:39:31 +09:00
Wes Kocher 71f24926ed Backed out 10 changesets (bug 1283710) for osx xpcshell failures a=backout
Backed out changeset eb95a12e5d86 (bug 1283710)
Backed out changeset f727edc4be48 (bug 1283710)
Backed out changeset fed60fbf645d (bug 1283710)
Backed out changeset 98339fa564f1 (bug 1283710)
Backed out changeset 51b8d69edca0 (bug 1283710)
Backed out changeset d72527b7d3c0 (bug 1283710)
Backed out changeset ee5215f1a38e (bug 1283710)
Backed out changeset dcedbaefe399 (bug 1283710)
Backed out changeset 61f8250cbe0b (bug 1283710)
Backed out changeset 239382846137 (bug 1283710)
2016-10-18 17:27:58 -07:00
Tooru Fujisawa 8d69b4f507 Bug 1283710 - Part 5: Rename message to toStringResult if it is the result of toString. r=bholley,jwalden,froydnj 2016-08-14 20:39:31 +09:00
Nathan Froyd 3ca4c03f1d Bug 1306616 - part 2 - remove nsWritingIterator<T>::write; r=erahm
Iterators shouldn't have methods like write(); if you need to write to
an iterator, that logic should be handled by something outside of the
iterator...which also explains why we have a specialization of
nsCharTraits<nsWritingIterator<T>>.  The HTML parser wants this for its
own reasons, so we have to make sure it continues to work.
2016-10-03 17:21:52 -04:00
Nathan Froyd 3806e7bb85 Bug 1306616 - part 1 - don't use write() method of nsWritingIterator in nsReadableUtils; r=erahm
Iterators really shouldn't have methods like these; there should be
something else sitting on top of iterators that provides this.
2016-10-03 17:21:52 -04:00