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

2133 Коммитов

Автор SHA1 Сообщение Дата
Ryan Hunt f2a88fde64 Bug 1475139 part 6 - Add move assignment operator to ByteBuf. r=jrmuizel
--HG--
extra : rebase_source : 2dfd45d206b16f1539606be4bf10d89d9eb56b90
2018-10-02 08:07:12 -05:00
Ryan Hunt 752b0f6f6c Bug 1475139 part 3 - Add serialization support for nsTHashtable with nsUint64HashKey. r=froydnj
I'd like to use a nsTHashtable acting as a set in a struct that will be passed over IPDL, but
couldn't find any ParamTraits implementation for it. It'd be nice to make the implementation
generic, but I couldn't find an easy way to do it.

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

--HG--
extra : rebase_source : f22b788d99cc336867871d2c89919fc8ddec2371
2018-09-24 21:35:31 -05:00
Andrew McCreight 0437363577 Bug 1495912- Remove more trivial calls to do_QueryInterface r=smaug
MozReview-Commit-ID: 34BAwt3SAJk

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

--HG--
extra : moz-landing-system : lando
2018-10-03 19:52:01 +00:00
Tiberius Oros 3edd9afbe3 Backed out 5 changesets (bug 1431441) for failing devtools at client/debugger/new/test/mochitest/browser_dbg_rr_breakpoints-01.js on OSX opt a=backout
Backed out changeset 94a1d1d67191 (bug 1431441)
Backed out changeset be7ec7438701 (bug 1431441)
Backed out changeset db6b7ee04187 (bug 1431441)
Backed out changeset f61ec0f140c2 (bug 1431441)
Backed out changeset ac51f86f5cac (bug 1431441)
2018-10-03 09:39:01 +03:00
Haik Aftandilian ef9150c083 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-02 20:29:46 +00:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Francois Marier eb27c3267c Bug 1488974 - Disable FastBlock after the load event has fired. r=mayhemer,Ehsan
The test used to assume that the load event didn't matter and so
the expected values had to be updated to match the new behavior.

A new "slowIFrame" test was added to capture what was previously
tested by the "badIFrame".

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

--HG--
extra : moz-landing-system : lando
2018-09-28 19:12:10 +00:00
Coroiu Cristina fa474415f8 Backed out changeset d846803d6d6e (bug 1485762) on request by dev a=backout 2018-09-28 00:06:02 +03:00
Gabriele Svelto a1f6255102 Bug 1463048 - Remove asynchronous minidump generation r=ted
This reverts the changes in bug 1360308, bug 1390143 and bug 1469603. Minidump
generation will now only happen on the main process' main thread which might
lead to hangs but is known to be fairly robust. Asynchronous generation proved
too brittle and enormously increased the complexity of this already
hard-to-read code.

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

--HG--
extra : moz-landing-system : lando
2018-09-17 20:51:45 +00:00
Dorel Luca 7a91966c10 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-15 12:46:59 +03:00
Jed Davis 5fc0190dc0 Bug 1488994 - Stop waiting for channel construction in AsyncLaunch, and clean up launch methods r=mccr8,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D5724

--HG--
extra : moz-landing-system : lando
2018-09-14 17:26:49 +00:00
Jed Davis 775ab1e410 Bug 1478145 - Merge GeckoChildProcessHost::PerformAsyncLaunchInternal back into PerformAsyncLaunch r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D5723

--HG--
extra : moz-landing-system : lando
2018-09-14 17:28:38 +00:00
Ted Mielczarek d59bc31677 Bug 1399877 - globally define MOZ_DLL_PREFIX/MOZ_DLL_SUFFIX; r=gps
Several source files use DLL_PREFIX/DLL_SUFFIX defines, and they all set
them in moz.build using `DEFINES`.  This is problematic for the WSL
build because the quoting gets lost somewhere between bash and cl.exe.
We cannot simply set them globally in moz.configure because their
stringified definitions would conflict with the `set_config` of
DLL_PREFIX/DLL_SUFFIX.  Therefore, we globally define
MOZ_DLL_PREFIX/MOZ_DLL_SUFFIX and change all define-related uses of
DLL_PREFIX/DLL_SUFFIX to use their MOZ-equivalents instead.
2018-09-11 13:31:20 -04:00
Ehsan Akhgari d3787265b1 Bug 1489252 - Part 2: Add a telemetry probe for measuring the rate at which popular analytics providers get blocked by fastblock for top-level documents; r=baku,mayhemer,chutten data-r=liuche
Differential Revision: https://phabricator.services.mozilla.com/D5296
2018-09-14 16:06:07 -04:00
Daniel Varga 1539df295b Merge mozilla-inbound to mozilla-central a=merge 2018-09-08 06:53:43 +03:00
Emilio Cobos Álvarez c9c6290890 Bug 1489453 - EnumSet shouldn't take 32 bits if not needed. r=froydnj
This is the only reason I haven't used it before for things like
StyleSheet::State.

Change the underlying type to be the underlying enum representation by default,
but allow to override it if wanted.

Assertions should catch misuses.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:40:02 +00:00
Brian Hackett 10681a9714 Bug 1488523 Part 2 - Don't drop delayed crash annotations at startup, r=gsvelto.
--HG--
extra : rebase_source : 77d16117bb2ea99a303d06bff864758ffd235869
2018-09-05 09:23:03 -10:00
Valentin Gosu a2675e9878 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

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

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 20:45:22 +00:00
Gurzau Raul dfbefcc19f Backed out changeset 45605798ecfe (bug 1476996) for build bustage at netwerk/protocol/http/HttpChannelParentListener.cpp on a CLOSED TREE 2018-09-04 20:31:33 +03:00
Valentin Gosu 98ff61cc44 Bug 1476996 - Implement cross process redirection in Http on the parent process r=bagder,nika
This patch builds the foundation for the ability to relocate HTTP channels from one content process to another in order to ensure that origins are properly isolated. This relocation would normally occur when the response to an HTTP request is a redirect to a different origin.
The patch merely adds the mechanism for relocating the channel, rather than the logic of doing so. This will be provided in a follow-up patch by a specialized service. Right now that functionality is mocked in the test.

How this works:
In nsHttpChannel::OnStartRequest we will query the service that decides whether we need to direct the response to another process. If so, it will return a promise that resolves to a TabParent.
When the promise resolves, in HttpChannelParentListener::TriggerCrossProcessRedirect we call NeckoParent::SendCrossProcessRedirect passing along the required information to recreate the channel in the new process. The NeckoChild in the new process will then instantiate a new channel, call ConnectParent() which creates the associated parent channel, and connects it with the existing nsHttpChannel.
A listener in the new process is then notified of the existence of the new channel. It is required to call completeRedirectSetup on the channel, passing an nsIStreamListener to the call.
We then finish the entire operation with a call to HttpChannelChild::SendCrossProcessRedirectDone which causes us to close the old HttpChannelChild in the previous process and to resume the nsHttpChannel in the main process.

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

--HG--
rename : netwerk/test/browser/browser_cookie_sync_across_tabs.js => netwerk/test/browser/browser_cross_process_redirect.js
rename : dom/media/test/redirect.sjs => netwerk/test/browser/redirect.sjs
extra : moz-landing-system : lando
2018-09-04 16:40:57 +00:00
Brian Hackett 1561d566c9 Bug 1486609 - Ignore message priorities in recording/replaying processes, r=mccr8.
--HG--
extra : rebase_source : 1d74a58a6bf8ef02497bf778b0c428499a9f40d8
2018-08-31 05:34:18 -10:00
Andrea Marchesini 24005dab5f Bug 1485492 - Disable fastblocking when the user has interacted with a document, r=ehsan 2018-08-31 13:21:17 +02:00
Alex Gaynor 5bf3453bc2 Bug 1486547 - renamed the mState field on generated protocol classes; r=froydnj
There's also a field named mState on IProtocol, and this reduces confusion.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 18:20:17 +00:00
Alex Gaynor 9b811a260c Bug 1485762 - when deserializing a shmem in IPC, error if the ID doesn't point to a valid shmem segment; r=jld
Differential Revision: https://phabricator.services.mozilla.com/D4141

--HG--
extra : moz-landing-system : lando
2018-08-24 20:25:42 +00:00
Andreas Pehrson 84013bba14 Bug 1478575 - Unify CamerasChild shutdown paths. r=gcp 2018-08-20 10:44:49 +02:00
Jed Davis 4a8426acf0 Bug 1478849. r=mccr8 2018-08-21 15:37:42 -06:00
Dorel Luca 07c6e76122 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-21 12:54:24 +03:00
Alex Gaynor 019b59f8b5 Bug 1483309 - the IPC libFuzzer integration can now generated shared memory segments; r=jld,posidron
Uses the input bytes as metadata + data for shared memory segments.

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

--HG--
extra : moz-landing-system : lando
2018-08-20 18:46:05 +00:00
Jan Varga 5733cbbbd3 Bug 1361330 - Part 4: Core implementation; r=asuth 2018-08-20 14:33:03 +02:00
Liang-Heng Chen 6c9d7c21d6 Bug 1481252 - Part 1: Report FastBlock status to docshell; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D3024

--HG--
extra : moz-landing-system : lando
2018-08-16 15:29:22 +00:00
Daosheng Mu 8ac5934ce1 Bug 1430038 - Part 1: Add VR process to the process list; r=kip, jimm
Summary: MozReview-Commit-ID: AWyFur2gLCQ

Tags: #secure-revision

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

MozReview-Commit-ID: HHGDiXyaqnB

--HG--
extra : rebase_source : cbb94eb1aaca4ca385559c0e997b508a80121105
2018-06-22 16:30:14 -07:00
Brian Hackett 9444619b6c Bug 1481346 - Fix problems when forwarding sync messages in the middleman, r=mccr8.
--HG--
extra : rebase_source : 38dfeca916baf25166fea246b94c26a14bf24827
2018-08-14 00:30:09 +00:00
Brian Hackett 0d5d3c2675 Bug 1482275 Part 2 - Recognize hanged replaying processes when reporting crashes, r=gsvelto.
--HG--
extra : rebase_source : eed9d0661e40d74edda3e71d9164fc9972c0dd8c
2018-08-14 00:50:11 +00:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Andrea Marchesini 04fcbb6556 Bug 1480131 - AntiTrackingCommon::IsFirstPartyStorageAccessGrantFor() should not grant permission to sub-sub-iframe channels; r=ehsan 2018-08-10 14:59:33 -04:00
Gabriele Svelto 15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Jed Davis 18e4e4ce63 Bug 1480401 - Avoid heap-allocated closures in async signal safe part of LaunchApp. r=froydnj
MozReview-Commit-ID: 4LYtBGbqtVh

--HG--
extra : rebase_source : 4bf706d0b5bd61fdffc0f727cd72591c512ca20c
2018-08-02 14:18:01 -06:00
Andrea Marchesini 44ce53c72e Bug 1476592 - Remove the cache from nsCSPContext - part 2 - sendViolationReports parameter, r=ckerschb, r=aosmond 2018-08-01 06:35:24 +02:00
Sebastian Hengst bd900ee36a Merge mozilla-inbound to mozilla-central. a=merge 2018-07-25 17:16:53 +03:00
Jed Davis dc17388589 Bug 1462168 - Report number of IPC channels in about:memory. r=mccr8
This adds an about:memory branch, "ipc-channels", which counts
cross-process IPC channels (ProcessLink, IPC::Channel) broken down by
the top-level IPDL actor name; these use OS resources which may be
limited (file descriptors on Linux and Mac).  Intra-process use of IPC
(ThreadLink) is not counted.

The maximum channel count for each actor type is reported in another
branch, "ipc-channels-peak".  This might be useful if there are
conditions that cause transient fd exhaustion, for example.

This patch also works around a problem where MessageChannel was trying
to register reporters too early in child processes, and failing.

MozReview-Commit-ID: CGEwny2ipcu

--HG--
extra : rebase_source : ad526f03bbef891f4474225a8e36a7ed9e3acdab
2018-07-19 17:48:05 -06:00
Andrea Marchesini f6768a8ff6 Bug 1228139 - Remove nsIURIWithPrincipal - part 3 - main part, r=bz
nsIURIWithPrincipal is currently used to retrieve the nsIPrincipal from a
BlobURL object.  BlobURLProtocolHandler has a hashtable containing, for each
blobURL, a BlobImpl and its nsIPrincipal. This patch introduces
BlobURLProtocolHandler::GetBlobURLPrincipal() that retrieves the nsIPrincipal
from this hashtable.

This patch fixes also a bug in how the revocation of blobURLs is broadcasted to
other processes. This should be done immediately because each process creates
its own timer to revoke them after 5 seconds.

An important change is related to NS_SecurityCompareURIs() where, if 1 (or
both) of the 2 URIs to compare, is a revoked BlobURL, we will QI its URL to
nsIStandardURL and fail out at that point.
2018-07-24 22:15:57 +02:00
Gurzau Raul 19e302fb18 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-24 12:52:06 +03:00
Brian Hackett de58a40fc1 Bug 1465294 Part 8 - Don't enable crash reporter in recording/replaying processes, r=aklotz.
--HG--
extra : rebase_source : c07f157b2a4d2244e9fa344cf24624ef962430f1
2018-07-23 14:53:16 +00:00
Brian Hackett 5054a18818 Bug 1465287 Part 6 - Use correct channel and pids when communicating with a middleman process, r=mccr8.
--HG--
extra : rebase_source : 856fa92eba119d09f0b111e51126a9817b52bb24
2018-07-22 11:51:30 +00:00
Brian Hackett 4be736018d Bug 1207696 Part 4b - Make recording optional in mozilla mutexes and monitors, r=froydnj.
--HG--
extra : rebase_source : c00f199b38c6bdd47ed1793edf2ce90fbf2ff420
2018-07-21 14:22:54 +00:00
Doug Thayer cd54f8c184 Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 4f05832f51dae6db98773dcad03cb008a80eca6c
2018-05-05 15:46:26 -07:00
Cosmin Sabou fea686b1f6 Backed out 10 changesets (bug 1265824) for causing reftests failures on global-composite-operation.html. CLOSED TREE
Backed out changeset 391c8e7897df (bug 1265824)
Backed out changeset 27c7daabd1a3 (bug 1265824)
Backed out changeset 7c90215a2eca (bug 1265824)
Backed out changeset c141fb67cf9a (bug 1265824)
Backed out changeset 239ab9f9ef52 (bug 1265824)
Backed out changeset 39ae151b3d8c (bug 1265824)
Backed out changeset 71b23fbe1fec (bug 1265824)
Backed out changeset 295dd1a6a09f (bug 1265824)
Backed out changeset 6aecd088e02c (bug 1265824)
Backed out changeset bf9d73b214fc (bug 1265824)
2018-07-23 19:36:37 +03:00
Doug Thayer ac1648320e Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 67f6fee8b89933561a48e6f7f531b6969893a574
2018-05-05 15:46:26 -07:00
Margareta Eliza Balazs b1e7992b82 Backed out 8 changesets (bug 1265824) for bustage in /builds/worker/workspace/build/src/gfx/layers/opengl/CompositorOGL.cpp on a CLOSED TREE
Backed out changeset 1099d6f15f9f (bug 1265824)
Backed out changeset b5ba15b1a70f (bug 1265824)
Backed out changeset 51795de4adaf (bug 1265824)
Backed out changeset be68741ff4ce (bug 1265824)
Backed out changeset 4731dc56702d (bug 1265824)
Backed out changeset 984133e9614b (bug 1265824)
Backed out changeset efce316a4425 (bug 1265824)
Backed out changeset 367abce30668 (bug 1265824)
2018-07-19 09:33:28 +03:00
Doug Thayer eeeab69c1c Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 3624ad04aa01dac1cd38efb47764dc3a8fbd5fbd
2018-05-05 15:46:26 -07:00