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

1390 Коммитов

Автор SHA1 Сообщение Дата
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
Nathan Froyd 24fe404f62 Bug 1305422 - part 18 - remove #if 0'd-out code from nsStringIterator.h; r=erahm
We don't support IBM VisualAge for OS/2 anymore, and we haven't needed
this code in a long time regardless.
2016-09-29 22:33:57 -04:00
Nathan Froyd 2f1ab0c5e0 Bug 1305422 - part 17 - remove size_{forward,backward} from ns{Reading,Writing}Iterator; r=erahm 2016-09-29 22:33:57 -04:00
Nathan Froyd cc34f85e8b Bug 1305422 - part 9 - remove {start,end} from ns{Reading,Writing}Iterator; r=erahm
These methods are now unused thanks to previous patches.
2016-09-29 22:33:57 -04:00
Nathan Froyd 46e20138db Bug 1305422 - part 6 - pass explicit end iterators for CopyTo{Upper,Lower}Case; r=erahm
This change avoids calling size_forward on the iterator, which we are
trying to eliminate.
2016-09-29 22:33:57 -04:00
Nathan Froyd 7fbe6c830e Bug 1305422 - part 6a - add operator- support for ns{Reading,Writing}Iterator; r=erahm
This change is necessary so we can start using a pair of
iterators (current, end) and subtract them to figure out how far we have
left to go.  The current code just uses size_forward and size_backward
for this purpose, and it's quite an unusual iterator that knows how far
it can go until it's done.
2016-09-29 22:33:58 -04:00
Nathan Froyd 17702bc8dd Bug 1305422 - part 3 - don't call size_forward in nsTStringComparator.cpp; r=erahm
Asking for size_forward on an iterator that you haven't started reading
from is just asking for the length of the original string, so use that
instead.
2016-09-29 22:33:58 -04:00
Nathan Froyd a6c2b19c93 Bug 1305422 - part 1 - remove normalize* methods from ns{Reading,Writing}Iterator; r=erahm
They are never called.
2016-09-29 22:33:58 -04:00
Michael Layzell dace0b2e39 Bug 1295762 - Part 1: Implement rust bindings to XPCOM's string types, r=froydnj
MozReview-Commit-ID: 7fnWSc3AzlR
2016-09-20 11:26:43 -04:00
Eric Rahm 395fa9e2ed Bug 1301742 - Improve UTF-16 to UTF-8 conversion speed. r=froydnj
This adds an SSE2 optimized path for UTF-16 strings that can be trivially
converted to UTF-8 (they contain no characters > 0X7F). It has a
speedup for the case where many of the leading characters are < 0X80 and
should have the same performance in the worst-case scenario where the first
character is > 0X7F.
2016-09-15 15:46:29 -07:00
Andrea Marchesini ed81ee1595 Bug 1301025 - Change string allocation to be similar to nsTArray allocation, r=smaug, r=froydnj 2016-09-08 19:49:49 +02:00
Eric Rahm 4067fc4876 Bug 1295747 - Use CheckedInt in size calculation. r=froydnj 2016-08-30 10:43:27 -07:00
Nicholas Nethercote 3873d0c8f6 Bug 1295053 (part 4) - Don't use NS_METHOD for remaining xpcom functions. r=froydnj.
These don't need __stdcall on Win32.

--HG--
extra : rebase_source : 19e4bf0d67b7fe25f53c0cff24471ef23d26dcf0
2016-08-15 14:49:26 +10: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 d634a99cad Bug 1277106 - Part 4: Remove MOZ_UTF16() macro. r=Waldo 2016-07-19 21:07:53 -07:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Nicholas Nethercote 2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
William Chen 303bd1fd42 Bug 1259590 - Remove B2G ACL code. r=khuey 2016-04-07 09:50:01 -07:00
Nicholas Nethercote 02b5d3f103 Bug 1262359 (part 3) - Add a missing fallible nsTSubstring_CharT::Assign() variant. r=erahm.
--HG--
extra : rebase_source : 2f5ee5658cce8a193454bf4c182cd534b0e7e8a0
2016-04-06 17:23:19 +10:00
Jacek Caban a426bc75b7 Bug 1257262 - Removed invalid nsAString:Assign variant. r=bsmedberg 2016-03-29 15:04:19 +02:00
Jeff Walden 3b8b70a765 Bug 1256027 - Cast a few things in varargs to the expected types for MSVC 2015 warning-compatibility. r=froydnj
--HG--
extra : rebase_source : 5caa63bb236b4840fda4f2c6bf91e987c7905195
2016-03-23 13:21:02 -07:00
Nathan Froyd 9a2523bcc3 Bug 1247359 - micro-optimize the common case of String{Begins,End}With; r=erahm
StringBeginsWith (resp. StringEndsWith) takes a defaulted
nsStringComparator object for doing comparisons.  The flexibility this
affords is great, but the cost is not: nsStringComparator has virtual
methods, so initializing that defaulted object (at every callsite)
requires a temporary object whose vtable must be initialized.

Since the overwhemingly common case is to use the default comparator
anyway, we should not use defaulted arguments and instead provide the
default comparator/user-provided comparator cases as separate overloads.
This change eliminates the virtual call for the majority of callsites
and reduces codesize as well.
2016-02-10 14:31:06 -05:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Jeff Muizelaar 66564e8cb3 Bug 1239125. Add operator!=(char_type*) to nsTSubstring. r=froydnj 2016-01-13 15:59:09 -05:00
Nicholas Nethercote ddc78c3b0c Bug 1229458 - Remove SizeOfIncludingThisMustBeUnshared() from string classes. r=mccr8.
The patch changes all uses of SizeOfIncludingThisMustBeUnshared() to
SizeOfIncludingThisIfUnshared(). This incurs the (tiny) cost of an unnecessary
IsReadonly() check for guaranteed-unshared strings, but avoids the possible
assertion failures that would occur when MustBeUnshared() was used incorrectly
on shared strings, which is an easy mistake to make.

--HG--
extra : rebase_source : b1e91f1c19bcbe0521b0ce461d6c90512ca938ef
2015-12-01 15:36:26 -08:00
Nicholas Nethercote 4e44ab2954 Bug 1225365 - Fix assertion in the nsScriptNameSpaceManager memory reporter. r=bz.
Also, use a fatal assertion in
nsStringBuffer::SizeOfIncludingThisMustBeUnshared().

--HG--
extra : rebase_source : ba35e67fa00dab55e509970e567116f52aee17ee
2015-11-17 14:46:46 -08:00
Aryeh Gregor c48c61128c Bug 1213862 - Align nsString whitespace handling with web specs; r=froydnj 2015-10-12 20:47:57 +03:00
Xidorn Quan 6ab3d4ccd1 Bug 1213130 - Make several string function to accept char16ptr_t instead of char16_t*, and remove redundant overloads. rs=froydnj
--HG--
extra : source : d2dbd4e5316efb888335c92950d32ce77abc41e5
2015-10-10 12:19:23 +11:00
Chris Peterson 0dbaae1ce2 Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56: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
Arnaud Bienner 52ee71547c Bug 1186603 - Add a "Contains" method for string classes and use it in HTMLInputElement. r=nfroyd 2015-07-30 19:45:25 +02:00
Ehsan Akhgari 7a81d59cb2 Bug 1188203 - Fix more constructors in XPCOM; r=froydnj 2015-07-28 12:24:37 -04:00
Michael Layzell 660f381a2f Bug 1159433 - Part 4: Mark nsTAutoString_CharT and nsAutoArrayBase as non-memmovable; r=froydnj 2015-07-24 19:15:40 -04:00
Andrea Marchesini b6e7f5efcf Bug 1171603 - Better size check in nsTSubstring::ReplacePrep. r=ehsan
--HG--
extra : rebase_source : a42342c8f82cb00e1e1b9b9673fc1e290fb9cf23
2015-07-06 14:27:35 -04:00
Hamzata Diallo 3f61ec7708 Bug 1178513 - Export libxul symbols needed by ACL. r=mattwoodrow
--HG--
extra : rebase_source : 77ebb8e1195c0e2570dbf5dbee54edfa5ecdab28
2015-07-02 15:19:35 -07:00
Ryan VanderMeulen 3b445a4a38 Backed out changeset 97c7e83acb6b (bug 1171603) for Windows Werror bustage.
CLOSED TREE
2015-07-02 15:33:10 -04:00
Andrea Marchesini 9368a3d589 Bug 1171603 - Better size check in nsTSubstring::ReplacePrep. r=ehsan
--HG--
extra : rebase_source : 608ecb648abaebc7e8c78870e14c406027f1d2cb
2015-07-02 14:51:42 -04:00
Eric Rahm 4879ae86f4 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00