XPT has some functions and macros for freeing memory. However, they (a) are
only used on error paths, and (b) don't actually free memory -- they just
optionally log the "freeing" -- because piecewise freeing doesn't make sense
with arena allocation.
This patch removes all that unnecessary machinery.
RegisterBuffer() is the only place that creates an XPTState, and it also
destroys it. So the XPTState can be allocated on the stack, which voids the
need for the creation of an XPTArena.
XPT supports annotations but xpt.py doesn't generate them except for a single
empty annotation (to indicate there are no real annotations). So we can remove
almost all support for them. This also allows XPTString to be removed.
Currently XPT can both encode and decode, but encoding has been handled by
Python code since bug 643817, so the encoding support can be removed. This
results in many simplifications. Some notable changes:
- All the XPTHashTable code (including XPTDatapool::offset_map) is no longer
necessary.
- PrimitiveTest.cpp and SimpleTypeLib.cpp both don't make much sense without
encoding support, so I removed them.
- A lot of the version code was already unused, e.g. XPT_VERSION_*,
XPT_TYPELIB_VERSIONS_STRUCT, XPT_TYPELIB_VERSIONS.
XPT_MAJOR_INCOMPATIBLE_VERSION is the only thing actually used in version
checks.
- The patch also removes some code that was dead even before encoding removal,
such as XPT_ParseVersionString().
The WindowsAddressSpaceReporter generates one memory report per segment, and
there can be 10,000+ segments.
This patch changes things so that one memory report is generated per segment
*kind* -- at most a couple of dozen -- rather than one per *segment*.
This patch brings the behavior of this method into line with the comment that
describes it and other methods in this class that have a similar test.
I discovered this bug while exercising this code from animation code and was
getting test failures due to returning -Infinity instead of the expected
Infinity.
This patch removes NameTableEntry::mString. This requires adding mNameArray to
NameTableKey so that we can index off it in matchNameKeysCaseInsensitive().
This change saves 41.5 KiB per process.
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check
- the outdated 0666 octal constant is still parsed correctly,
- the outdated 0666 octal constant raises syntax error flag
in strict mode, etc.
So leave them alone.
This will run the SpiderMonkey promise jobs more or less the same way that we
run Promise jobs right now, including using a Web IDL callback for the actual
invocation.
This commit contains a few things:
* Update our copy of google-breakpad to upstream c53ed143108948eb7e2d7ee77dc8c0d92050ce7c
* Get rid of all but one local patch, fold a few related local patches into one
* Misc build fixup to sync with upstream--adding a few new moz.build files,
source files
* The final bits of unhooking Breakpad from the profiler:
** Revert to only building toolkit/crashreporter if MOZ_CRASHREPORTER.
** Stop building bits of Breakpad that we only needed for the profiler.
** Remove a few bits of profiler code that were used to interface with Breakpad.
** Remove toolkit/crashreporter/breakpad-logging, which was only used to
suppress Breakpad logging for the in-process stackwalker.
* Upstream removed their Android-compat sys/ucontext.h because the Android NDK
added it, but the bionic we're using for Gonk builds is too old, so add a
copy of the previous version of those files to
toolkit/crashreporter/gonk-include to keep Gonk building.
* Consolidate moz.build files under toolkit/crashreporter/google-breakpad/client/linux
StringBeginsWith (resp. StringEndsWith) takes a defaulted
nsStringComparator object for doing comparisons. The flexibility this
affords is great, but the cost is not: nsStringComparator has virtual
methods, so initializing that defaulted object (at every callsite)
requires a temporary object whose vtable must be initialized.
Since the overwhemingly common case is to use the default comparator
anyway, we should not use defaulted arguments and instead provide the
default comparator/user-provided comparator cases as separate overloads.
This change eliminates the virtual call for the majority of callsites
and reduces codesize as well.