Skip to content

Instantly share code, notes, and snippets.

@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>,
@bendk
bendk / output.txt
Created November 6, 2023 19:50
places-async log output
creating PlacesApi
write: inserting bookmark
sync: started
sync: Fetching incoming records...
write: inserting bookmark
write: inserting bookmark
write: inserting bookmark
write: inserting bookmark
write: inserting bookmark
write: inserting bookmark
@bendk
bendk / auth-signin.txt
Last active October 16, 2023 16:01
Fxa Logs
10-03 18:19:17.805 7160 7211 D fxa_client: uniffi_fxa_client_fn_constructor_firefoxaccount_from_json
10-03 18:19:17.808 7160 7211 D fxa_client: uniffi_fxa_client_fn_method_firefoxaccount_get_auth_state
10-03 18:19:17.809 7160 7215 D fxa_client: processChannel started: Disconnected(fromAuthIssues=true, connecting=false)
10-03 18:19:17.810 7160 7211 D fxa_client: uniffi_fxa_client_fn_method_firefoxaccount_get_auth_state
10-03 18:19:29.623 7160 7211 D fxa_client: Processing action: BeginOAuthFlow(scopes=[profile, https://identity.mozilla.com/apps/oldsync, https://identity.mozilla.com/tokens/session], entrypoint=settings-menu, result=CompletableDeferredImpl{Active}@990033)
10-03 18:19:29.629 7160 7211 D fxa_client: uniffi_fxa_client_fn_method_firefoxaccount_begin_oauth_flow
10-03 18:19:29.637 7160 7211 D fxa_client: uniffi_fxa_client_fn_method_firefoxaccount_to_json
10-03 18:19:29.645 7160 7211 D fxa_client: Changing state from Disconnected(fromAuthIssues=true, connecting=false) to Disconnected(fr

FxAccountConfig.swift

  • FxAConfig and Server: I think we can start using the Rust versions of these rather than the wrapped ones

FxAccountDeviceConstellation.swift

  • constellationStateUpdate: applications can use register_event_listener and listen for the FxaEvent::DeviceListChanged event instead.
bdk@fedora ~/Downloads ] > curl -L -v https://archive.mozilla.org/pub/app-services/releases/116.0/FocusRustComponents.xcframework.zip | sha256sum 08:57:19
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 34.117.35.28:443...
* Connected to archive.mozilla.org (34.117.35.28) port 443 (#0)
* ALPN: offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
"Nightly build publish task": {
"attributes": {
"always_target": false,
"kind": "nightly-publish",
"nightly": "nightly-only",
"run_on_projects": [
"all"
],
"run_on_tasks_for": [
"all"
/home/bdk/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android21-clang
-Wl,-soname,libmegazord.so
-Wl,--version-script=/tmp/rustcIddnNx/list
/tmp/rustcIddnNx/symbols.o
/home/bdk/application-services/main/target/i686-linux-android/release/deps/megazord.9o3j67k7wf5acc2.rcgu.o
/home/bdk/application-services/main/target/i686-linux-android/release/deps/megazord.addr2line-d910a3ddd772aeed.addr2line.957c9ab7-cgu.0.rcgu.o.rcgu.o
/home/bdk/application-services/main/target/i686-linux-android/release/deps/megazord.adler-5bf7b2291bb847ba.adler.426dec45-cgu.0.rcgu.o.rcgu.o
/home/bdk/application-services/main/target/i686-linux-android/release/deps/megazord.ahash-b732ec517ada5094.ahash.012fd152-cgu.0.rcgu.o.rcgu.o
/home/bdk/application-services/main/target/i686-linux-android/release/deps/megazord.ahash-b732ec517ada5094.ahash.012fd152-cgu.1.rcgu.o.rcgu.o
/home/bdk/application-services/main/target/i686-linux-android/release/deps/megazord.ahash-b732ec517ada5094.ahash.012fd152-cgu.2.rcgu.o.r
/// Addresses sync record
///
/// The every field in the record contributes to the key. If there are changes both locally and
/// remotely, then we fork the record into two.
///
/// Key handling quirks:
/// * If the changes are on different fields, then we merge them rather than fork
/// * We only fork records, we don't merge records if they change to be the same as another record.
#[synckit::record]
struct AddressRecord {