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

7 Коммитов

Автор 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
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03: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
Nicolas Belleville 276b7e52b1 Bug 948466: Rename gfxPangoFonts to gfxFontconfigFonts. r=nical
--HG--
rename : gfx/thebes/gfxPangoFonts.cpp => gfx/thebes/gfxFontconfigFonts.cpp
rename : gfx/thebes/gfxPangoFonts.h => gfx/thebes/gfxFontconfigFonts.h
2015-05-20 17:44:09 +02:00
Birunthan Mohanathas 790694c449 Bug 1038537 - Part 5: Flatten intl/lwbrk/{idl,public,src}/ directories. r=smontagu
--HG--
rename : intl/lwbrk/src/Makefile.in => intl/lwbrk/Makefile.in
rename : intl/lwbrk/src/crashtests/416721.html => intl/lwbrk/crashtests/416721.html
rename : intl/lwbrk/src/crashtests/crashtests.list => intl/lwbrk/crashtests/crashtests.list
rename : intl/lwbrk/src/jisx4051class.h => intl/lwbrk/jisx4051class.h
rename : intl/lwbrk/src/jisx4051pairtable.txt => intl/lwbrk/jisx4051pairtable.txt
rename : intl/lwbrk/src/nsCarbonBreaker.cpp => intl/lwbrk/nsCarbonBreaker.cpp
rename : intl/lwbrk/src/nsComplexBreaker.h => intl/lwbrk/nsComplexBreaker.h
rename : intl/lwbrk/public/nsILineBreaker.h => intl/lwbrk/nsILineBreaker.h
rename : intl/lwbrk/idl/nsISemanticUnitScanner.idl => intl/lwbrk/nsISemanticUnitScanner.idl
rename : intl/lwbrk/public/nsIWordBreaker.h => intl/lwbrk/nsIWordBreaker.h
rename : intl/lwbrk/src/nsJISx4051LineBreaker.cpp => intl/lwbrk/nsJISx4051LineBreaker.cpp
rename : intl/lwbrk/src/nsJISx4051LineBreaker.h => intl/lwbrk/nsJISx4051LineBreaker.h
rename : intl/lwbrk/public/nsLWBrkCIID.h => intl/lwbrk/nsLWBrkCIID.h
rename : intl/lwbrk/src/nsPangoBreaker.cpp => intl/lwbrk/nsPangoBreaker.cpp
rename : intl/lwbrk/src/nsRuleBreaker.cpp => intl/lwbrk/nsRuleBreaker.cpp
rename : intl/lwbrk/src/nsSampleWordBreaker.cpp => intl/lwbrk/nsSampleWordBreaker.cpp
rename : intl/lwbrk/src/nsSampleWordBreaker.h => intl/lwbrk/nsSampleWordBreaker.h
rename : intl/lwbrk/src/nsSemanticUnitScanner.cpp => intl/lwbrk/nsSemanticUnitScanner.cpp
rename : intl/lwbrk/src/nsSemanticUnitScanner.h => intl/lwbrk/nsSemanticUnitScanner.h
rename : intl/lwbrk/src/nsUniscribeBreaker.cpp => intl/lwbrk/nsUniscribeBreaker.cpp
rename : intl/lwbrk/src/rulebrk.c => intl/lwbrk/rulebrk.c
rename : intl/lwbrk/src/rulebrk.h => intl/lwbrk/rulebrk.h
rename : intl/lwbrk/src/th_char.h => intl/lwbrk/th_char.h
2014-07-24 10:56:39 -07:00