summaryrefslogtreecommitdiffstats
path: root/toolkit/components/uniffi-fixture-refcounts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /toolkit/components/uniffi-fixture-refcounts
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/uniffi-fixture-refcounts')
-rw-r--r--toolkit/components/uniffi-fixture-refcounts/Cargo.toml12
-rw-r--r--toolkit/components/uniffi-fixture-refcounts/build.rs7
-rw-r--r--toolkit/components/uniffi-fixture-refcounts/src/lib.rs28
-rw-r--r--toolkit/components/uniffi-fixture-refcounts/src/refcounts.udl8
4 files changed, 0 insertions, 55 deletions
diff --git a/toolkit/components/uniffi-fixture-refcounts/Cargo.toml b/toolkit/components/uniffi-fixture-refcounts/Cargo.toml
deleted file mode 100644
index 877e502711..0000000000
--- a/toolkit/components/uniffi-fixture-refcounts/Cargo.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-[package]
-name = "uniffi-fixture-refcounts"
-edition = "2021"
-version = "0.21.0"
-license = "MPL-2.0"
-publish = false
-
-[dependencies]
-uniffi = { workspace = true }
-
-[build-dependencies]
-uniffi = { workspace = true, features = ["build"] }
diff --git a/toolkit/components/uniffi-fixture-refcounts/build.rs b/toolkit/components/uniffi-fixture-refcounts/build.rs
deleted file mode 100644
index 9ea03e12de..0000000000
--- a/toolkit/components/uniffi-fixture-refcounts/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-fn main() {
- uniffi::generate_scaffolding("./src/refcounts.udl").unwrap();
-}
diff --git a/toolkit/components/uniffi-fixture-refcounts/src/lib.rs b/toolkit/components/uniffi-fixture-refcounts/src/lib.rs
deleted file mode 100644
index e453b22a4a..0000000000
--- a/toolkit/components/uniffi-fixture-refcounts/src/lib.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/// This crate exists to test managing the Rust Arc strong counts as JS objects are
-/// created/destroyed. See `test_refcounts.js` for how it's used.
-
-use std::sync::{Arc, Mutex};
-
-pub struct SingletonObject;
-
-impl SingletonObject {
- pub fn method(&self) { }
-}
-
-static SINGLETON: Mutex<Option<Arc<SingletonObject>>> = Mutex::new(None);
-
-pub fn get_singleton() -> Arc<SingletonObject> {
- Arc::clone(SINGLETON.lock().unwrap().get_or_insert_with(|| Arc::new(SingletonObject)))
-}
-
-pub fn get_js_refcount() -> i32 {
- // Subtract 2: one for the reference in the Mutex and one for the temporary reference that
- // we're calling Arc::strong_count on.
- (Arc::strong_count(&get_singleton()) as i32) - 2
-}
-
-include!(concat!(env!("OUT_DIR"), "/refcounts.uniffi.rs"));
diff --git a/toolkit/components/uniffi-fixture-refcounts/src/refcounts.udl b/toolkit/components/uniffi-fixture-refcounts/src/refcounts.udl
deleted file mode 100644
index 25ec83cfcc..0000000000
--- a/toolkit/components/uniffi-fixture-refcounts/src/refcounts.udl
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace refcounts {
- SingletonObject get_singleton();
- i32 get_js_refcount();
-};
-
-interface SingletonObject {
- void method();
-};