mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Create two-phase initialization for generated JS engine bindings (#34366)
* script: Generate a runtime initialization for static JS binding information. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Replace dummy static initializers with OnceLock. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Only initialize statics for DOM interfaces with interface objects. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Remove one unnecessary Box::leak usage. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Tidy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide thread-unsafe OnceLock usage inside of a wrapper type. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mark ThreadUnsafeOnceLock::get unsafe. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Simplify ThreadUnsafeOnceLock internals. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
faefed9869
commit
3515b83a95
5 changed files with 296 additions and 108 deletions
|
@ -34,11 +34,14 @@ pub mod base {
|
|||
pub use crate::dom::bindings::error::Error::JSFailed;
|
||||
pub use crate::dom::bindings::error::{throw_dom_exception, Fallible};
|
||||
pub use crate::dom::bindings::num::Finite;
|
||||
pub use crate::dom::bindings::proxyhandler::CrossOriginProperties;
|
||||
pub use crate::dom::bindings::reflector::DomObject;
|
||||
pub use crate::dom::bindings::root::DomRoot;
|
||||
pub use crate::dom::bindings::str::{ByteString, DOMString, USVString};
|
||||
pub use crate::dom::bindings::trace::RootedTraceableBox;
|
||||
pub use crate::dom::bindings::utils::{get_dictionary_property, set_dictionary_property};
|
||||
pub use crate::dom::bindings::utils::{
|
||||
get_dictionary_property, set_dictionary_property, ThreadUnsafeOnceLock,
|
||||
};
|
||||
pub use crate::dom::globalscope::GlobalScope;
|
||||
pub use crate::script_runtime::JSContext as SafeJSContext;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue