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

15 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Karl Tomlinson 539768fc12 Bug 1499212 - document that Literal parameters must have a null terminator r=dbaron
A character array initialized with a list of character literals will not
necessarily have a trailing null-terminator required for AssignLiteral or
trimmed in EqualsLiteral.

Depends on D8775

Differential Revision: https://phabricator.services.mozilla.com/D8951

--HG--
extra : moz-landing-system : lando
2018-10-19 01:26:21 +00:00
Karl Tomlinson ba7a754a76 Bug 1499212 adjust Literal method doc so as not to imply that |this| must be a literal string r=dbaron
Depends on D8774

Differential Revision: https://phabricator.services.mozilla.com/D8775

--HG--
extra : moz-landing-system : lando
2018-10-19 01:07:10 +00:00
Karl Tomlinson aa77ee3384 Bug 1499212 - document reasons for restrictions on EqualsLiteral parameter r=dbaron
"Bound" is the term used in the C++ standard to describe the number of
elements in an array.

EqualsLiteral has no opportunity to optimize for constant and static storage
duration parameters.

Depends on D8773

Differential Revision: https://phabricator.services.mozilla.com/D8774

--HG--
extra : moz-landing-system : lando
2018-10-19 00:57:49 +00:00
Karl Tomlinson 99c72e1028 Bug 1499212 remove mention of character pointers in docs for Literal methods r=dbaron
Since https://hg.mozilla.org/mozilla-central/rev/9db7cf4cc385#l13.44 the type
system always excludes calls with character pointers and so there is no need
to mention this in the comment.

The comment for the 8-bit to 16-bit AssignLiteral overload is modified a
little to use "char" instead of "character" so as not to imply that anything
other than 8-bit char parameters may be provided to that overload.

The ReplaceLiteral and InsertLiteral comments are adjusted to use "character"
instead of "char" so as not to imply that the method or comment is limited to
8-bit char parameters.

Differential Revision: https://phabricator.services.mozilla.com/D8770

--HG--
extra : moz-landing-system : lando
2018-10-16 21:07:20 +00:00
Henri Sivonen 60d77138d5 Bug 1489979 - Avoid UB in IsDependentOn(). r=froydnj
MozReview-Commit-ID: C6ehO1TG5YO

Differential Revision: https://phabricator.services.mozilla.com/D6033

--HG--
extra : moz-landing-system : lando
2018-09-24 07:04:57 +00:00
Eric Rahm 2fb6934934 Bug 1492204 - Part 3: Remove references to char_iterator. r=froydnj
We can just use 'iterator' now that nsWritingIterator is gone.

--HG--
extra : rebase_source : 3f6fbafc9b57ce89afba581b224b3dc2295fa614
2018-09-18 12:05:23 -07:00
Eric Rahm 518cca9a75 Bug 1492204 - Part 2: Remove nsWritingIterator. r=froydnj
It's deprecated and no longer used.

--HG--
extra : rebase_source : 3469b29b178a4b42b2e29dc6736484e3c38c787d
2018-09-18 09:46:08 -07:00
Chris Peterson 02588f7a04 Bug 1481097 - xpcom: Remove nsTString literal string workaround for gcc 4.9 bug. r=nika
This gcc 4.9 workaround (from bug 1377351) is no longer needed because Firefox currently requires gcc 6.1 or later (as of bug 1444274).

MozReview-Commit-ID: 9R14BDzWEoj

--HG--
extra : rebase_source : a56ec3ee321cdc76e704fe33c2c4a5b85b558889
extra : source : e0c26ec11d499058e51bc2c3d06b2e1840e77f13
2018-07-22 00:02:34 -07:00
Andrew McCreight e1a6f8c267 Bug 1442295 - Add two missing includes in XPCOM. r=erahm
nsTArray.h needs mozalloc.h for moz_xmalloc

nsTStringRepr.h needs fallible.h for fallible

MozReview-Commit-ID: 9jz2pGPXMHk
2018-03-01 11:03:00 +02:00
Masatoshi Kimura a1d349bfab Bug 1426898 - Stop including Char16.h everywhere. r=Waldo
We had to force-include Char16.h to simulate char16_t on older MSVC versions.
But it is no longer the case. We should not rebuild the world whenever we
touch this file.

MozReview-Commit-ID: 1XY7tQD8LoK

--HG--
extra : rebase_source : a08ccfc9b6a4abf90f6f8b97a42079865724c9ec
2017-12-23 00:53:12 +09: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
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
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
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