Skip to content

Truly independent web browser

LibJS: Remove the unused property_key_into_abi

Shannon Boothb150ce25de26
diff --git a/Libraries/LibJS/Rust/src/embedding/abi_types.rs b/Libraries/LibJS/Rust/src/embedding/abi_types.rs
index a119998d669..e0091070239 100644
--- a/Libraries/LibJS/Rust/src/embedding/abi_types.rs
+++ b/Libraries/LibJS/Rust/src/embedding/abi_types.rs
@@ -23,7 +23,6 @@
//! - Property keys cross as the one word of the engine's own property key, which JS::PropertyKey encodes the same way.
use core::ffi::c_void;
-use core::mem::ManuallyDrop;
use core::ptr::NonNull;
use ak::Utf16String;
@@ -382,15 +381,6 @@ pub unsafe fn owned_utf16_string_from_abi(string: JSOwnedUtf16String) -> Utf16St
const _: () = assert!(size_of::<JSPropertyKey>() == size_of::<PropertyKey>());
const _: () = assert!(align_of::<JSPropertyKey>() == align_of::<PropertyKey>());
-/// Gives the key's reference, if it holds a string, to the embedder.
-pub fn property_key_into_abi(key: PropertyKey) -> JSPropertyKey {
- let key = ManuallyDrop::new(key);
- // SAFETY: A property key is one word, which the key no longer releases.
- JSPropertyKey {
- bits: unsafe { core::ptr::from_ref(&*key).cast::<usize>().read() },
- }
-}
-
/// # Safety
///
/// `key` must point to the word of a property key that stays alive for `'key`.