Needed to compare with `nsTextFragment::Get1b()` which returns latin1-encoded
characters. Used in a subsequent review.
Differential Revision: https://phabricator.services.mozilla.com/D52343
--HG--
extra : moz-landing-system : lando
Zibi is working on replacing some string based APIs with some things that return
substrings, so we could use this.
Alternatively he'd have to do something like:
Compare(myCSubstring, nsDependentCSubstring(aTag, strlen(aTag)))
or something of that sort, which looks a bit uglier.
Differential Revision: https://phabricator.services.mozilla.com/D50523
--HG--
extra : moz-landing-system : lando
Zibi is working on replacing some string based APIs with some things that return
substrings, so we could use this.
Alternatively he'd have to do something like:
Compare(myCSubstring, nsDependentCSubstring(aTag, strlen(aTag)))
or something of that sort, which looks a bit uglier.
Differential Revision: https://phabricator.services.mozilla.com/D50523
--HG--
extra : moz-landing-system : lando
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
"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
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
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
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
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
Full specialization is allowed in MSVC, but not in gcc.
MozReview-Commit-ID: 9QI6YWc5Rvr
--HG--
extra : rebase_source : 7387899a6d76832afbe15e088b80a82adee59ca3
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