gecko-dev/uriloader/exthandler
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
..
android Bug 1448025 - make some Android-only uriloader constructors explicit; r=mystor 2018-03-27 10:51:31 -04:00
mac Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
tests Bug 1446940 part 5. Stop getting docshells from windows via getInterface in dom/editor/etc code. r=kmag 2018-08-01 13:07:11 -04:00
uikit Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
unix Bug 1463809 - Don't lookup mimeinfo of application/octet-stream; r=Paolo 2018-07-19 15:46:26 +02:00
win Bug 1447080 - Remove SEE_MASK_FLAG_NO_UI for better Windows 10 compatibility. r=dparks 2018-03-26 08:55:21 -05:00
ContentHandlerService.cpp Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
ContentHandlerService.h
DBusHelpers.h Bug 1413044 - Move DBusHelper.h in uriloader/exthandler, r=smaug 2017-11-01 23:24:38 +01:00
ExternalHelperAppChild.cpp Bug 1437114 - ExternalHelperAppChild should send data to the parent actor in chunks, r=froydnj 2018-02-12 17:41:34 +01:00
ExternalHelperAppChild.h
ExternalHelperAppParent.cpp Bug 1453795 - docshell - Initialize member fields in classes/ structures. r=smaug 2018-06-18 10:23:57 +03:00
ExternalHelperAppParent.h Bug 1453795 - docshell - Initialize member fields in classes/ structures. r=smaug 2018-06-18 10:23:57 +03:00
HandlerService.js Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
HandlerService.manifest Bug 474043 - Part 5 - Remove the json suffix from nsHandlerService. r=Paolo 2018-03-15 14:44:00 +01:00
HandlerServiceChild.h Bug 1389836 - Put HandlerServiceChild in the proper namespace. r=bz 2017-10-25 14:58:50 -07:00
HandlerServiceParent.cpp Bug 1453795 - docshell - Initialize member fields in classes/ structures. r=smaug 2018-06-18 10:23:57 +03:00
HandlerServiceParent.h
moz.build Bug 474043 - Part 5 - Remove the json suffix from nsHandlerService. r=Paolo 2018-03-15 14:44:00 +01:00
nsCExternalHandlerService.idl
nsContentHandlerApp.h
nsDBusHandlerApp.cpp Bug 1412258 - Get rid of ipc/dbus, r=smaug 2017-10-27 18:41:40 +02:00
nsDBusHandlerApp.h
nsExternalHelperAppService.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsExternalHelperAppService.h Bug 1453795 - docshell - Initialize member fields in classes/ structures. r=smaug 2018-06-18 10:23:57 +03:00
nsExternalProtocolHandler.cpp Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
nsExternalProtocolHandler.h
nsIContentDispatchChooser.idl
nsIExternalHelperAppService.idl
nsIExternalProtocolService.idl
nsIExternalSharingAppService.idl
nsIExternalURLHandlerService.idl
nsIHandlerService.idl
nsIHelperAppLauncherDialog.idl
nsLocalHandlerApp.cpp
nsLocalHandlerApp.h
nsMIMEInfoImpl.cpp Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor 2018-02-12 14:36:46 -05:00
nsMIMEInfoImpl.h Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
nsWebHandlerApp.js Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
nsWebHandlerApp.manifest
PExternalHelperApp.ipdl
PHandlerService.ipdl Bug 1389836 - Push extensions from MIME info objects to the child. r=bz 2017-11-01 17:49:22 -07:00