mirror of
https://github.com/lexmount/moli.git
synced 2026-11-21 00:03:15 +00:00
Use native WebIDL declarations, stable promises, real Streams and owned networking tasks for constructor validation, datagram buffering, send groups and session failure. Preserve receiver brands, native Proxy identity, callee error realms and Window/worker ownership without fabricating a connection. Normalize registered native WritableStream proxies and keep browser networking algorithms within their selected task completion boundary. Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast --test-threads 32 --retries 0.
26 lines
968 B
Rust
26 lines
968 B
Rust
mod bindings;
|
|
mod methods;
|
|
mod store;
|
|
|
|
use moli_v8_util::{throw_type_error, v8_string};
|
|
|
|
pub use self::bindings::headers_constructor_callback;
|
|
pub use self::methods::install_headers_template_bindings;
|
|
pub use self::store::headers_entries;
|
|
pub use self::store::{HeadersGuard, combined_headers_entries, filter_headers_for_guard};
|
|
pub use self::store::{
|
|
build_headers_object, build_headers_object_with_state, headers_entries_from_init, headers_list,
|
|
mark_headers_immutable,
|
|
};
|
|
pub use self::store::{normalized_headers_entries, validated_header_entry_or_throw};
|
|
|
|
pub fn clone_headers_object<'s>(
|
|
scope: &mut v8::PinScope<'s, '_>,
|
|
original: v8::Local<'s, v8::Object>,
|
|
) -> v8::Local<'s, v8::Object> {
|
|
let entries = headers_list(scope, original);
|
|
let guard = self::store::headers_guard(scope, original);
|
|
let immutable = self::store::headers_are_immutable(scope, original);
|
|
build_headers_object_with_state(scope, &entries, guard, immutable)
|
|
}
|