The current code for resizing PLDHashTable modifies the cached hash for
all entries in the old hash table. This is unnecessary, because we're
going to throw away the old hash table shortly, and inefficient, because
writing to memory we're never going to use again just wastes time and
memory bandwidth. Instead, let's avoid the write by pulling out the
cached key and doing the necessary manipulation on local variables,
which is probably slightly faster.
This alters nsILoadURIDelegate.loadURI() to return a Promise rather than spinning the event loop to synchronously return a boolean, and alters nsDocShell::InternalLoad to allow for those changes by re-calling itself if necessary based on the resolution of the promise.
For the IPC work monitoring when textures become unlocked, we
need a Monitor equivalent of StaticMutex - this implements that.
MozReview-Commit-ID: IceQNeqVQ8f
--HG--
extra : rebase_source : b05f8fe9b87e47e57ef8450c91edfdd9244d3287
For the IPC work monitoring when textures become unlocked, we
need a Monitor equivalent of StaticMutex - this implements that.
MozReview-Commit-ID: IceQNeqVQ8f
--HG--
extra : rebase_source : 184750cfde201ef0ce7e70301761e3e51e82b3a3
Similar to the previous part, we convert mBreakpadId to an nsCString to
avoid issues with locale-dependent std::string operations.
There are a lot of non-profiler changes here because a bunch of things
depend on the SharedLibrary object that the profiler defines.
Later patches add support for Windows. OS-X will need a follow-up.
MozReview-Commit-ID: DDd6uir4KzM
--HG--
extra : source : b4394660fde2b05e972c491246570d8f79d8a7c6
extra : absorb_source : 063bc5db64faa9311ac9db99259cd477fb8fcf7e
The only real way to get memory mapping information on Linux is to read and
parse /proc/self/maps, and infer information about a specific pointer based on
its contents.
This patch adds a helper which parses the entire contents of smaps, and
returns an array of objects describing each region. It also updates resident
unique reporter to use that helper. Later patches use it to map stack base
addresses to VM regions, and report their usage data.
MozReview-Commit-ID: 8VUu1kMT77L
--HG--
extra : source : e89ebe1f22f28d2b667514cb66d39606136a2f58
extra : absorb_source : 86ad16750144e02b9fbe84390eeab6c1917b379d
This change stores the base allocation address and actual allocated stack size
(as opposed to the requested size, which may be 0), so that we can map them to
VM regions in a memory reporter.
MozReview-Commit-ID: IZbbyQ9pKHr
--HG--
extra : source : 391b97f0e5c029880d4a1ae697463cfcb8839116
This will allow us to enumerate active threads in order to report their
memory.
MozReview-Commit-ID: IExELSkFdwB
--HG--
extra : source : 2916b5e05b6d100e91448f21cb4082e41a86e87c
Later patches add support for Windows. OS-X will need a follow-up.
MozReview-Commit-ID: DDd6uir4KzM
--HG--
extra : rebase_source : a28826d3331d057f4d35bec56da7738a727d9768
The only real way to get memory mapping information on Linux is to read and
parse /proc/self/maps, and infer information about a specific pointer based on
its contents.
This patch adds a helper which parses the entire contents of smaps, and
returns an array of objects describing each region. It also updates resident
unique reporter to use that helper. Later patches use it to map stack base
addresses to VM regions, and report their usage data.
MozReview-Commit-ID: 8VUu1kMT77L
--HG--
extra : rebase_source : e9c233aa828b57efa5c0c154cdb9c7d049cc3312
This change stores the base allocation address and actual allocated stack size
(as opposed to the requested size, which may be 0), so that we can map them to
VM regions in a memory reporter.
MozReview-Commit-ID: IZbbyQ9pKHr
--HG--
extra : rebase_source : 1b61bfd63931ce9e2bf9a71905468336971d0956
This will allow us to enumerate active threads in order to report their
memory.
MozReview-Commit-ID: IExELSkFdwB
--HG--
extra : rebase_source : 94b63857357639b201b85bdd7bfc4fbe1d4b7f62
Summary: GTest is permafailing because of this test (GTest is always running over 1200s).
Reviewers: froydnj
Reviewed By: froydnj
Bug #: 1473531
Differential Revision: https://phabricator.services.mozilla.com/D2032
--HG--
extra : rebase_source : 07413c4d7ba4eb6bd1439f292bd489a775dab61b
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.
This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.
MozReview-Commit-ID: 9tLKBe10ddP
--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.
MozReview-Commit-ID: CToSEVp1oqP
--HG--
extra : intermediate-source : ff41551f5ff1b98b72ed771a6f2a3f66a8b79a57
extra : absorb_source : c9fe7423fcbb47655b05209b44fb02b69b272d07
extra : source : 4b7a8a35ed956159e2f443c6211164c0cbf3d926
extra : histedit_source : b98b792791274f00a5e649c82dc25043cc1d699a
Some callers of PLDHashTable::Search() use const_cast, some others are not
const methods due to non-const PLDHashTable::Search().
This patch removes const_cast from the former and mark some methods of the
latter const.
MozReview-Commit-ID: C8ayoi7mXc1
--HG--
extra : rebase_source : 2cba0339756e3278ba6e5f0e8a11e68217a61d34
PLDHashTable::Search() does not modify any members. So, this method and
methods called by it should be marked as const.
MozReview-Commit-ID: 6g4jrYK1j9E
--HG--
extra : rebase_source : eda6c50c538fec0e8c09cb2ba629735eea6ec711
This adds reporting of nsMemoryReporterManager's internals. Currently we just
report the weak and strong ref hashtables which have shown up in DMD reports.
The new entry is '/explicit/memory-reporter-manager'.
--HG--
extra : rebase_source : ab785a96a0dd52a4e09718bea015363cdf2c9c8a
extra : source : 86ba30c70a27ab73f096fe88d2005aad8470ee05
This adds reporting of nsMemoryReporterManager's internals. Currently we just
report the weak and strong ref hashtables which have shown up in DMD reports.
The new entry is '/explicit/memory-reporter-manager'.
--HG--
extra : rebase_source : 53e4cbf127101489edfe85f31088cd049369cef8
extra : histedit_source : 1575adfcfb9d6492a51ab84cf417e07466068939
We're changing the counters behavior since they are not notifications anymore.
In the new behavior they don't get reset when they are retrieved,
so we can have several consumers via the promise.
If the values overflow, we let the wrapping occur (unsigned values).
MozReview-Commit-ID: 1adkszScYo4
--HG--
extra : rebase_source : cd554ad4cfa643b09f75bb07e38b5d35e08cf470
The following was removed:
- the main meat of the overlays and interface in XULDocument
- all overlay observers and forward references
- the notion of a master document
- XUL overlay provider
- manifest parsing of overlay attribute
- references to "overlay" atom
- restrictions on persistence (only need because of overlays)
- unused code that the above referenced
I also attempted to update comments that referenced overlays, but there is still
some work to be done here.
MozReview-Commit-ID: 8lrirzcgSuJ
--HG--
extra : rebase_source : 25b4e1d3fb2af6f02d894887271fd345c9c2083b
Most preference callbacks use literal strings for their domain filters, which
means that there's no need to make copies of them at all. Currently, however,
every preference observer node makes a separate heap-allocated copy of its
domain string.
This patch switches the domain string storage to nsCString instances, which
dramatically reduces the amount of unnecessary copies, at the expense of
making the callback nodes slightly larger.
MozReview-Commit-ID: 8NA3t2JS2UI
--HG--
extra : rebase_source : 628ad9af65cec16fb8be0c8dddc608b5ee5602e2
Summary:
With this change TaskQueue no longer requires an explicit call to BeginShutdown(). The taskqueue will automatically shutdown once it's now longer referenced.
Depends on D1620
Tags: #secure-revision
Bug #: 1409664
Differential Revision: https://phabricator.services.mozilla.com/D1621
This also replaces the custom logic in ObserverList with an nsTObserverArray
which has all the necessary logic for stable iteration over a potentially
changing list of items. Unused dependencies were also removed.
--HG--
extra : source : 303478f7f248470a1c747f42dad9cb85c3129f0a
This also replaces the custom logic in ObserverList with an nsTObserverArray
which has all the necessary logic for stable iteration over a potentially
changing list of items. Unused dependencies were also removed.
--HG--
extra : source : 1a83516d2ee5939052c5fb226b81563a0d114ff9
This will make sure that when running |mach python-test --python 3| locally,
we only run the tests that also run in CI with python 3 (and therefore pass
presumably).
MozReview-Commit-ID: 3OBr9yLSlSq
--HG--
extra : rebase_source : 456340d0ecdddf1078f2b5b4ebb1eddf3813b26a
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.
MozReview-Commit-ID: 5UQVHElSpCr
--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
The sStaticModules list is, practically speaking, a copy of the list
of components we already have in libxul, augmented at runtime with
a few other components for tests (for gtest and xpcshell). We don't
actually need to keep that copy in memory. We can instead just use the
pointers in libxul directly to register them to the component manager,
and use a separate list, only for those extra components when they need
to be registered.
--HG--
extra : rebase_source : 1a32c95312d8577c99823adea8dbc0b022c286b2
Overall, this makes the whole setup less fragile, and make it work with
LTO in more situations.
--HG--
extra : rebase_source : de968c61dc4ef337fdc28745c202334ac41763cd
This reduces memory usage because we only need one allocation instead of two
for the dynamic atom and its chars, and because we don't need to store a
refcount and a size. It precludes sharing of chars between dynamic atoms, but
we weren't benefiting much from that anyway.
This reduces per-process memory usage by up to several hundred KiB on my
Linux64 box.
One consequence of this change is that we need to allocate + copy in
DOMString::SetKnownLiveAtom(), which could make some things slower.
--HG--
extra : rebase_source : ba4065ea31e509dd985c003614199f73def0596c
Useful when using promise chaining in combination with MozPromise::ResolveOrRejectValue parameter.
MozReview-Commit-ID: F8qMh7yFnHQ
Differential Revision: https://phabricator.services.mozilla.com/D1726
Now uses StaticPrefs instead of DOMPrefs, and how we count dispatches for Workers.
MozReview-Commit-ID: DTumwcI5bG
--HG--
extra : rebase_source : 0cf5312e714fb260c01df647b2cd1fcc28ffc415
This change makes nsEscape::T_EscapeURL not escape spaces when passed esc_OnlyNonASCII.
This fixes a web-compat issue for URLs such as "javascript: alert('hello');" and the fact that data: URIs with spaces around MIME type are rejected.
MozReview-Commit-ID: 91Qw9foW6Y3
--HG--
extra : rebase_source : 2da1b5f305ca2abcce2f9988cd6a5cbc12635c61
This change makes nsEscape::T_EscapeURL not escape spaces when passed esc_OnlyNonASCII.
This fixes a web-compat issue for URLs such as "javascript: alert('hello');" and the fact that data: URIs with spaces around MIME type are rejected.
MozReview-Commit-ID: B78AacLxGBp
--HG--
extra : rebase_source : fcef25fab58f7da1732725054ae684588f2e0e89
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.
As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.
MozReview-Commit-ID: 8C8NFnOP5GU
--HG--
extra : rebase_source : dd000a05bfc2da40c586644d33ca4508fa5330f6
After fixing the document.domain exceptions to conform to the html
spec, NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN is no longer used, and can be
removed.
MozReview-Commit-ID: 9CwrUSGy2K3
--HG--
extra : rebase_source : 6c624e407fd714f8c61e1e43d44089c0c1e64558
This adds 'CorruptionCanaryForStatics', which as the name implies is suitable
for use in objects that are statically declared. It has a trivial destructor
which allows us to avoid the need for static constructors.
--HG--
extra : amend_source : 27f8eff9ead21fde9f5f5d17f16c322d2c995a27
HashStore::ApplyUpdate() is a V2-only function and so we can be
explicit about that and remove unnecessary casts.
Add a new update error code for when we fail to cast a TableUpdate
object to the expected protocol version.
MozReview-Commit-ID: 65BBwiZJw6J
--HG--
extra : rebase_source : 3f4bb0f7594d4015e2614ef747526ec5e8168a08
Style overlays are no longer used outside of tests.
MozReview-Commit-ID: 798Id5JITAm
--HG--
extra : rebase_source : edfbfc973f865d72bbc019a26519436157476793
Cache AccessibleNode and make it able to operate the same instance by nsINode::GetAccessibleNode
--HG--
extra : rebase_source : 063eec8658af020f5408260d7d581ee76a04bd37