react-native-nitro-modules 0.33.3 → 0.33.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,8 +25,10 @@ std::string ThreadUtils::getThreadName() {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
void ThreadUtils::setThreadName(const std::string& name) {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
jni::ThreadScope::WithClassLoader([&]() {
|
|
29
|
+
auto jName = jni::make_jstring(name);
|
|
30
|
+
JThreadUtils::setCurrentThreadName(jName);
|
|
31
|
+
});
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
bool ThreadUtils::isUIThread() {
|
package/cpp/views/CachedProp.hpp
CHANGED
|
@@ -17,9 +17,21 @@ template <typename T>
|
|
|
17
17
|
struct CachedProp {
|
|
18
18
|
public:
|
|
19
19
|
T value;
|
|
20
|
-
BorrowingReference<jsi::Value> jsiValue;
|
|
21
20
|
bool isDirty = false;
|
|
22
21
|
|
|
22
|
+
// Default constructor
|
|
23
|
+
CachedProp() = default;
|
|
24
|
+
// Constructor with value
|
|
25
|
+
CachedProp(T&& value, BorrowingReference<jsi::Value>&& jsiValue)
|
|
26
|
+
: value(std::move(value)), isDirty(true), jsiValue(std::move(jsiValue)) {}
|
|
27
|
+
// Copy/Move/Destruct
|
|
28
|
+
CachedProp(const CachedProp&) = default;
|
|
29
|
+
CachedProp(CachedProp&&) = default;
|
|
30
|
+
~CachedProp() = default;
|
|
31
|
+
|
|
32
|
+
private:
|
|
33
|
+
BorrowingReference<jsi::Value> jsiValue;
|
|
34
|
+
|
|
23
35
|
public:
|
|
24
36
|
bool equals(jsi::Runtime& runtime, const jsi::Value& other) const {
|
|
25
37
|
if (jsiValue == nullptr) {
|
|
@@ -40,7 +52,7 @@ public:
|
|
|
40
52
|
JSICacheReference cache = JSICache::getOrCreateCache(runtime);
|
|
41
53
|
cached = cache.makeShared(jsi::Value(runtime, value));
|
|
42
54
|
}
|
|
43
|
-
return CachedProp<T>(std::move(converted), std::move(cached)
|
|
55
|
+
return CachedProp<T>(std::move(converted), std::move(cached));
|
|
44
56
|
}
|
|
45
57
|
};
|
|
46
58
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-modules",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.5",
|
|
4
4
|
"description": "Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|