This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1525392 - update rkv (and LMDB) to their latest stable versions r…
…=froydnj Changes to rkv and LMDB crates: rkv 0.7.0 -> 0.9.1 lmdb-rkv 0.9.0 -> 0.11.2 lmdb-sys 0.8.0 -> lmdb-rkv-sys 0.8.2 Update to the LMDB C library: LMDB 0.9.21 -> 0.9.23 (+ backported patch for Mozilla build issue) Other crate dependency update: lazy_static 1.0.1 -> 1.2.0 This also removes the workaround for bug 1525219 and updates the kvstore in-tree crate (and nsIKeyValueService XPCOM API) for the rkv changes. Differential Revision: https://phabricator.services.mozilla.com/D19094
- Loading branch information
Showing
84 changed files
with
2,008 additions
and
1,295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"files":{"Cargo.toml":"64e1cd36c70ec172cab7e96c5faa3c670f9313f677c90db977224f9b24a7d468","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"7daae430cf5936e151386856293024e1466cddf62f27a9ff7ee3ef1511698514","appveyor.yml":"d17efb6bab4af26aa0048930de8bd3310b8d8a9961946a7962fe9fef31f96720","src/core_lazy.rs":"f20f2fc2bb751cf74622b05ec44675b6a29bfaa67d91a2e55485c665647d2904","src/lazy.rs":"a62cc96b7177a68b25e993592b08a6c706e9020fd565a55afa1fb657efa4052c","src/lib.rs":"75eee349be03ac278c1183cd861ffd0117b7ab7fffd4d46d0a1e21b9c48eab9b","src/nightly_lazy.rs":"7c00b832e907efeee16a01e1739fa536cd01b97a31d71f00d72dcabcf2e4e428","tests/no_std.rs":"2a5236bd3892a253855b4dc192f63138239165fa23b9c3421a9faa5482c780aa","tests/test.rs":"12b100f4790037ca049692d896114d6361373c5321c29e0032c290ee39f1042c"},"package":"e6412c5e2ad9584b0b8e979393122026cdd6d2a80b933f890dcd694ddbe73739"} | ||
{"files":{"Cargo.toml":"9501e790a183ddbc845edba899bffa05f573c43fa5f79ef065ead842d056fa85","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"f2e94da8b77ac2a097dbc4b93b35912ef41b725624512d83ea968951dd5bdc7d","src/core_lazy.rs":"6b9fb6a4f553058e240756125b6b9ca43a83ed1fb72964343038ea0ea2e1af10","src/inline_lazy.rs":"2ae9a04c5bff40e80194f65b01012f0b42efa527bf717e176c68b4ca5212043c","src/lib.rs":"3defd7a82feced71862161a3c36fcff7cef3e08a51596b2e15d629b9a171a75a","tests/no_std.rs":"d68b149ee51ef5ae2b2906c0c94f5a9812d3b02811b13365c5a35e2ef90d25cf","tests/test.rs":"8e809c0f0332a3a60fca0113128cdab2cdbee92f03db523cdc4e82f4cd4b9f22"},"package":"a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright 2016 lazy-static.rs Developers | ||
// | ||
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or | ||
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or | ||
// http://opensource.org/licenses/MIT>, at your option. This file may not be | ||
// copied, modified, or distributed except according to those terms. | ||
|
||
extern crate core; | ||
extern crate std; | ||
|
||
use self::std::prelude::v1::*; | ||
use self::std::cell::Cell; | ||
use self::std::sync::Once; | ||
pub use self::std::sync::ONCE_INIT; | ||
|
||
// FIXME: Replace Option<T> with MaybeInitialized<T> | ||
pub struct Lazy<T: Sync>(Cell<Option<T>>, Once); | ||
|
||
impl<T: Sync> Lazy<T> { | ||
pub const INIT: Self = Lazy(Cell::new(None), ONCE_INIT); | ||
|
||
#[inline(always)] | ||
pub fn get<F>(&'static self, f: F) -> &T | ||
where | ||
F: FnOnce() -> T, | ||
{ | ||
self.1.call_once(|| { | ||
self.0.set(Some(f())); | ||
}); | ||
|
||
// `self.0` is guaranteed to be `Some` by this point | ||
// The `Once` will catch and propegate panics | ||
unsafe { | ||
match *self.0.as_ptr() { | ||
Some(ref x) => x, | ||
None => { | ||
debug_assert!(false, "attempted to derefence an uninitialized lazy static. This is a bug"); | ||
|
||
unreachable_unchecked() | ||
}, | ||
} | ||
} | ||
} | ||
} | ||
|
||
unsafe impl<T: Sync> Sync for Lazy<T> {} | ||
|
||
#[macro_export] | ||
#[doc(hidden)] | ||
macro_rules! __lazy_static_create { | ||
($NAME:ident, $T:ty) => { | ||
static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::INIT; | ||
}; | ||
} | ||
|
||
/// Polyfill for std::hint::unreachable_unchecked. There currently exists a | ||
/// [crate](https://docs.rs/unreachable) for an equivalent to std::hint::unreachable_unchecked, but | ||
/// lazy_static currently doesn't include any runtime dependencies and we've chosen to include this | ||
/// short polyfill rather than include a new crate in every consumer's build. | ||
/// | ||
/// This should be replaced by std's version when lazy_static starts to require at least Rust 1.27. | ||
unsafe fn unreachable_unchecked() -> ! { | ||
enum Void {} | ||
match std::mem::uninitialized::<Void>() {} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#![cfg(feature="spin_no_std")] | ||
#![feature(const_fn)] | ||
|
||
#![no_std] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.