gecko-dev/toolkit/xre
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
..
test Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj 2018-07-31 22:10:07 +09:00
AutoSQLiteLifetime.cpp
AutoSQLiteLifetime.h
Bootstrap.cpp Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld 2018-07-02 15:01:25 -07:00
Bootstrap.h Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld 2018-07-02 15:01:25 -07:00
CmdLineAndEnvUtils.h Bug 1467798: Fix problems with inlining and paths in TestDllInterceptorCrossProcess; r=handyman 2018-07-04 14:12:36 -06:00
CreateAppData.cpp
EventTracer.cpp
EventTracer.h
MacApplicationDelegate.h
MacApplicationDelegate.mm
MacAutoreleasePool.h
MacAutoreleasePool.mm
MacLaunchHelper.h
MacLaunchHelper.mm
MozMeegoAppService.h
PolicyChecks.h Bug 1457999: Part 1 - Move command line argument utils and safe mode checks into a common header file; r=jimm 2018-04-19 17:22:41 -06:00
ProfileReset.cpp Bug 1475282: Fix DEAD_STORE issues in ProfileReset. r=erahm 2018-07-16 18:27:16 +01:00
ProfileReset.h
SafeMode.h Bug 1457999: Part 1 - Move command line argument utils and safe mode checks into a common header file; r=jimm 2018-04-19 17:22:41 -06:00
UIKitDirProvider.h
UIKitDirProvider.mm
WinDllServices.cpp Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm 2018-01-30 14:23:10 -07:00
WinDllServices.h Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm 2018-01-30 14:23:10 -07:00
glxtest.cpp Bug 1432395 - Rename valgrind suppressions files to something more generic. r=froydnj 2018-01-27 10:22:56 +09:00
moz.build Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj 2018-07-31 22:10:07 +09:00
nsAndroidStartup.cpp
nsAppRunner.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsAppRunner.h Bug 1471532 - Support Windows in ASan Nightly Reporter builds. r=froydnj 2018-06-27 11:19:00 +02:00
nsAppStartupNotifier.cpp Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj 2018-07-23 17:41:06 -07:00
nsAppStartupNotifier.h
nsCommandLineServiceMac.cpp
nsCommandLineServiceMac.h
nsConsoleWriter.cpp Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan 2018-03-16 14:29:15 +01:00
nsEmbedFunctions.cpp Bug 1481009 Part 1 - Enable the crash reporter exception handler in recording, replaying, and middleman processes, r=gsvelto. 2018-08-13 20:45:59 +00:00
nsEmbeddingModule.cpp Bug 1432285 - Implement an nsPrintingPromptService::GetSingleton method and make XPCOM use that. r=bobowen 2018-01-16 11:47:19 +00:00
nsGDKErrorHandler.cpp
nsGDKErrorHandler.h Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman 2018-01-09 11:51:07 +01:00
nsIAppStartupNotifier.h
nsINativeAppSupport.idl
nsIWinAppHelper.idl
nsNativeAppSupportBase.cpp
nsNativeAppSupportBase.h
nsNativeAppSupportCocoa.mm Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
nsNativeAppSupportDefault.cpp
nsNativeAppSupportUnix.cpp Bug 1443892 - Add -MOZ_LOG and -MOZ_LOG_FILE command line arguments. r=erahm, r=nfroyd 2018-04-03 11:32:00 -04:00
nsNativeAppSupportWin.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsNativeAppSupportWin.h
nsSigHandlers.cpp Bug 1401776 - Raise fd limit to 4096 on Unix. r=glandium,mcmanus 2018-05-10 17:36:32 -06:00
nsSigHandlers.h
nsUpdateDriver.cpp Bug 1463560: Part 1: Re-add the -os-restarted arg when launching after an update. r=mhowell 2018-05-27 12:22:05 -07:00
nsUpdateDriver.h
nsWindowsRestart.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsWindowsWMain.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsX11ErrorHandler.cpp Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman 2018-01-10 08:52:04 +01:00
nsX11ErrorHandler.h
nsXREDirProvider.cpp Bug 1470324 - Don't load enterprise policies in the content during startup. r=kmag 2018-07-27 14:50:55 -03:00
nsXREDirProvider.h Bug 1386404 - Enable content-process specific tmpdir on Linux. r=jld 2018-01-09 16:29:40 +01:00
platform.ini
updaterfileutils_osx.h
updaterfileutils_osx.mm