gecko-dev/uriloader/exthandler
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
..
android Bug 986975 - do_QueryInterface abuse in nsAndroidHandlerApp.cpp. r=mak 2017-04-24 11:29:35 +01:00
mac Bug 1376638 - Minimize uses of prmem.h. r=glandium. 2017-06-30 19:05:41 -07:00
tests Bug 1373109 - Add a mochitest for the auto-closing behavior. r=mconley 2017-06-21 17:33:40 -07:00
uikit
unix Bug 1346859 - Remove dead code found by clang-tidy in unix/nsOSHelperAppService.cpp r=froydnj 2017-03-13 18:09:02 +01:00
win Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj. 2017-06-20 19:19:05 +10:00
ContentHandlerService.cpp
ContentHandlerService.h
ExternalHelperAppChild.cpp Bug 1350058 - Update the content context if we close the downloading window. r=mconley 2017-03-23 17:01:30 -07:00
ExternalHelperAppChild.h Bug 1350058 - Update the content context if we close the downloading window. r=mconley 2017-03-23 17:01:30 -07:00
ExternalHelperAppParent.cpp Bug 1354349 - Add nsIChannel.isDocument that checks if LOAD_DOCUMENT_URI is set, or if LOAD_HTML_OBJECT_DATA and the channel has the appropriate MIME type r=mcmanus,mystor 2017-04-20 10:15:06 +08:00
ExternalHelperAppParent.h Bug 1350058 - Update the content context if we close the downloading window. r=mconley 2017-03-23 17:01:30 -07:00
HandlerServiceChild.h
HandlerServiceParent.cpp
HandlerServiceParent.h
PExternalHelperApp.ipdl Bug 1350058 - Update the content context if we close the downloading window. r=mconley 2017-03-23 17:01:30 -07:00
PHandlerService.ipdl
moz.build Bug 1357323 - Remove support for gonk in the build system. r=gps 2017-04-18 16:56:09 +09:00
nsCExternalHandlerService.idl
nsContentHandlerApp.cpp
nsContentHandlerApp.h
nsDBusHandlerApp.cpp
nsDBusHandlerApp.h
nsExternalHelperAppService.cpp Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk. 2017-07-12 15:13:37 +10:00
nsExternalHelperAppService.h Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj. 2017-06-20 19:19:52 +10:00
nsExternalProtocolHandler.cpp Bug 1354349 - Add nsIChannel.isDocument that checks if LOAD_DOCUMENT_URI is set, or if LOAD_HTML_OBJECT_DATA and the channel has the appropriate MIME type r=mcmanus,mystor 2017-04-20 10:15:06 +08:00
nsExternalProtocolHandler.h
nsHandlerService-json.js Bug 1374282 - script generated patch to remove useless bind calls, r=Mossop. 2017-06-22 12:51:42 +02:00
nsHandlerService-json.manifest Bug 1287658 - Migrate from "mimeTypes.rdf" to "handlers.json". r=mak 2017-04-15 12:16:59 +01:00
nsHandlerService.js Bug 1355585 - Streamline the format of "handlers.json", align the implementation, and reorganize tests. r=mak 2017-04-24 11:29:46 +01:00
nsHandlerService.manifest Bug 1287658 - Migrate from "mimeTypes.rdf" to "handlers.json". r=mak 2017-04-15 12:16:59 +01:00
nsIContentDispatchChooser.idl
nsIExternalHelperAppService.idl
nsIExternalProtocolService.idl
nsIExternalSharingAppService.idl
nsIExternalURLHandlerService.idl
nsIHandlerService.idl
nsIHelperAppLauncherDialog.idl
nsLocalHandlerApp.cpp
nsLocalHandlerApp.h
nsMIMEInfoImpl.cpp
nsMIMEInfoImpl.h
nsWebHandlerApp.js Bug 1364016 - Explicitly pass a triggeringPrincipal to openURI. r=gijs,baku 2017-07-05 21:58:21 +02:00
nsWebHandlerApp.manifest