gecko-dev/docshell/base
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
..
crashtests Bug 443655 - Add crashtest. r=me 2017-10-18 09:43:10 -04:00
timeline Bug 1475559 part 2 - Rename JS::IsSavedFrame to JS::IsMaybeWrappedSavedFrame and do some minor cleanup. r=bz 2018-07-21 14:32:25 +02:00
BrowsingContext.cpp Bug 1445659 - Remove dangling BrowsingContexts left from closing process. r=Nika 2018-06-29 02:41:00 +03:00
BrowsingContext.h Bug 1445659 - Remove dangling BrowsingContexts left from closing process. r=Nika 2018-06-29 02:41:00 +03:00
IHistory.h Bug 1463132 - New autofill threshold doesn't work well with redirects. r=adw 2018-05-23 16:49:06 +02:00
LoadContext.cpp Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
LoadContext.h
SerializedLoadContext.cpp Bug 1453795 - docshell - Initialize member fields in classes/ structures. r=smaug 2018-06-18 10:23:57 +03:00
SerializedLoadContext.h
moz.build Bug 1480641 - Remove nsITextScroll; r=nika 2018-08-07 17:28:16 -07:00
nsAboutRedirector.cpp Bug 1462702 - Add about:crashparent and about:crashcontent r=ehsan 2018-05-18 17:12:43 -05:00
nsAboutRedirector.h
nsCDefaultURIFixup.idl
nsCTooltipTextProvider.h
nsDSURIContentListener.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsDSURIContentListener.h Bug 1412824: Refactor MaybeCloseWindow and allow to reuse the window close code from within nsExternalHelperAppService as well as nsDSURIContentListener. r=smaug 2017-11-03 13:23:25 +01:00
nsDefaultURIFixup.cpp Bug 1435319, r=valentin 2018-06-13 08:15:40 -07:00
nsDefaultURIFixup.h Bug 1433958 - Change code that sets nsIURI.host to use nsIURIMutator r=mayhemer 2018-02-26 20:43:47 +01:00
nsDocShell.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsDocShell.h Bug 1480641 - Remove nsITextScroll; r=nika 2018-08-07 17:28:16 -07:00
nsDocShellEditorData.cpp Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz 2018-05-11 19:46:15 +02:00
nsDocShellEditorData.h Bug 1387406 - part1: nsDocShellEditorData should store editor as HTMLEditor r=smaug 2017-08-04 21:42:13 +09:00
nsDocShellEnumerator.cpp
nsDocShellEnumerator.h Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
nsDocShellLoadInfo.cpp Bug 1468523 - Fix the history entry for http-equiv=refresh. r=smaug 2018-07-26 15:31:59 +03:00
nsDocShellLoadInfo.h Bug 1468523 - Fix the history entry for http-equiv=refresh. r=smaug 2018-07-26 15:31:59 +03:00
nsDocShellLoadTypes.h Bug 1472087 - Remove nsDocShellLoadInfo::LoadTypes; r=nika 2018-07-11 20:19:18 -07:00
nsDocShellTreeOwner.cpp Bug 1482665 Part 2 - Remove nsPresContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert 2018-08-13 14:29:28 -07:00
nsDocShellTreeOwner.h Bug 1468872 - remove unused nsICDocShellTreeOwner class; r=smaug 2018-06-14 19:18:47 -04:00
nsIContentViewer.idl Bug 1455676 part 6. Remove nsIDOMNode usage from docshell/. r=qdot 2018-05-29 22:58:48 -04:00
nsIContentViewerEdit.idl Bug 1455676 part 6. Remove nsIDOMNode usage from docshell/. r=qdot 2018-05-29 22:58:48 -04:00
nsIDocShell.idl Bug 1441059 - Make nsILoadURIDelegate async to preserve the order of GeckoSession.loadUri() calls. r=snorp,bz 2018-08-07 13:42:07 -05:00
nsIDocShellTreeItem.idl Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures 2018-07-29 03:55:23 +03:00
nsIDocShellTreeOwner.idl
nsIDocumentLoaderFactory.idl
nsILinkHandler.h Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 9 - necko and docShell, r=mayhemer, r=smaug 2018-05-23 07:12:36 +02:00
nsILoadContext.idl Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
nsIPrivacyTransitionObserver.idl
nsIReflowObserver.idl
nsIRefreshURI.idl Bug 1416307 - Set triggeringPrincipal to current document's principal, if aPrincipal is not given. r=bz 2018-02-06 13:28:30 -05:00
nsIScrollObserver.h Bug 1293362 - Part 4: Generate runtime bindings for calling xpcom methods from rust, r=froydnj 2018-01-23 17:27:26 -05:00
nsIScrollable.idl
nsITooltipListener.idl
nsITooltipTextProvider.idl Bug 1455676 part 6. Remove nsIDOMNode usage from docshell/. r=qdot 2018-05-29 22:58:48 -04:00
nsIURIFixup.idl
nsIWebNavigation.idl Bug 1474835 - Use implicit_jscontext for nsIWebNavigation.setOriginAttributesBeforeLoading. r=smaug 2018-07-11 15:23:54 +02:00
nsIWebNavigationInfo.idl
nsIWebPageDescriptor.idl
nsPingListener.cpp Bug 1328695 - Use protocol flags to determine if a URI is potentially trustworthy r=ckerschb, r=dveditz, r=mcmanus, r=bz 2018-05-31 07:51:42 +02:00
nsPingListener.h Bug 1406161 - Part 4: Move nsPingListener and nsRefreshTimer to separate files. r=smaug 2017-12-18 20:19:36 -06:00
nsRefreshTimer.cpp Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor 2018-02-12 14:36:46 -05:00
nsRefreshTimer.h Bug 1406161 - Part 4: Move nsPingListener and nsRefreshTimer to separate files. r=smaug 2017-12-18 20:19:36 -06:00
nsWebNavigationInfo.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsWebNavigationInfo.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00