mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Make DOMString a regular nsAutoTString with some special methods for performance in some hot getters. For that, we need to change a bit nsTString: * Support for unowned buffers: Owned buffers now are represented by STRINGBUFFER|OWNED flags, rather than REFCOUNTED. * Inlining of the destructor: It showed up in profiles, it's also just a few instructions, so probably worth it. We could OOL the owned path I guess, if we wanted to. * Inlinling and reordering of NonVoidStringToJsval. Old code had special DOMString path inline with [buffer, literal, copy] paths, then out of line code with [literal, buffer, copy]. Instead, consolidate everything in a [buffer, literal, copy] inline path. Do the same for UTF8/Latin1 strings too for consistency. Differential Revision: https://phabricator.services.mozilla.com/D288148