458 Commits
Author SHA1 Message Date
Marc Rousavy 971d6ba3f8 chore: release 0.37.1 2026-08-27 11:43:18 +02:00
Marc RousavyandGitHub 84d184dd61 fix: Report native ArrayBuffer memory pressure (#1523)
* fix: Report native ArrayBuffer memory pressure

* test: Move ArrayBuffer memory pressure coverage
2026-08-21 18:34:36 +02:00
Marc RousavyandGitHub 6d0b5e2251 fix: Hide React Native version checks from public headers (#1521) 2026-08-21 13:56:26 +02:00
Marc Rousavy ec2cc2f239 chore: release 0.37.0 2026-08-20 19:44:15 +02:00
Marc Rousavy 195cfba0aa chore: release 0.37.0-beta.1 2026-08-20 18:35:52 +02:00
Marc RousavyandGitHub 996c7ed992 fix: Rename CachedProp to ReactProp, re-add legacy CachedProp as deprecated (#1517)
The v0.37.0 View props rewrite changed `CachedProp<T>`'s API (immutable
shared entry, `get()`/`isProvided()`/`hasSameValue()`), which broke
modules whose specs were generated by nitrogen <= 0.36.x - their generated
code uses the old mutable API (`.value`, `.isDirty`, 3-arg
`fromRawValue(runtime, value, oldProp)`) and no longer compiled against
the new core.

- Rename the new implementation to `ReactProp<T>` (cpp/views/ReactProp.hpp),
  and fold its now-single-use private helpers into `fromRawValue`
- Re-add `CachedProp<T>` exactly as it shipped in v0.36.5, marked
  [[deprecated]], so old generated specs compile again (with a warning)
- Update nitrogen to emit `ReactProp` and re-generate nitro-test specs
2026-08-20 18:33:05 +02:00
Marc Rousavy 4858bb3d0d chore: release 0.37.0-beta.0 2026-08-20 17:02:18 +02:00
Marc RousavyandGitHub 50f00a44e2 fix: Preserve native View prop defaults (#1510) 2026-08-20 15:42:34 +02:00
Marc RousavyandGitHub be66726759 fix: Make View prop snapshots truly immutable via diffing (#1506)
* fix: Diff immutable Nitro View props

* fix: inline view prop change check
2026-08-20 15:27:05 +02:00
Marc RousavyandGitHub 551749f430 fix: Preserve classic View prop parsing across React Native versions (#1507) 2026-08-20 11:50:54 +02:00
Marc RousavyandGitHub f96e3e5595 fix: Make CachedProp<T>'s data immutable (#1503) 2026-08-20 11:16:30 +02:00
Marc RousavyandGitHub d61a6e1cf9 fix: Avoid dangling View props reference (#1502)
* fix dangling View props reference

* refactor View props casts for clarity
2026-08-20 11:14:49 +02:00
Marc RousavyandGitHub 284d87b423 fix: require props-constructible View state on Android (#1501) 2026-08-20 10:50:16 +02:00
Marc RousavyandGitHub cfd7c50d3f fix: call base View Component Descriptor adopt (#1500) 2026-08-20 10:50:16 +02:00
Marc RousavyandGitHub 58e865309f fix: Add RawPropsParser JSI Parser bool argument on RN <85 (#1491)
* chore: Split out `callback` to a separate file

* fix: Add `RawPropsParser` JSI Parser bool argument on RN <85
2026-08-20 10:50:15 +02:00
Marc RousavyandGitHub f6048076cb feat: Move Props into Nitro Modules core via C++ template (#1487)
* feat: Move `Props` into Nitro Modules core via C++ template

* Update Podfile.lock

* Generate props in user code again

* Use CachedProp constructor

* include properly

* Update IsFunctionProp.hpp

* refactor

* simplify
2026-08-20 10:50:14 +02:00
Marc RousavyandGitHub 670f4654f5 feat: Move react::ComponentDescriptor into Nitro Modules core via C++ template (#1486)
* feat: Add base files

* use type

* clean header

* Update ViewComponentDescriptor.hpp

* Use it!

* fix build error

* comments

* Update JSIRawPropsParser.hpp

* remove raw prop parser ig

* fix: remove deleted header from podspec
2026-08-20 10:50:14 +02:00
Marc Rousavy 4c80cb159f chore: release 0.36.5 2026-07-31 16:20:29 +02:00
Marc RousavyandGitHub 3691f5e389 fix: Fix cyclic JVM reference on CxxPart (memory leak) (#1459)
* chore: Test all allocation tests with 55k objects

* Update getTests.ts

* Update ThreadPool.cpp

* fix callback exhaust memory

* fix: Update Harness to 1.4.0-rc.1 to detect native crashes

* fix: Fix cyclic JVM reference on `CxxPart` (memory leak) (#1460)

* fix: Fix cyclic JVM reference on `CxxPart` (memory leak)

* perf: Remove C++ mutex

* Update JHybridObject.cpp

* Make it lazy

* fix: Just use a `var`

* doc

* Update HybridObject.kt
2026-07-31 16:02:57 +02:00
Marc Rousavy 593268e3ff chore: release 0.36.4 2026-07-30 12:31:12 +02:00
Marc Rousavy 4e721dbe04 chore: release 0.36.3 2026-07-27 18:36:57 +02:00
Marc Rousavy b3af81cdc8 chore: release 0.36.2 2026-07-27 18:13:40 +02:00
Ritesh ShuklaandGitHub 5d155afb60 fix: Re-create JS object on dead runtime cache entry (#1442) 2026-07-27 18:09:37 +02:00
Ritesh ShuklaandGitHub 733cac0fd7 perf: Reuse cached PropNameIDs in Record<string, T>::toJSI(...) conversion (#1429) 2026-07-01 14:56:45 +02:00
Marc Rousavy 569be3cd39 chore: release 0.36.1 2026-06-30 11:07:23 +02:00
Marc Rousavy 0891b58ee4 chore: release 0.36.0 2026-06-30 10:46:04 +02:00
Marc Rousavy f6e82d3aa3 chore: release 0.35.11 2026-06-24 16:15:04 +02:00
a4cf95da19 fix: Read _tasks.empty() under _queueMutex in ThreadPool::run() (#1413)
_tasks is a std::queue (backed by std::deque), not thread-safe.
Reading empty() outside the lock while worker threads call pop() and
run() itself calls push() is an unsynchronized access — a data race
caught by TSan. Move the check inside the existing lock scope and call
addThread() after releasing (since addThread() also takes _queueMutex).

Co-authored-by: Miklós Fazekas <boga@MBPM5P.local>
Co-authored-by: Marc Rousavy <me@mrousavy.com>
2026-06-24 16:10:04 +02:00
cd3d48677e fix: Synchronize C++ Promise<T> state-inspection accessors (#1398)
* fix(core): synchronize C++ `Promise<T>` state-inspection accessors

`resolve()`/`reject()` write `_state` under `_mutex`, but `isPending`/
`isResolved`/`isRejected`/`getResult`/`getError` read it lock-free.
`JSIConverter<shared_ptr<Promise<T>>>::toJSI` runs those reads on the JS thread
the instant a hybrid method returns, racing an off-JS-thread `resolve()`
(`Promise::async` / `Promise.parallel` / a main-thread resolve). Data race on the
`std::variant _state`, flagged by ThreadSanitizer.

Make `_mutex` mutable and acquire it in the inspection accessors. The lock-free
bodies move to private overloads that take a `unique_lock` (the caller proves it
holds the lock), so `getResult()`/`isPending()`-style call sites stay intact
without recursive self-locking. `resolve`/`reject` set the state and drain the
listeners under a single lock via `takeResolvedListeners(lock)`/
`takeRejectedListeners(lock)`, then fire them outside the lock; the `NITRO_DEBUG`
state assert runs just before the lock. Same treatment for `Promise<void>`.

* refactor(core): address review feedback on Promise synchronization

- Remove takeResolvedListenersAndClearAllListeners / takeRejectedListenersAndClearAllListeners helpers; inline as std::move + clearAllListeners
- Restore readable if/else structure in addOnXxxListener, using lock.unlock() before invoking the callback instead of nested RAII blocks with early returns
- Capture result pointer inside the lock in resolve() to avoid a second lock acquisition

* refactor(core): drop listeners outside lock by moving instead of clearing

* Update packages/react-native-nitro-modules/cpp/core/Promise.hpp

Co-authored-by: Marc Rousavy <me@mrousavy.com>

* refactor(core): remove redundant inline comments from listener methods

* fix(core): fix rebase artifact in resolve(const TResult&) — remove duplicate declaration and stale clearAllListeners

* refactor(core): remove remaining inline comment from addOnRejectedListener

* refactor(core): restore inline comments in addOnXxxListener per reviewer

---------

Co-authored-by: Miklós Fazekas <boga@MBPM5P.local>
Co-authored-by: Marc Rousavy <me@mrousavy.com>
2026-06-22 15:13:29 +02:00
Marc Rousavy 334f8a9f6b chore: release 0.35.9 2026-05-27 17:27:59 +02:00
Marc Rousavy e6addf5513 chore: Bump to 0.35.8 now 2026-05-27 17:25:52 +02:00
Marc Rousavy 78a4886899 chore: release 0.35.7 2026-05-19 16:15:55 +02:00
Marc Rousavy 5210f2d75d chore: release 0.35.6 2026-04-28 17:22:50 +02:00
Marc Rousavy 9d1efe1776 chore: release 0.35.5 2026-04-23 14:07:08 +02:00
Marc Rousavy 449a798c40 chore: release 0.35.4 2026-04-08 12:27:55 +02:00
Marc Rousavy 5f9789bf32 chore: release 0.35.3 2026-04-02 18:35:19 +02:00
Marc RousavyandGitHub ab2a05085f fix: Some code cleanups (atomic<bool>, move assignment, const) (#1269)
* fix: Make more stuff `const`

* fix: Add move assignment operator for `WeakReference`

* fix: Use `atomic<bool>` for `ReferenceState`
2026-03-18 12:09:26 +01:00
Marc Rousavy 8fb866845c chore: release 0.35.2 2026-03-15 21:14:15 +01:00
Marc Rousavy 00111f94eb chore: Release 0.35.1 2026-03-13 14:47:35 +01:00
Marc Rousavy 2c0da09f11 chore: release 0.35.1 2026-03-11 15:42:33 +01:00
Marc Rousavy f2d7bd70aa chore: release 0.35.1-beta.0 2026-03-11 13:11:12 +01:00
Marc Rousavy ad570a5a12 chore: release 0.35.0 2026-03-04 14:10:26 +01:00
Marc Rousavy d8e81e653c chore: release 0.35.0-beta.0 2026-03-03 17:58:49 +01:00
Marc RousavyandGitHub 176530872b chore: Add tests for verifying Java GC leaks (#1239)
* chore: Add tests for verifying Java GC leaks

* feat: Add `debug_getTotalAllocatedHybridObjects()`

* chore: Update leak test

* fix: Fix allocation test

* fix: Require at least 10% GC cleanup

* Update HybridNitroModulesProxy.cpp
2026-03-03 15:54:31 +01:00
Marc Rousavy 54fc36949c chore: release 0.34.1 2026-02-27 13:54:11 +01:00
Marc Rousavy 9cab6deea9 chore: release 0.34.0 2026-02-26 21:22:15 +01:00
Marc RousavyandGitHub c2b4ba4932 feat: Add createNativeArrayBuffer(size) to NitroModulesProxy (#1226)
* feat: Add `createNativeArrayBuffer(size)` to NitroModulesProxy

* docs

* format js
2026-02-26 21:15:39 +01:00
Marc RousavyandGitHub 3d4070be5f fix: Rename initialize() to registerNatives() to be more aligned with fbjni (#1225)
* fix: Rename `initialize()` to `registerNatives()` to be more aligned with fbjni

* Add `fbjni` include

* Mark `initialize()` as deprecated

* rename `registerNatives()` to `registerAllNatives()`
2026-02-26 20:40:37 +01:00
Ritesh ShuklaandGitHub 23cccbaa17 fix: Fix AnyMap canConvert to check values instead of keys (#1163)
* fix: canConvert bug

* fix: lint
2026-02-23 15:43:11 +01:00
Marc Rousavy c88e602111 chore: release 0.33.9 2026-02-12 12:01:51 +01:00