Commit graph

7 commits

Author SHA1 Message Date
Simon Sapin
17ec774a49 Stylo: replace uses of mem::uninitialized with MaybeUninit
MozReview-Commit-ID: KGhYL6DJRaR
2019-07-16 08:03:54 +02:00
Emilio Cobos Álvarez
330bccd659 style: Add an owned slice type which cbindgen can understand.
Passing these by value won't be ok of course, but that's fine.

I plan to combine this with https://github.com/eqrion/cbindgen/pull/333 to
actually be able to share representation for ~all the things, this is just the
first bit.

Box<T>, Atom and Arc<T> will be much easier since cbindgen can understand them
without issues.

It's boxed slices the only ones I should need something like this. I could avoid
it if I rely on Rust's internal representation, which we can per [1], but then I
need to teach cbindgen all about slices, which is generally hard, I think.

[1]: https://github.com/rust-lang/unsafe-code-guidelines/blob/master/reference/src/layout/pointers.md

Differential Revision: https://phabricator.services.mozilla.com/D29768
2019-05-10 12:43:02 +02:00
Emilio Cobos Álvarez
49842f5031 style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
Emilio Cobos Álvarez
8c004c0858 style: Reformat recent changes. 2019-04-12 12:20:14 +02:00
Cameron McCormack
48718b876c style: Add ToShmem impls for collections and strings.
Differential Revision: https://phabricator.services.mozilla.com/D17191
2019-04-12 12:19:47 +02:00
Cameron McCormack
7fa7c103d6 style: Add simple ToShmem implementations.
Differential Revision: https://phabricator.services.mozilla.com/D17190
2019-04-12 12:19:46 +02:00
Cameron McCormack
f581d2afb2 style: Add SharedMemoryBuilder type and ToShmem trait.
Differential Revision: https://phabricator.services.mozilla.com/D17187
2019-04-12 12:19:44 +02:00