Animated image frames are never actually released to let the OS purge
them, because AnimationSurfaceProvider keeps them as RawAccessFrameRef.
Meanwhile, each volatile buffer on Android needs a file handle to be
retained for as long as the buffer lives. Given sufficient number of
animated image frames, we could easily exhaust the available file
handles (which in turn causes many problems). As such on Android we
should stick with the heap for animated image frames. On other platforms
it is better to stay because we will avoid a memset, because the OS will
zero-fill the requested pages on our behalf.
This adds test verification support to the xpcshell test harness. With --verify,
the specified test(s) are run 20 times, then another 20 times in chaos mode.
Tests are run sequentially. I have some interest in running in parallel also,
but this may not be practical: 1. Under normal circumstances, a test does not
run in parallel with itself, so it is arguably an unrealistic mode of operation;
2. Logging fails if it sees a test start after a test with the same name has completed.
New function updateMozinfo() is broken out of runTests() and the remainder of runTests()
is split into two parts: runTests() prepares tests, then calls new function runTestList() to
actually run them. All changes are structural and no change in behavior is expected.
The complexity of the xpcshell test harness has grown over time. I am reluctant
to make it more complex without first trying to simplify it. Here I consolidate
some of the argument passing between functions in an attempt to simplify some
important interfaces. Changes are strictly structural and should result in no
change in behavior.
When preloading style link in <head>, we used speculative referrer policy which is
delievered from meta tag and ignored the referrerpolicy attribute.
We should use referrerpolicy attribute with the higher priority
MozReview-Commit-ID: 1rQmBV01jvV
Activity-stream is only enabled in Nightly, and if activity-stream is not
enabled, about:newtab is loaded without the flag
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT, so it will be loaded with
System Principal.
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
nsIIOService based events when used via SpecialPowers in mochitests
combined with the preloaded browser in the same process can cause
IsSafeToRun() assertion in SchedulerGroup.h:81. To avoid that we make sure that
previous tests in the suit do not create a preloaded browser. This cannot happen
in a real life scenario.
This part is perma failing on OSX and I guess on windows it only passed
because we have never got to that part because of the poorly written async
calls in the test that we never wait for to complete.
Prior to bug 1365927 part 5, the compositor thread holder owned by a
CompositorBridgeParent or CrossProcessCompositorBridgeParent object
would be released in its DeferredDestroy method. After part 5 (and
related part 6), the CompositorBridgeParentBase holds a reference to the
CompositorManagerParent which in turn holds a reference to the
compositor thread. We didn't explicitly free the manager in the
DeferredDestroy function which in effect extended the life of the
compositor thread. Now we release the manager in the same place we used
to hold the compositor thread with the aim this eliminates a class of
shutdown hangs where the compositor thread never gets cleaned up.