servo/components
Emilio Cobos Álvarez 50312e1457 style: Drop unused user-agent cascade datas when not holding the cache lock.
We want to drop the cascade data memory as soon as possible, so bug 1544546
introduced an UpdateStylistIfNeeded call from ShellDetachedFromDocument.

Unfortunately, this call can reenter into the global user-agent cascade data if
some of the CSS values kept alive by the cascade data keep alive an SVG
document, see the stack on this bug for an example. Make sure to drop the
user-agent cascade datas when not holding the cache lock to avoid this
situation.

Before bug 1535788, we just destroyed the stylist, so we kept holding a
reference from the cache, and that reference will be dropped sometime later when
other document updated their user-agent stylesheets (if they happened not to
match the cache of course).

Seems to me this doesn't ended up happening in our automation, but it could
happen in the wild, in theory at least.

It's nice that Rust made this a safe deadlock caught by our tests rather than a
very subtle and infrequent memory corruption.

The relevant SVG documents are probably the <input type=number> rules:

https://searchfox.org/mozilla-central/rev/d80f0a570736dce76a2eb184fb65517462089e8a/layout/style/res/forms.css#1050

Differential Revision: https://phabricator.services.mozilla.com/D28299
2019-05-07 12:55:28 +02:00
..
allocator Make Servo components use winapi 0.3 2019-01-16 14:29:53 +01:00
atoms Add SignalingState to RTCPeerConnection 2019-03-25 09:04:13 -07:00
background_hang_monitor Auto merge of #23139 - gterzian:bounded_profiler_with_buffer_feedback, r=jdm 2019-03-31 10:27:13 -04:00
bluetooth #23065 removed unnecessary headless checking 2019-03-22 16:31:18 +03:00
bluetooth_traits Update regex to 1.1 2019-04-29 22:25:12 +09:00
canvas WR update: new viewport semantic 2019-03-22 15:41:48 +08:00
canvas_traits Remove offscreen_gl_context dependency from canvas_traits and script. 2019-03-07 09:27:36 -05:00
compositing Refactoring of the Glutin port in preparation of the compositor refactoring. 2019-04-29 10:04:51 +02:00
config Add dom.shadowdom.enabled to preferences list 2019-04-26 12:00:26 +02:00
config_plugins #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
constellation Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian 2019-04-25 20:21:23 -04:00
debugger Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
deny_public_fields Update syn and related dependencies 2018-11-30 17:48:41 +01:00
derive_common Remove an unused extern crate. 2019-04-12 12:20:16 +02:00
devtools Remove redundant .clone()s 2018-12-11 10:43:51 +09:00
devtools_traits Update references to malloc_size_of_derive, which is in crates.io now. 2019-01-13 21:59:31 +01:00
dom_struct Can collect webidl paths. 2019-04-20 22:39:22 +02:00
domobject_derive Update syn and related dependencies 2018-11-30 17:48:41 +01:00
embedder_traits Add a sampling profiler and a script to generate profiles for use with Gecko tooling. 2019-03-26 16:35:08 -04:00
fallible Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
geometry WR update: new viewport semantic 2019-03-22 15:41:48 +08:00
gfx Fix gfx unit tests. 2019-04-12 14:17:21 +02:00
gfx_traits Fix deprecation warnings 2019-01-28 11:32:40 +01:00
hashglobe cargo fix --edition 2018-11-10 17:47:28 +01:00
jstraceable_derive Update syn and related dependencies 2018-11-30 17:48:41 +01:00
layout Add is_connected flag to node and use it to replace most uses of is_in_doc 2019-04-26 10:17:45 +02:00
layout_thread Final nits; fix custom elements rare data usage; s/owner_s_r/containing_s_r 2019-04-29 12:02:04 +02:00
layout_traits Measure layout queries blocked by ongoing layout 2019-04-13 07:42:07 +02:00
malloc_size_of Remove mozjs dep from malloc_size_of. 2019-05-02 09:30:03 -04:00
metrics Update references to malloc_size_of_derive, which is in crates.io now. 2019-01-13 21:59:31 +01:00
msg bound sampler buffer 2019-03-31 20:14:46 +08:00
net Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian 2019-04-25 20:21:23 -04:00
net_traits Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian 2019-04-25 20:21:23 -04:00
pixels Update references to malloc_size_of_derive, which is in crates.io now. 2019-01-13 21:59:31 +01:00
profile Update regex to 1.1 2019-04-29 22:25:12 +09:00
profile_traits fixup! Measure layout queries blocked by ongoing layout 2019-04-17 17:23:17 +02:00
rand Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
range Update references to malloc_size_of_derive, which is in crates.io now. 2019-01-13 21:59:31 +01:00
remutex Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
script Auto merge of #23299 - jdm:minimize-mozjs-deps, r=Manishearth 2019-05-06 12:46:09 -04:00
script_layout_interface Move is_connected function from style to layout, where it is used 2019-04-26 11:42:38 +02:00
script_plugins Simplify ParentMismatchError.fmt. 2019-04-20 22:39:38 +02:00
script_traits Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian 2019-04-25 20:21:23 -04:00
selectors style: Don't allow to parse XUL tree pseudo-elements with a single colon. 2019-05-07 12:55:27 +02:00
servo Refactoring of the Glutin port in preparation of the compositor refactoring. 2019-04-29 10:04:51 +02:00
servo_arc style: Add support for static references to servo_arc::Arc. r=emilio 2019-04-12 12:19:43 +02:00
size_of_test Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
std_test_override Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
style style: Drop unused user-agent cascade datas when not holding the cache lock. 2019-05-07 12:55:28 +02:00
style_derive Upgrade to rustc 1.36.0-nightly (e305df184 2019-04-24) 2019-04-25 13:52:09 +02:00
style_traits style: Add derived ToShmem implementations. 2019-04-12 12:19:52 +02:00
to_shmem style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
to_shmem_derive style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
url style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
webdriver_server Update regex to 1.1 2019-04-29 22:25:12 +09:00
webvr #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
webvr_traits Use a test VRDisplay that renders to a GL window 2019-03-05 12:54:12 -06:00