We modify the environment before running freetype2 configure. When it uses
the same cache file, it stores knowledge about that environment in the cache
file. The cache file is then reused to configure in js/src, with yet again a
different environment, which makes subconfigure.py clear the cache because
of the differences.
The configure in js/src is however invoked with the same environment as the
main configure was invoked with (mostly), so without freetype2 on the way,
reusing the cache for it works as expected. In fact, it works better with the
cache because of things coming from mozconfig that are not exported.
With freetype2 on the way, as mentioned above, the cache is cleared. Without
the cache, js/src/configure does new detections with a possibly different
environment, and stores that in the cache. Until the next build, which then
uses that different cache for the top-level configure.
This results in subtle differences in the HOST_CC/HOST_CXX variables on
android builds because those variables are not exported from mozconfig,
depending on PATH, what the builder was building before, and if the build
is a clobber.
Avoiding the freetype2 subconfigure writing its environment variables change
to the top-level cache makes the cache never invalidate for js/src.
$topsrcdir/gcc/bin was mistakenly added in bug 971841, but is not provided by
anything the tooltool manifest for android builds pulls. It however is a path
that /may/ exist in the source tree when the slave ran a linux build before.
When it does exist, the meaning of non-path-prefixed commands change,
influencing what particular compiler is used in some cases.
There are, sadly, many combinations of linkage in use throughout the tree.
The main differentiator, though, is between program/libraries related to
Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent
linkage, some standalone.
Anyways, these new templates remove the need to manually define the
right dependencies against xpcomglue, nspr, mozalloc and mozglue
in most cases.
Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS
or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now
just not use those Gecko-specific templates.
This hack has actually not been actively used since sqlite, nss and nspr are
all folded together, because no shared library is actually linked in
db/sqlite3/src.
Most of the TCPSocket and TCPServerSocket coverage was implemented exclusively
in Chrome-privileged xpcshell tests. This failed to provide coverage for the
key use case of content-privileged code using TCPSocket.
This cleans up the test implementation and migrates them to mochitests.
Coverage is improved as evidenced by two tested TCPServerSocket issues that were
addressed in this patch:
- ArrayBuffers weren't being created in the content page's context, so
exceptions would be thrown when accessed.
- 'drain' notifications were not being hooked up.
The following fix that lacks coverage that notices the fix was implemented:
- TCPServerSocket now properly propagates the appId for network usage tracking.
The %#x format specifier for hex values doesn't work with our
logging macros, and MacOS error codes are generally listed
in decimal anyway.
Also log the reason for a Drain() call to assist debugging.
The logcat format used by tbpl jobs in some (maybe all) cases now has a
timestamp and other decorations at the beginning of the line. The regex that
was previously added to filter out reftest failure lines duplicated in logcat
no longer matches the lines correctly; this makes the regex more generic so that
the filtering works again.