Commit Graph
23 Commits
Author SHA1 Message Date
Marc RousavyandGitHub e7b9f412eb fix: Rewrite Logger to use platform NSLog / __android_log_print (#54)
* fix: Fix wrong include..?

* fix: Reimplement NitroLogger as a platform-specific logger

* fix: Copy args, and use proper tag

* fix: Fix sprintf crash because of wrong format argument

* fix: Fix Logger usage on iOS
2024-08-20 16:20:44 +02:00
Marc RousavyandGitHub 065736dc2e feat: Base for Kotlin modules (#45)
* feat: Base for Kotlin modules

* fix: Properly make sure Nitro C++ is initialized

* Update JNIOnLoad.java

* feat: Set up `initHybrid()` in JHybridObject

* chore: Fix a bunch of linter issues

* fix: Fix fbjni codegen

* Update JHybridObject.hpp

* fix: Make `initHybrid()` JVM static

* feat: Make `mHybridData` private member of each in inheritance chain

* Generate specs

* feat: Set up proper inheritance graph in FBJNI using virtual inheritance `HybridObject` (#46)

* feat: Try to set up proper inheritance in FBJNI

* Virtual inheritance

* Update JHybridImageFactorySpec.cpp

* It works...

* feat: Virtual base

* Update HybridTestObject.hpp

* Update CMakeLists.txt

* Update JHybridObject.hpp

* Virtual dtor

* Dynamic cast to NativeState 🤔

* Virtual proper

* feat: Generate as virtual base?

* chore: Change to `updateNative`

* feat: Cannot default-construct HybridObject

* fix: Use `dynamic` pointer cast for `HybridContext` because `HybridObject` is now a virtual base

* Update README.md
2024-08-19 12:40:44 +02:00
Marc Rousavy 0b7e2b5561 fix: Fix JSICache<T> being recreated each time because of C++ template specialization 2024-08-06 01:37:08 +02:00
Marc Rousavy a522f09327 fix: Put template<...> on a separate line 2024-08-02 12:37:03 +02:00
Marc Rousavy 1ca53519c5 chore: Format code 2024-08-02 00:10:17 +02:00
Marc Rousavy c66064aa1f fix: Use atomic_size_t to prevent race conditions in OwningReference 2024-08-01 17:13:09 +02:00
Marc Rousavy ee41df2d99 fix: lock _mutex when lock()ing or comparing OwningReference 2024-08-01 17:09:28 +02:00
Marc Rousavy 9d69ba04ab chore: Run clang format 2024-07-31 17:39:56 +02:00
Marc Rousavy 3e0279a71f feat: Create JSICacheReference for safer cache access 2024-07-30 11:41:01 +02:00
Marc Rousavy 45d5342b92 feat: Use OwningLock<T> in function callbacks 2024-07-30 11:10:38 +02:00
Marc Rousavy fc4eb15a4e feat: Create OwningLock to lock mutex 2024-07-30 10:50:47 +02:00
Marc Rousavy 705efdc717 fix: Throw mutex on all pointer operations 2024-07-30 10:50:21 +02:00
Marc Rousavy a0c7caa2a8 fix: Properly get memory size including own cache map size 2024-07-23 01:34:44 +02:00
Marc Rousavy 6b15467af8 Some final declarations 2024-07-18 01:30:33 +02:00
Marc Rousavy 88d286450c Update OwningReference.hpp 2024-07-18 01:28:08 +02:00
Marc Rousavy 803c7bfbf9 feat: Implement == for OwningReference 2024-07-18 01:25:37 +02:00
Marc Rousavy 7bc2767348 fix: Move to namespace margelo::nitro 2024-07-17 21:49:11 +02:00
Marc Rousavy 295600ecd8 Comment 2024-07-14 00:52:03 +02:00
Marc Rousavy 66ef4ad304 docs 2024-07-13 12:44:02 +02:00
Marc RousavyandGitHub bb67b6a556 fix: Fix ref counting being smaller than 0 2024-07-07 20:29:16 +02:00
Marc Rousavy f1c7038227 Woohoooooo!!! 2024-06-23 11:46:32 +02:00
Marc Rousavy 9dd0cd1ea5 fix 2024-06-23 11:32:01 +02:00
Marc Rousavy 6b68537fd5 Create Borrowing/Owning reference types 2024-06-23 11:26:33 +02:00