Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to per-process shared lock for author-origin stylesheets #16246

Merged
merged 1 commit into from Apr 3, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Revert to per-process shared lock for author-origin stylesheets

Fixes #16097
Reopens #16027
  • Loading branch information
SimonSapin committed Apr 3, 2017
commit c8b5b4a9bb787d1d5ff8f60038a9bb4a1781f11e

Some generated files are not rendered by default. Learn more.

@@ -54,6 +54,7 @@ image = "0.12"
ipc-channel = "0.7"
js = {git = "https://github.com/servo/rust-mozjs", features = ["promises"]}
jstraceable_derive = {path = "../jstraceable_derive"}
lazy_static = "0.2"
libc = "0.2"
log = "0.3.5"
mime = "0.2.1"
@@ -2132,7 +2132,21 @@ impl Document {
scripts: Default::default(),
anchors: Default::default(),
applets: Default::default(),
style_shared_lock: StyleSharedRwLock::new(),
style_shared_lock: {
lazy_static! {
/// Per-process shared lock for author-origin stylesheets
///
/// FIXME: make it per-document or per-pipeline instead:
/// https://github.com/servo/servo/issues/16027
/// (Need to figure out what to do with the style attribute
/// of elements adopted into another document.)
static ref PER_PROCESS_AUTHOR_SHARED_LOCK: StyleSharedRwLock = {
StyleSharedRwLock::new()
};
}
PER_PROCESS_AUTHOR_SHARED_LOCK.clone()
//StyleSharedRwLock::new()
},
stylesheets: DOMRefCell::new(None),
stylesheets_changed_since_reflow: Cell::new(false),
stylesheet_list: MutNullableJS::new(None),
@@ -60,6 +60,8 @@ extern crate ipc_channel;
extern crate js;
#[macro_use]
extern crate jstraceable_derive;
#[macro_use]
extern crate lazy_static;
extern crate libc;
#[macro_use]
extern crate log;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.