Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 06a6d6e207 Bug 1407858 part 1. Give DOMString setter APIs clearer names. r=smaug
The renaming here is like this:

  SetStringBuffer -> SetKnownLiveStringBuffer
  SetEphemeralStringBuffer -> SetStringBuffer
  SetOwnedString -> SetKnownLiveString
  SetOwnedAtom -> SetKnownLiveAtom

This should make it clearer what the lifetime expectations are on the caller side.

MozReview-Commit-ID: ERHbB3r6paN
2017-12-22 13:02:51 -05:00
Nicholas Nethercote f2d1f3b005 Bug 1407117 - Simplify static atom representation. r=froydnj,bz.
Currently nsAtom::mString points to the interior of an nsStringBuffer. For
static atoms this requires the use of nsFakeStringBuffer, which is pretty
gross.

This patch changes things so that nsAtom::mString points to a static char
buffer for static atoms. This simplifies a number of things:

- nsFakeStringBuffer and CheckStaticAtomSizes are no longer needed.

- FakeBufferRefCountHelper is no longer needed.

- nsAtom's constructor for static atoms is simpler.

- RegisterStaticAtoms() is simpler.

On the flip-side, a couple of things get more complicated.

- nsAtom::ToString() treats static and dynamic atoms differently.

- nsAtom::GetStringBuffer() is now only valid for dynamic atoms. This
  function is only used in two places, both involving DOMString, so those
  locations are updated appropriately. This also requires updating some other
  code assigning nsStrings to DOMStrings, because we can't assume that
  nsStrings are shared.

On Linux64 this change reduces the size of the binary by 8752 B, and moves
81968 B from the .data to the .rodata section, where it can be shared between
processes.

--HG--
extra : rebase_source : 0f6fcdec1c525aa66222e208b66a9f9026f69bcb
2017-10-12 10:52:17 +11:00
Ben Kelly 4ffa062ade Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
Boris Zbarsky ffe339f775 Bug 1330759 part 4. Change XMLHttpRequest's responseText getter to take a DOMString, not an nsAString. r=froydnj 2017-01-18 22:20:15 -05:00
Andrea Marchesini 2dba3e889e Bug 1324430 - Implement nsTSubstring_CharT::Assign with length for a better string buffer sharing, r=froydnj 2016-12-23 17:22:21 +01:00
Andrea Marchesini 4f62933f76 Bug 1303095 - XMLHttpRequestString should be fallible, r=mccr8 2016-09-16 00:09:17 +02:00
Andrea Marchesini 284e7077e7 Bug 1249739 - Improve performance in XHR in workers - part 3 - Implement XMLHttpRequestStringSnapshot, r=smaug 2016-09-12 09:06:33 +02:00
Andrea Marchesini def1f6e7db Bug 1249739 - Improve performance in XHR in workers - part 2 - Implement XMLHttpRequestString, r=smaug 2016-09-12 09:06:06 +02:00