Skip to content

Commit 321e6d9

Browse files
committed
release: 8.5.1
1 parent 32c7abb commit 321e6d9

File tree

2 files changed

+118
-1
lines changed

2 files changed

+118
-1
lines changed

CHANGELOG.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,120 @@
1+
## [8.5.1](https://github.com/NativeScript/android/compare/v8.5.0...v8.5.1) (2023-07-24)
2+
3+
4+
### Bug Fixes
5+
6+
* Avoid setting the same property on an ObjectTemplate twice ([9e610c8](https://github.com/NativeScript/android/commit/9e610c8b61a721c04b0a7b8f5167f5b070c5419f))
7+
* Don't access `super` property on implementation object ([d8b8bc0](https://github.com/NativeScript/android/commit/d8b8bc02cf51de021855bb6a39ccd39ce1287304))
8+
* Don't iterate properties in GetImplementedInterfaces ([9dfae65](https://github.com/NativeScript/android/commit/9dfae6589caad31ee50a5946e7369f12505cd955))
9+
* intermediary fix for https://github.com/NativeScript/android/pull/1771 ([32c7abb](https://github.com/NativeScript/android/commit/32c7abb3418b20d1ac2d80c18c5e25a402937628))
10+
* Leave context after Runtime::PrepareV8Runtime() ([cd1d285](https://github.com/NativeScript/android/commit/cd1d2850e5c28d89339a90d783db1f1623957be7))
11+
* memory leak on accessing static interface methods ([88ce2d8](https://github.com/NativeScript/android/commit/88ce2d8b2c2ccf5568d1b95f0bf9df47179f658a))
12+
* memory leak on saving code cache ([6d416a1](https://github.com/NativeScript/android/commit/6d416a11e5b304d8ac2bfb4c48931a22e353df72))
13+
* Update common-runtime-tests-app ([c8db3ca](https://github.com/NativeScript/android/commit/c8db3cab6b3e3ddd41ab94adb8edac46a704cbe9))
14+
* update legacy android version in package.json ([#1744](https://github.com/NativeScript/android/issues/1744)) ([b4ad8e5](https://github.com/NativeScript/android/commit/b4ad8e541ff211055dc5197c7e0b350b6666771f))
15+
* Use Isolate::TryGetCurrent() ([afe026a](https://github.com/NativeScript/android/commit/afe026a29f3e9a1a5e533e4c66fd013f5f7f163c))
16+
17+
18+
* Remove weak callback from __postFrameCallback cache (#1755) ([ff1b979](https://github.com/NativeScript/android/commit/ff1b97975c7fdcd6b2acfb6153ba635d4f420eff)), closes [#1755](https://github.com/NativeScript/android/issues/1755)
19+
20+
21+
### Features
22+
23+
* add support for kotlin 1.8 ([#1765](https://github.com/NativeScript/android/issues/1765)) ([1a928e4](https://github.com/NativeScript/android/commit/1a928e47e733b1d4ba2bb83b4f541e1cac835155))
24+
25+
26+
### Performance Improvements
27+
28+
* avoid unnecessary string copying when calling static properties of interfaces ([8b53d02](https://github.com/NativeScript/android/commit/8b53d022315d4a7fa9d617f431e0364030942d24))
29+
30+
31+
### BREAKING CHANGES
32+
33+
* __startNDKProfiler() and __stopNDKProfiler() global
34+
bindings no longer available.
35+
36+
The NDK profiler was not functional, since nothing in the build process
37+
defined the NDK_PROFILER_ENABLED preprocessor symbol. The start and stop
38+
functions were already no-ops.
39+
40+
* chore: Remove outdated comment
41+
42+
RunMicrotasks no longer exists, it's already been replaced in the code
43+
with PerformMicrotaskCheckpoint.
44+
45+
* chore: Use unique_ptr for NewBackingStore in byte buffers
46+
47+
V8 doc: https://docs.google.com/document/d/1sTc_jRL87Fu175Holm5SV0kajkseGl2r8ifGY76G35k/edit
48+
49+
The V8 usage examples show unique_ptr here; it probably doesn't matter
50+
much, but we don't need the backing store after creating the ArrayBuffer,
51+
and I believe shared_ptr is slightly more overhead than unique_ptr.
52+
53+
For convenience, replace the manual empty deleter for direct buffers with
54+
v8::BackingStore::EmptyDeleter.
55+
56+
* chore: Remove weak finalizer callback from __postFrameCallback()
57+
58+
Weak finalizer callbacks are going away in V8 11.x, so we have to remove
59+
this one. Luckily, a finalizer callback is not necessary - it's never
60+
needed to prevent the frame callback from being collected.
61+
62+
However, a weak callback is not necessary in the first place. We can just
63+
clean up the cache entry after the callback is executed, since it is only
64+
executed once.
65+
66+
Note that the call to erase() destructs the FrameCallbackCacheEntry
67+
instance, making `entry` a dangling pointer, so don't use it after the
68+
erase(). There's probably a safer way to do this, although the way that
69+
first occurred to me (pass the key to the callback instead of the entry,
70+
and then use std::unordered_map::extract()) is not available on
71+
robin_hood::unordered_map.
72+
73+
* fix: Make sure frame callbacks are not ignored
74+
75+
There was a bug where __postFrameCallback() would not always cause the
76+
callback to be called. Without initializing `removed`, sometimes it would
77+
have a nonzero value, so the callback would be ignored.
78+
79+
* chore: Clear callback caches' persistent handles in destructor
80+
81+
Clearing the persistent handles in the destructor makes it a bit easier to
82+
deal with the cache entry's lifetime: they are cleared whenever the entry
83+
is removed from the cache.
84+
85+
We do this for both the main thread callback cache and the frame callback
86+
cache.
87+
88+
Adding a destructor makes the cache entries non-movable. But the only
89+
place where they were moved was when inserting them into the cache anyway.
90+
We can use C++17's try_emplace() method to insert them without having to
91+
move them.
92+
93+
* chore: Construct FrameCallbackCacheEntry with ID
94+
95+
This avoids the situation of forgetting to add an ID to the cache entry.
96+
97+
* chore: Improve usage of unordered_map APIs in CallbackHandlers
98+
99+
This fixes a few places where we can avoid double lookups:
100+
101+
- In RunOnMainThreadFdCallback, we already have a valid iterator, so no
102+
need to look up the same key again in RemoveKey (this is the only usage
103+
of RemoveKey, so we can remove it.) (Additionally, we probably want to
104+
remove the cache entry before throwing a NativeScript exception.)
105+
106+
- In PostFrameCallback and RemoveFrameCallback, we should not do
107+
contains() immediately followed by find().
108+
109+
* chore: Fix runtime typo
110+
111+
* chore: Ignore main thread and frame callback return values
112+
113+
We don't do anything with the return value from these callbacks, so it's
114+
OK to ignore them and not convert them to a local handle.
115+
116+
117+
1118
# [8.5.0](https://github.com/NativeScript/android/compare/v8.4.0...v8.5.0) (2023-06-27)
2119

3120

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/android",
33
"description": "NativeScript for Android using v8",
4-
"version": "8.5.0",
4+
"version": "8.5.1",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/NativeScript/android.git"

0 commit comments

Comments
 (0)