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

17648 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote bac452f9ad Bug 1411469 - Statically allocate static atoms. r=froydnj
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.

This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)

Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.

The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)

The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
  disable warnings about (well-defined!) overflow of unsigned integer
  arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
  MSVC follow the C++ standard(!) and let constexpr variables have external
  linkage.
- The use of -constexpr:steps300000 to increase the number of operations
  allowed in a constexpr value, in order to handle gGkAtoms, which requires
  hashing ~2,500 atom strings.

The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.

There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().

Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.

MozReview-Commit-ID: 4AxPv05ngZy
2018-03-26 11:18:31 +02:00
Ryan VanderMeulen 4f5bc80db3 Bug 1448472 - Remove a C5037 warning suppression xpcom/string/moz.build that is no longer needed. r=xidorn 2018-03-24 12:19:44 -04:00
L. David Baron 1da1c4f2be Bug 1448138 - Rename string DataFlags::SHARED to REFCOUNTED to make it clearer to those reading the code. r=erahm
MozReview-Commit-ID: 1mJuwY5dQkj

--HG--
extra : transplant_source : %B8%97%C2%AAa%A6%3D%E3%AC%9C%C1%15%99%FE%94%1A%E2K%81%F1
2018-03-23 17:31:37 -07:00
Steve Fink e0f4a04fd4 Bug 1447391 - Early return for strings and symbols when tracing for CC, r=mccr8
--HG--
extra : rebase_source : f4512c0ab8d7aac3f274d38b96594eb65fb149dd
2018-03-20 10:54:29 -07:00
Gurzau Raul 390957966b Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-24 00:08:02 +02:00
Nathan Froyd efd709bd4f Bug 1447744 - don't implement nsINamed for mozilla::Runnable when it's unused; r=erahm
We only use nsINamed on runnables for certain kinds of telemetry, and
those kinds of telemetry aren't being gathered on RELEASE_OR_BETA
builds.  We effectively make nsINamed::GetName a no-op when we're not
collecting said telemetry.  But implementing nsINamed does have a cost:
the vtable of every runnable (and we have hundreds of subclasses of
mozilla::Runnable) will contain pointers for GetName (and extra pointers
for QueryInterface/AddRef/Release), and all those pointers times all
those subclasses adds up quickly.  Let's not implement nsINamed when
nsINamed isn't going to be used.

This change saves ~100K of binary size on x86-64 Linux; the savings
should be similar on other 64-bit systems, and ~50K on 32-bit systems.
2018-03-23 14:53:55 -04:00
Narcis Beleuzu cd3a1211e2 Merge inbound to mozilla-central. a=merge 2018-03-23 11:51:38 +02:00
Noemi Erli 1270a21724 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-23 01:00:18 +02:00
Noemi Erli b32b2756aa Merge inbound to mozilla-central. a=merge 2018-03-23 00:53:07 +02:00
Petr Sumbera c5a5409300 Bug 1446272 - Provide ResidentUniqueDistinguishedAmount() for Solaris. r=froydnj 2018-03-22 06:14:19 -07:00
Nicholas Nethercote d81eb773d4 Bug 1445892 - Remove nsDirectoryService::sOS_HomeDirectory atom. r=froydnj
nsGkAtoms::Home and nsDirectoryAtoms::sOS_HomeDirectory are duplicate static
atoms. This patch comments out the latter to remove the duplication.

MozReview-Commit-ID: LGkjZn0zaoz
2018-03-22 19:07:40 +11:00
Timothy Guan-tin Chien 8bc65dd64e Bug 1446157 - Remove unused grippy binding r=enndeakin+6102
MozReview-Commit-ID: KWC9HpTzig

--HG--
extra : rebase_source : 7b6b24330d072d5126851c63614ba91f4315ddc9
2018-03-20 17:21:19 +08:00
Boris Zbarsky 35d4bc91ec Bug 1444143 part 13. Remove nsIFrameLoader. r=mystor
MozReview-Commit-ID: 4LG8nIePsMH
2018-03-21 22:43:17 -04:00
arthur.iakab 5e8092339a Merge mozilla-central to inbound
--HG--
rename : browser/base/content/test/general/bug364677-data.xml => browser/components/feeds/test/bug364677-data.xml
rename : browser/base/content/test/general/bug364677-data.xml^headers^ => browser/components/feeds/test/bug364677-data.xml^headers^
rename : browser/base/content/test/general/test_bug364677.html => browser/components/feeds/test/test_bug364677.html
rename : services/sync/tps/extensions/tps/bootstrap.js => services/sync/tps/extensions/tps/components/tps-cmdline.js
rename : testing/talos/talos/pageloader/bootstrap.js => testing/talos/talos/pageloader/components/tp-cmdline.js
rename : testing/talos/talos/startup_test/sessionrestore/addon/bootstrap.js => testing/talos/talos/startup_test/sessionrestore/addon/SessionRestoreTalosTest.js
rename : testing/talos/talos/talos-powers/bootstrap.js => testing/talos/talos/talos-powers/components/TalosPowersService.js
rename : tools/quitter/bootstrap.js => tools/quitter/QuitterObserver.js
extra : rebase_source : 5801e95a945b54754f27571e7b211e1eac132d67
2018-03-21 22:27:21 +02:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Paul Adenot 816186a405 Bug 1447622 - Add a way to output raw MOZ_LOG, without prefixes. r=erahm
MOZ_LOG=modules:4,raw now outputs the log without prefixes with the thread name
and date and stuff, just the exact string that was specified.

MozReview-Commit-ID: HACT5EM4BFm

--HG--
extra : rebase_source : 93590ee405f013791ad63565be6e6d83cad3567f
extra : source : d79d7130b28275c8eb2a475bdc685a345b070888
2018-03-21 12:11:17 +01:00
Kris Maglione 5edc701bb6 Bug 1446585: Remove support for resource entries in bootstrapped chrome.manifest files. r=aswan,MattN,k88hudson
MozReview-Commit-ID: EjymzU6koYX

--HG--
extra : rebase_source : 7b4fc250b5be0f2c16f3797eafb61e7c3955309d
2018-03-16 20:18:46 -07:00
Peter Van der Beken f5754d679a Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : 5911f91bd7a63cd3603494e087e3858bd0527500
2018-03-01 20:19:56 +01:00
David Keeler bd19496187 bug 1437128 - enforce that NSS_Shutdown succeeds on debug, non-android platforms (to prevent NSS resource leaks) r=erahm
--HG--
extra : rebase_source : dc6871d6fd3be8e6b186c78df2435e151bc1e61a
extra : amend_source : 59ca2abfcd04a8741ef14d65f8385ed9469aec70
2018-02-09 12:11:15 -08:00
Boris Zbarsky 837dc7eaaa Bug 1446711 part 8. Get rid of nsIDOMMouseEvent. r=qdot
MozReview-Commit-ID: 2FK1MA4LGZj
2018-03-20 00:16:07 -04:00
Boris Zbarsky 1a7c5067ca Bug 1446851. Get rid of nsIDOMWheelEvent. r=qdot
We can't include WheelEventBinding.h in MouseEvents.h because that produces
this include loop:

WheelEventBinding.h -> MouseEventBinding.h -> UIEventBinding.h ->
nsGlobalWindow.h -> nsGlobalWindowInner.h -> nsRefreshDriver.h ->
AnimationEventDispatcher.h -> AnimationComparator.h -> Animation.h ->
EffectCompositor.h -> PseudoElementHashEntry.h -> Element.h ->
PointerEventHandler.h -> MouseEvents.h -> WheelEventBinding.h

MozReview-Commit-ID: 5KNwH69aJYW
2018-03-20 00:16:05 -04:00
Nicholas Nethercote 2211e2da6f Bug 1446865 - Rename various AddRefTable() functions as RegisterStaticAtoms. r=froydnj
These functions no longer perform any refcounting, so the existing names are
misleading.

MozReview-Commit-ID: LX55e0bUP8N

--HG--
extra : rebase_source : 89a3da577325286c1d31723acfd4153754f49703
2018-03-20 13:01:30 +11:00
Nicholas Nethercote db20ce5cdf Bug 1446865 - Introduce nsStaticAtomUtils::Lookup. r=froydnj
This function captures a common usage pattern, generalizing the existing
IsMember() function.

MozReview-Commit-ID: 5Pt7kqyGD6Y

--HG--
extra : rebase_source : b03e4cc8f5a4a25da9236420f4b64493664b70e0
2018-03-20 13:01:28 +11:00
Nicholas Nethercote b719af74df Bug 1446865 - Move nsAtomListUtils. r=froydnj
It seems silly to have a tiny utils class with a single function in its own
module. This patch moves it into nsStaticAtom.h/nsAtomTable.cpp. It also
renames nsAtomListUtils as nsStaticAtomUtils. Finally, it uses templates to
remove the need for the `aCount` parameter at callsites.

MozReview-Commit-ID: DvJVoZFv89c

--HG--
extra : rebase_source : 1f1dd27d56e46c71c30c10102ac6132a721e23d1
2018-03-20 11:44:28 +11:00
Emilio Cobos Álvarez 500ff7c746 Bug 1446342: Don't include forms in the scope chain for XBL datetime bindings. r=smaug
Reviewers: smaug

Bug #: 1446342

Differential Revision: https://phabricator.services.mozilla.com/D769

MozReview-Commit-ID: HK7nChYf0X6
2018-03-20 01:34:09 +01:00
Narcis Beleuzu 15414c4ffe Merge nozilla-central to autoland. a=merge CLOSED TREE 2018-03-23 12:04:15 +02:00
Henri Sivonen 21af10d5f4 Bug 1445692 - Remove UTF8InputStream. r=froydnj
MozReview-Commit-ID: 1az5nkKTkru

--HG--
extra : rebase_source : 6a21b4dad71ea351a51c741977b36dfb562c608b
2018-03-14 20:53:18 +02:00
Andreea Pavel 62b7a93603 Backed out 3 changesets (bug 1446157) for browser chrome failures at browser/base/content/test/static/browser_all_files_referenced.js on a CLOSED TREE
Backed out changeset 2491f8caeffa (bug 1446157)
Backed out changeset be65061c2d72 (bug 1446157)
Backed out changeset de560a993de1 (bug 1446157)
2018-03-22 18:49:31 +02:00
Timothy Guan-tin Chien aa45f889db Bug 1446157 - Remove unused grippy binding r=enndeakin+6102
MozReview-Commit-ID: KWC9HpTzig

--HG--
extra : rebase_source : 382083ebb3fd2d1b10c70df314bd67ce5ded1f08
2018-03-20 17:21:19 +08:00
Andrew McCreight 81b1d1c977 Bug 1447849 - Eliminate the anonymous union from XPTTypeDescriptor. r=njn
For bug 1438688, I need to statically initialize all of the data types
in xpt_struct.h. It turns out that the approach I was using for unions
is C99 and not C++. While for some reason Clang and GCC are okay with
that, MSVC is not.

One of the unions is a gnarly anonymous union in
XPTTypeDescriptor. However, every arm of this union is either 1 or 2
uint8_t, so I think it is reasonable to eliminate the union and
replace it with two fields, mData1 and mData2. I've fixed up the
places that read this data to use accessor methods with nice asserts
about the tag on the variant, so if anything I think that part is
nicer.

The code in xpt_struct.cpp that writes to this data is maybe less
nice, but I'm deleting it in bug 1438688 so I think that's okay. We
also lose some detail in the comments about the relationship between
what is stored in memory compared to what is stored on disk, but I
think that's okay, too.

MozReview-Commit-ID: DGi19f8HnMi

--HG--
extra : rebase_source : e3535ecb3d7f02bdb643df153e8aba3e106d9104
2018-03-21 16:35:55 -07:00
Andreas Pehrson 8bb83ab05d Bug 1351655 - Log which SharedThreadPools are not yet destroyed on shutdown-threads. r=froydnj
We risk a shutdown hang without any clues if a dangling reference somewhere
keeps a SharedThreadPool alive past xpcom-shutdown-threads. This because
xpcom-shutdown-threads waits for all SharedThreadPool to be destroyed before
advancing shutdown further. nsCycleCollector::Shutdown comes after
xpcom-shutdown-threads so it is possible that a reference-cycle unexpectedly
keeps a SharedThreadPool alive and blocks shutdown indefinitely.

This patch attempts to help diagnose future cases like this by printing which
SharedThreadPools we are going to wait for to stderr.

MozReview-Commit-ID: CwTApYUMikA

--HG--
extra : rebase_source : f29d04508cf492c82d65f324d7b1990849a0da13
2018-01-23 11:40:37 +01:00
Boris Zbarsky 5f74b75e04 Bug 1446850. Get rid of nsIDOMMouseScrollEvent. r=qdot
MozReview-Commit-ID: ZT9E3Fhtw0
2018-03-19 15:50:56 -04:00
Boris Zbarsky d05e564049 Bug 1446710. Get rid of nsIDOMXULCommandEvent. r=qdot
MozReview-Commit-ID: C2C6oWtagG3
2018-03-19 15:50:37 -04:00
Boris Zbarsky 5c19641a68 Bug 1446709. Get rid of nsIDOMScrollAreaEvent. r=qdot
MozReview-Commit-ID: IXixthbqXqM
2018-03-19 15:50:22 -04:00
Boris Zbarsky 5b34d749e4 Bug 1446708. Get rid of nsIDOMFocusEvent. r=qdot
MozReview-Commit-ID: ChTQpN6EzdC
2018-03-19 15:50:19 -04:00
Boris Zbarsky 2f66e620e3 Bug 1446533 part 12. Remove nsIDOMCharacterData. r=mystor
MozReview-Commit-ID: KXex3Rjcire
2018-03-19 15:47:42 -04:00
Boris Zbarsky b990bb4bdb Bug 1446599 part 4. Remove nsIDOMProcessingInstruction. r=mystor
MozReview-Commit-ID: EZVcDlMO3ev
2018-03-19 15:15:40 -04:00
Boris Zbarsky 4fa4d2a7f5 Bug 1446598 part 2. Get rid of nsIDOMComment. r=mystor
MozReview-Commit-ID: GGXPQnlwuUM
2018-03-19 15:15:39 -04:00
Boris Zbarsky 46cdbdc51b Bug 1433566 part 13. Remove nsIDOMText. r=mystor
MozReview-Commit-ID: DvaZ96j5exf
2018-03-19 15:15:39 -04:00
Samuel Thibault 39ed413777 Bug 1346535 - atk: Introduce U+FEFF characters to match AT-SPI offsets with DOM offsets. r=surkov, r=dbaron 2018-03-16 15:57:00 -04:00
Bogdan Tara 7eb4cdd58d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-17 12:34:09 +02:00
Boris Zbarsky 4fbe59c404 Bug 1445417 part 4. Remove nsIDOMDragEvent. r=mystor
MozReview-Commit-ID: 6hQ7mHLaLcx
2018-03-16 22:25:25 -04:00
Adrian Wielgosik 87a72d3f51 Bug 1446515 - Remove nsIDOMFileList. r=bz
MozReview-Commit-ID: 4ab1e6NTcOB

--HG--
extra : rebase_source : 09388e531e2bcc6a133cc1ec76946a79ddf2bcb0
2018-03-16 20:55:32 +01:00
Dorel Luca 17320c327a Backed out changeset a66043ecf949 (bug 1346535) for build bustages 2018-03-17 00:08:00 +02:00
Samuel Thibault 57a8fb9615 Bug 1346535 atk: Introduce U+FEFF characters to match AT-SPI offsets with DOM offsets r=surkov 2018-03-16 05:11:00 +02:00
Gurzau Raul 3057041352 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-16 19:58:27 +02:00
Andrew McCreight d423a14b35 Bug 1446200 - Add a helper method to encode Method flags. r=froydnj
Most of the classes in xpt.py define a helper method to encode the
values of the flags into a byte, but for some reason Method does
not. It'll be useful to have one for Method for the C++ backend I am
working on.

MozReview-Commit-ID: ESi1CnstbN2

--HG--
extra : rebase_source : 23822e7770e9a3d1b5a2359ae9753f950af3a121
2018-03-15 15:46:08 -07:00
Gijs Kruitbosch 4fe837deef Bug 1445990 - fix initialization of blocklist service in non-browser apps, r=florian
MozReview-Commit-ID: GK4SA8gJ8Pf

--HG--
extra : rebase_source : ad3ff814d634e885da37e16801d701fd79f78ea3
2018-03-15 16:16:11 +00:00
Boris Zbarsky 46fc331568 Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn
Most of the noise is from the fact that clang-format on parser/html/*.{h,cpp}
reformatted all sorts of stuff.  Not running it caused lots of format changes
from the generator... I guess we changed the format rules since the last time
this got run?

MozReview-Commit-ID: IA2G87zUIKN
2018-03-16 11:26:06 -04:00
Sebastian Hengst 1e30b1a1f4 Bug 1445926 - Only run GTest TestThreadMetrics if RELEASE or BETA are not set. r=tarek
MozReview-Commit-ID: I04MxVtBqa1

--HG--
extra : rebase_source : d8971343d76448341e9ca6de80de18eee79d95f0
2018-03-15 13:54:13 +01:00