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

stylo: Use atoms as the pseudo-element back-end. #12815

Merged
merged 12 commits into from Aug 16, 2016
Prev

stylo: Add debug docs assertion in Atom::from_static()

  • Loading branch information
emilio committed Aug 16, 2016
commit 09cc240d4cd3cb2af1d049c15c4e41186fc7dfc6
@@ -171,9 +171,18 @@ impl Atom {
mem::forget(atom);
}

/// Creates an atom from an static atom pointer without checking in release
/// builds.
///
/// Right now it's only used by the atom macro, and ideally it should keep
/// that way, now we have sugar for is_static, creating atoms using
/// Atom::from should involve almost no overhead.
#[inline]
unsafe fn from_static(ptr: *mut nsIAtom) -> Self {
Atom(ptr as *mut WeakAtom)
let atom = Atom(ptr as *mut WeakAtom);
debug_assert!(atom.is_static(),
"Called from_static for a non-static atom!");
atom
}
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.