1pub(crate) mod base {
6 pub(crate) use std::ptr;
7 pub(crate) use std::rc::Rc;
8
9 #[allow(unused_imports)]
10 pub(crate) use js::context::{JSContext, NoGC, RawJSContext};
11 pub(crate) use js::conversions::{
12 ConversionBehavior, ConversionResult, FromJSValConvertible, ToJSValConvertible,
13 };
14 pub(crate) use js::error::throw_type_error;
15 pub(crate) use js::gc::RootedVec;
16 pub(crate) use js::jsapi::{
17 HandleValue as RawHandleValue, HandleValueArray, Heap, IsCallable, JSObject, Value,
18 };
19 pub(crate) use js::jsval::{JSVal, NullValue, ObjectOrNullValue, ObjectValue, UndefinedValue};
20 pub(crate) use js::panic::maybe_resume_unwind;
21 #[allow(unused_imports)]
22 pub(crate) use js::realm::{AutoRealm, CurrentRealm};
23 pub(crate) use js::rust::wrappers2::{Call, JS_NewObject};
24 pub(crate) use js::rust::{
25 HandleObject, HandleValue, MutableHandle, MutableHandleObject, MutableHandleValue,
26 };
27 pub(crate) use js::typedarray;
28 pub(crate) use js::typedarray::{
29 HeapArrayBuffer, HeapArrayBufferView, HeapFloat32Array, HeapFloat64Array, HeapUint8Array,
30 HeapUint8ClampedArray,
31 };
32
33 pub(crate) use crate::callback::{
34 CallbackContainer, CallbackFunction, CallbackInterface, CallbackObject, ExceptionHandling,
35 HasCallbackHolder, OwnerWindow, RootedCallback, ThisReflector, TracedCallback, call_setup,
36 create_callback_rooted, wrap_call_this_value,
37 };
38 pub(crate) use crate::codegen::DomTypes::DomTypes;
39 pub(crate) use crate::codegen::GenericUnionTypes;
40 pub(crate) use crate::conversions::{StringificationBehavior, root_from_handlevalue};
41 pub(crate) use crate::error::Error::JSFailed;
42 pub(crate) use crate::error::Fallible;
43 pub(crate) use crate::interfaces::*;
44 pub(crate) use crate::lock::ThreadUnsafeOnceLock;
45 pub(crate) use crate::num::Finite;
46 pub(crate) use crate::proxyhandler::{CrossOriginProperties, is_platform_object_same_origin};
47 pub(crate) use crate::reflector::DomObject;
48 pub(crate) use crate::root::DomRoot;
49 pub(crate) use crate::str::{ByteString, DOMString, USVString};
50 pub(crate) use crate::trace::RootedTraceableBox;
51 pub(crate) use crate::utils::{get_dictionary_property, set_dictionary_property};
52}
53
54pub(crate) mod module {
55 pub(crate) use std::cmp;
56 pub(crate) use std::ptr::NonNull;
57
58 pub(crate) use js::conversions::ToJSValConvertible;
59 pub(crate) use js::glue::{
60 CreateProxyHandler, GetProxyReservedSlot, JS_GetReservedSlot, ProxyTraps,
61 };
62 pub(crate) use js::jsapi::{
63 __BindgenBitfieldUnit, CallArgs, GCContext, Handle as RawHandle, HandleId as RawHandleId,
64 HandleObject as RawHandleObject, JS_SetReservedSlot, JSCLASS_FOREGROUND_FINALIZE,
65 JSCLASS_RESERVED_SLOTS_SHIFT, JSClass, JSClassOps, JSFunctionSpec, JSJitGetterCallArgs,
66 JSJitInfo, JSJitInfo__bindgen_ty_1, JSJitInfo__bindgen_ty_2, JSJitInfo__bindgen_ty_3,
67 JSJitInfo_AliasSet, JSJitInfo_ArgType, JSJitInfo_OpType, JSJitMethodCallArgs,
68 JSJitSetterCallArgs, JSNativeWrapper, JSPROP_ENUMERATE, JSPROP_PERMANENT, JSPROP_READONLY,
69 JSPropertySpec, JSPropertySpec_Accessor, JSPropertySpec_AccessorsOrValue,
70 JSPropertySpec_AccessorsOrValue_Accessors, JSPropertySpec_Kind, JSPropertySpec_Name,
71 JSPropertySpec_ValueWrapper, JSPropertySpec_ValueWrapper__bindgen_ty_1,
72 JSPropertySpec_ValueWrapper_Type, JSTracer, JSTypedMethodJitInfo, JSValueType,
73 MutableHandle as RawMutableHandle, MutableHandleIdVector as RawMutableHandleIdVector,
74 MutableHandleObject as RawMutableHandleObject, MutableHandleValue as RawMutableHandleValue,
75 ObjectOpResult, PropertyDescriptor, SymbolCode, jsid,
76 };
77 pub(crate) use js::panic::wrap_panic;
78 pub(crate) use js::rust::wrappers2::{
79 Call, GetRealmFunctionPrototype, GetWellKnownSymbol, JS_DefinePropertyById2,
80 JS_ForwardGetPropertyTo, JS_GetProperty, JS_GetPropertyDescriptorById, JS_HasPropertyById,
81 JS_NewObjectWithoutMetadata, JS_NewPlainObject, JS_SetImmutablePrototype, JS_SetProperty,
82 JS_SetPrototype, RUST_SYMBOL_TO_JSID,
83 };
84 pub(crate) use js::rust::{CustomAutoRooterGuard, GCMethods, Handle, MutableHandle};
85 pub(crate) use js::{
86 JS_CALLEE, JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_GLOBAL, JSCLASS_RESERVED_SLOTS_MASK,
87 typedarray,
88 };
89 pub(crate) use servo_config::pref;
90
91 pub(crate) use super::base::*;
92 pub(crate) use crate::codegen::Globals::Globals;
93 pub(crate) use crate::codegen::{PrototypeList, RegisterBindings};
94 pub(crate) use crate::constant::{ConstantSpec, ConstantVal};
95 pub(crate) use crate::constructor::{
96 CallbackInit, InitType, InterfaceInit, NamespaceInit, call_default_constructor,
97 create_callback_interface_objects, create_interface, create_namespace_interface_objects,
98 };
99 #[cfg(feature = "testbinding")]
100 pub(crate) use crate::conversions::native_from_handlevalue;
101 pub(crate) use crate::conversions::{
102 StringificationBehavior, is_array_like, jsid_to_string, native_from_object_static,
103 };
104 pub(crate) use crate::error::{Error, ErrorResult};
105 pub(crate) use crate::finalize::{
106 finalize_common, finalize_global, finalize_weak_referenceable,
107 };
108 pub(crate) use crate::guard::{Condition, Guard};
109 pub(crate) use crate::inheritance::Castable;
110 pub(crate) use crate::interface::{
111 ConstructorClassHook, InterfaceConstructorBehavior, NonCallbackInterfaceObjectClass,
112 ProtoOrIfaceIndex, create_global_object, create_named_constructors,
113 create_noncallback_interface_object, define_dom_interface, define_guarded_methods,
114 define_guarded_properties, get_per_interface_object_handle, is_exposed_in,
115 };
116 pub(crate) use crate::iterable::{Iterable, IterableIterator, IteratorType};
117 pub(crate) use crate::js::{JS_DefineProperty, PropertyFlags};
118 pub(crate) use crate::like::{Maplike, Setlike};
119 pub(crate) use crate::mem::malloc_size_of_including_raw_self;
120 pub(crate) use crate::namespace::NamespaceObjectClass;
121 pub(crate) use crate::proxyhandler::{get_expando_object, set_property_descriptor};
122 #[cfg(feature = "testbinding")]
123 pub(crate) use crate::root::{Dom, DomSlice};
124 pub(crate) use crate::root::{MaybeUnreflectedDom, Root};
125 pub(crate) use crate::utils::{
126 DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, DOMClass, DOMJSClass, JSCLASS_DOM_GLOBAL,
127 ProtoOrIfaceArray, call_policies, enumerate_global, enumerate_window, exception_to_promise,
128 generic_getter, generic_method, generic_setter, generic_static_promise_method,
129 get_array_index_from_id, get_property_on_prototype, has_property_on_prototype,
130 may_resolve_global, may_resolve_window, resolve_global, resolve_window, trace_global,
131 };
132 pub(crate) use crate::{JSTraceable, proxyhandler};
133}