aboutsummaryrefslogtreecommitdiffstats
path: root/components/to_shmem/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-6/+5
| | | | | * strict imports formatting * Reformat all imports
* style: Remove ThinBoxedSliceEmilio Cobos Álvarez2023-06-091-18/+0
| | | | | | | | | | | | | | | | | | | The only remaining consumers are ::-moz-tree pseudo-elements (we used to use ThinBoxedSlice for other data structures in the past). Those are not particularly performance sensitive so I think just double-boxing is fine. In the future, if we wanted to avoid the double indirection, we could probably use the "thin" crate (https://docs.rs/thin) or similar, which stores the length of the slice along with the allocation, making the pointer thin in all configurations, much like "ThinArc" does: https://searchfox.org/mozilla-central/rev/1ce2eea39442190a71a1f8f650d098f286bf4a01/servo/components/servo_arc/lib.rs#891 In practice though, I don't think it's particularly worth it for this specific case. Differential Revision: https://phabricator.services.mozilla.com/D134672
* Upgrade remaining components to edition 2018sagudev2023-02-181-8/+0
|
* style: Gracefully handle errors creating shared memory UA style sheets.Cameron McCormack2020-06-041-65/+89
| | | | | | | | | | | | We still panic in a debug build, so that developers can notice when they need to add a new static atom after modifying UA sheets. We also add telemetry to note when this happens, add an app note to a crash report, in case any crash later on occurs, and re-up the existing, expired shared memory sheet telemetry probes so we can look at them again. Differential Revision: https://phabricator.services.mozilla.com/D73188
* Stylo: replace uses of mem::uninitialized with MaybeUninitSimon Sapin2019-07-161-3/+4
| | | | MozReview-Commit-ID: KGhYL6DJRaR
* style: Add an owned slice type which cbindgen can understand.Emilio Cobos Álvarez2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | 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
* style: Fix servo build, and appease tidy / fmt.Emilio Cobos Álvarez2019-04-121-9/+27
|
* style: Reformat recent changes.Emilio Cobos Álvarez2019-04-121-12/+26
|
* style: Add ToShmem impls for collections and strings.Cameron McCormack2019-04-121-1/+272
| | | | Differential Revision: https://phabricator.services.mozilla.com/D17191
* style: Add simple ToShmem implementations.Cameron McCormack2019-04-121-0/+64
| | | | Differential Revision: https://phabricator.services.mozilla.com/D17190
* style: Add SharedMemoryBuilder type and ToShmem trait.Cameron McCormack2019-04-121-0/+175
Differential Revision: https://phabricator.services.mozilla.com/D17187