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

1354 Коммитов

Автор SHA1 Сообщение Дата
Samuel Thibault 39ed413777 Bug 1346535 - atk: Introduce U+FEFF characters to match AT-SPI offsets with DOM offsets. r=surkov, r=dbaron 2018-03-16 15:57:00 -04: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
Paul Bone 1d1091d2ac Bug 1440205 - Print the nsStringBuffer bad canary value in hex r=jonco
--HG--
extra : rebase_source : b6c7dd75c295e061c870f6e318371ff0fb90558d
2018-02-22 15:32:42 +11:00
Jeff Walden 5472050225 Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE
--HG--
extra : amend_source : 72f066d9c75ae5ccd4d1e929896a2b12aa0ddc8c
2018-02-21 10:15:43 +02:00
Gurzau Raul 14b89a5ae5 Backed out changeset 66c1c1596bea (bug 1438750) for assertion failure at TestFloatingPoint.cpp on Windows platform 2018-02-21 08:29:50 +02:00
Jeff Walden 2b6c4bedad Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj
--HG--
extra : rebase_source : 76ecf4ab0caf7a5367636a866512931d3fd9b962
2018-02-15 21:02:53 -08:00
Nathan Froyd c65a72ac1e Bug 1435916 - use a const array in nsTextFormatter::dosprintf; r=tromey
I don't know how this was not constant, but there you go.
2018-02-14 12:01:36 -05:00
Eric Rahm 68c77a919f Bug 1435924 - Part 2: Remove nsSubstring.h. r=dbaron
--HG--
extra : rebase_source : 1cbc6f4ab7fc72c11c7508fd8843e64138b47319
2018-02-05 14:51:18 -08:00
Eric Rahm 9ff126586e Bug 1435924 - Part 1: Switch from nsSubstring.h to nsAString.h. r=dbaron
--HG--
extra : rebase_source : 969727b07a7450e57c219766838a7266ff79484f
2018-02-05 17:36:32 -08:00
Eric Rahm 707e39aaa9 Bug 1434689 - Part 3: Annotate nsTSubstringTuple as MOZ_TEMPORARY_CLASS. r=froydnj
The documentation indicates nsTStringTuple is intended for internal use only
and is designed to be only be used as a temporary. This makes that fact
explicit by annotating the class for static analysis.

--HG--
extra : rebase_source : 737481fb39355c456cf1bbf17b887e35d692c4df
2018-01-31 15:45:04 -08:00
Eric Rahm 55733f8050 Bug 1434789 - Part 2: Remove nsSubstringTuple aliases. r=froydnj
This removes nsSubstringTuple.h and nsSubstringTuple.cpp in favor of
nsTSubstringTuple.

--HG--
extra : rebase_source : 4539b7cccd7a6837ca695782200a2e8d19b8436a
2018-01-31 16:45:34 -08:00
Noemi Erli ed5a1a575c Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-01-19 12:15:59 +02:00
Anthony Ramine af2c4fdf74 Bug 1431449 - Move nsTString::ToInteger* methods to nsTSubstring; r=bz
MozReview-Commit-ID: 8hCDfF8rLRC

--HG--
extra : rebase_source : 651a1367cf5e1e974facc8809425efa1f3b406b5
2018-01-18 15:32:35 +01:00
Eric Rahm 5497e40f06 Bug 1431261 - Add nsTDependentString copy constructor. r=dbaron
This adds a copy constructor that uses Rebind to preserve the reference to
static data rather allocate a new shared buffer.

--HG--
extra : rebase_source : db04def1137a9be646b8e09dfee780c9163a585c
2018-01-18 14:16:19 -08:00
Makoto Kato 606547c9c7 Bug 586838 - Add NEON versions of LossyConvertEncoding. r=erahm 2018-01-12 15:46:11 +09: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 a8271a5de1 Bug 1424120 - Part 9: Further cleanup of minor nits in ToInteger. r=njn
Final style cleanup:
  - Comment formatting
  - Move variable declarations to where they're used
  - Don't set NS_OK until we finish processing
  - Early exit for error conditions

--HG--
extra : rebase_source : 15e216df6b9a5ca113d2da029e999d8bccd6752b
2017-12-08 11:52:10 -08:00
Eric Rahm 79a173e55d Bug 1424120 - Part 8: clang-format ToInteger. r=njn
--HG--
extra : rebase_source : 4efc751e224141f33fcbcf9aba909956f82f5877
2017-12-08 11:43:15 -08:00
Eric Rahm 70d5608b99 Bug 1424120 - Part 7: Remove duplicated switch logic from ToInteger. r=njn
--HG--
extra : rebase_source : 039af2cc615cd3d3ad990c77e42847f1189e4625
2017-12-08 11:17:55 -08:00
Eric Rahm 1974312b7c Bug 1424120 - Part 6: Add early returns to ToInteger. r=njn
This reduces the indentation by removing the `if(cp)` and `if(done)` blocks
and just returning early. The `if(cp)` was unnecessary as `BeginReading` will
never return nullptr.

--HG--
extra : rebase_source : e0889e65bd5d371d54783087ae22e097c8dfe4db
2017-12-08 10:15:53 -08:00
Eric Rahm b1c032672b Bug 1424120 - Part 5: Enforce support for only radix of 10 and 16. r=njn
In theory other radixes can be passed in but we don't actually handle them.
This asserts that the radix is supported and just switches over to using 10 and
16 directly.

--HG--
extra : rebase_source : 71891302d499bfd108a5bb41626d921b3be193ce
2017-12-07 18:54:13 -08:00
Eric Rahm b1ed165c5e Bug 1424120 - Part 4: Remove haveValue logic from ToInteger. r=njn
The `haveValue` logic is no longer necessary. If we don't have a value the
result will always be 0.

--HG--
extra : rebase_source : df79cbe1dab86914873de72f0ef8fe72d3469e1a
2017-12-07 18:44:03 -08:00
Eric Rahm 8601b5e802 Bug 1424120 - Part 3: Update error handling in ToInteger. r=njn
--HG--
extra : rebase_source : 75bd93c43c0c2144fdddda4fb5f4ae2db087fcde
2017-12-07 17:51:26 -08:00
Eric Rahm 5f9cfc967c Bug 1424120 - Part 2: Remove kAutoDetect support from ToInteger. r=njn
kAutoDetect is never actually used in our codebase and makes ToInteger rather
convoluted. This removes the logic for it, the constant itself, and the
resulting dead code.

--HG--
extra : rebase_source : 0809b1d167a0c6ffcc7d45cc6f471c9d381ca303
2017-12-07 15:40:15 -08:00
Eric Rahm a2ca9e1092 Bug 1424120 - Part 1: Combine logic for ToInteger impls. r=njn
Replaced the duplicated logic with a shared template implementation.

--HG--
extra : rebase_source : 00e62d8eddeff3ba38f9e17cd875cf1907bc4b31
2017-12-07 15:18:44 -08:00
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