Skip to content

Instantly share code, notes, and snippets.

..and I see it for most (all?) app-services crates, but not httpconfig/viaduct:

out/sources/mozilla/appservices/autofill/UniffiForeignFutureCompleteRustBuffer.java
out/sources/mozilla/appservices/autofill/UniffiForeignFutureStructRustBuffer.java
diff --git a/components/viaduct/src/new_backend.rs b/components/viaduct/src/new_backend.rs
index 8217ddf3c8..e6d115f91d 100644
--- a/components/viaduct/src/new_backend.rs
+++ b/components/viaduct/src/new_backend.rs
@@ -30,6 +30,7 @@
#[uniffi::export]
pub fn init_backend(backend: Arc<dyn Backend>) -> Result<()> {
+ panic!("Forcing panic");
old_backend::set_backend(Box::leak(Box::new(backend.clone())))?;
09-25 10:29:04.646 12809 12820 W System : A resource failed to call close.
09-25 10:29:04.647 12809 12820 W System : A resource failed to call close.
09-25 10:29:05.274 12851 12882 D EGL_emulation: app_time_stats: avg=1.61ms min=0.73ms max=10.65ms count=58
09-25 10:29:06.289 12851 12882 D EGL_emulation: app_time_stats: avg=6.13ms min=0.81ms max=46.53ms count=46
09-25 10:29:07.290 12851 12882 D EGL_emulation: app_time_stats: avg=4.32ms min=0.72ms max=19.25ms count=53
09-25 10:29:08.216 12851 12851 I nimbus::stateful::persistence: Already at version 3, no upgrade needed
09-25 10:29:08.216 12851 12851 I nimbus::stateful::persistence: Already at version 3, no upgrade needed
09-25 10:29:08.227 12851 13155 I nimbus::stateful::nimbus_client: updating experiment list
09-25 10:29:08.227 12851 13155 I nimbus::stateful::nimbus_client: updating experiment list
09-25 10:29:08.228 12851 13155 I nimbus::stateful::nimbus_client: [Nimbus] Retrieved date from Context: 2025-09-25 14:28:41 UTC
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
index 39a7c4711f..fd72367ce9 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
@@ -241,7 +241,7 @@
initializeGlean()
// Attention: Do not invoke any code from a-s in this scope.
- val megazordSetup = finishSetupMegazord()
+ finishSetupMegazord()
# 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/.
import argparse
import os
import subprocess
from enum import Enum
from mach.decorators import Command, CommandArgument, SubCommand
@bendk
bendk / changes.diff
Last active June 3, 2025 16:14
Diff from removing AsRef
diff --git a/docs/manual/src/internals/bindings_ir_pipeline.md b/docs/manual/src/internals/bindings_ir_pipeline.md
index ec5c5223a2..3e985e4a85 100644
--- a/docs/manual/src/internals/bindings_ir_pipeline.md
+++ b/docs/manual/src/internals/bindings_ir_pipeline.md
@@ -178,46 +178,6 @@
}
```
-## AsRef
-
diff --git a/examples/custom-types/Cargo.toml b/examples/custom-types/Cargo.toml
index 772d1bbcad..540e9f270b 100644
--- a/examples/custom-types/Cargo.toml
+++ b/examples/custom-types/Cargo.toml
@@ -12,6 +12,7 @@
[dependencies]
anyhow = "1"
bytes = "1.3"
+thiserror = "1"
uniffi = { workspace = true }
@bendk
bendk / data.json
Created May 10, 2024 14:31
Harry & David keywords example
{
"full_keywords": [...],
"iab_category": "22 - Shopping",
"id": 4608,
"impression_url": "https://imp.mt48.net/static?v=2&partner=firefoxmobilecla&sub1=harrydavid&sub2=us&adv-id=75041&custom-data=4608",
"keywords": [
"bak",
"bake",
"baker",
"baker ",
diff --git a/toolkit/components/uniffi-js/UniFFIPointer.cpp b/toolkit/components/uniffi-js/UniFFIPointer.cpp
index b77ef853957a7..edc6f69d90c28 100644
--- a/toolkit/components/uniffi-js/UniFFIPointer.cpp
+++ b/toolkit/components/uniffi-js/UniFFIPointer.cpp
@@ -81,6 +82,11 @@ void UniFFIPointer::Write(const ArrayBuffer& aArrayBuff, uint32_t aPosition,
// in Rust and Read(), a u64 is read as BigEndian and then converted to
// a pointer we do the reverse here
const auto& data_ptr = aData.Subspan(aPosition, 8);
+ // The hazard checker assumes all calls to a function pointer may result in a GC call and
+ // `ClonePtr` calls mType->clone. However, we know that mtype->clone won't make a GC call
diff --git a/components/suggest/src/db.rs b/components/suggest/src/db.rs
index b92942d8e..a237f6893 100644
--- a/components/suggest/src/db.rs
+++ b/components/suggest/src/db.rs
@@ -400,7 +400,7 @@ impl<'a> SuggestDao<'a> {
&self,
query: &SuggestionQuery,
provider: &SuggestionProvider,
- mapper: impl FnMut(&rusqlite::Row) -> Result<T>,
+ mut mapper: impl FnMut(&rusqlite::Row, &str, &str) -> Result<T>,