Releases: NativeScript/android
v8.7.0-alpha.0
v8.6.2
v8.6.1
v8.6.0
v8.5.4
v8.5.3
v8.5.2
v8.5.1
8.5.1 (2023-07-24)
Bug Fixes
-
Avoid setting the same property on an ObjectTemplate twice (9e610c8)
-
Don't access
super
property on implementation object (d8b8bc0) -
Don't iterate properties in GetImplementedInterfaces (9dfae65)
-
Leave context after Runtime::PrepareV8Runtime() (cd1d285)
-
memory leak on accessing static interface methods (88ce2d8)
-
memory leak on saving code cache (6d416a1)
-
Update common-runtime-tests-app (c8db3ca)
-
update legacy android version in package.json (#1744) (b4ad8e5)
-
Use Isolate::TryGetCurrent() (afe026a)
-
Remove weak callback from __postFrameCallback cache (#1755) (ff1b979), closes #1755
Features
Performance Improvements
- avoid unnecessary string copying when calling static properties of interfaces (8b53d02)
BREAKING CHANGES
- __startNDKProfiler() and __stopNDKProfiler() global
bindings no longer available.
The NDK profiler was not functional, since nothing in the build process
defined the NDK_PROFILER_ENABLED preprocessor symbol. The start and stop
functions were already no-ops.
- chore: Remove outdated comment
RunMicrotasks no longer exists, it's already been replaced in the code
with PerformMicrotaskCheckpoint.
- chore: Use unique_ptr for NewBackingStore in byte buffers
V8 doc: https://docs.google.com/document/d/1sTc_jRL87Fu175Holm5SV0kajkseGl2r8ifGY76G35k/edit
The V8 usage examples show unique_ptr here; it probably doesn't matter
much, but we don't need the backing store after creating the ArrayBuffer,
and I believe shared_ptr is slightly more overhead than unique_ptr.
For convenience, replace the manual empty deleter for direct buffers with
v8::BackingStore::EmptyDeleter.
- chore: Remove weak finalizer callback from __postFrameCallback()
Weak finalizer callbacks are going away in V8 11.x, so we have to remove
this one. Luckily, a finalizer callback is not necessary - it's never
needed to prevent the frame callback from being collected.
However, a weak callback is not necessary in the first place. We can just
clean up the cache entry after the callback is executed, since it is only
executed once.
Note that the call to erase() destructs the FrameCallbackCacheEntry
instance, making entry
a dangling pointer, so don't use it after the
erase(). There's probably a safer way to do this, although the way that
first occurred to me (pass the key to the callback instead of the entry,
and then use std::unordered_map::extract()) is not available on
robin_hood::unordered_map.
- fix: Make sure frame callbacks are not ignored
There was a bug where __postFrameCallback() would not always cause the
callback to be called. Without initializing removed
, sometimes it would
have a nonzero value, so the callback would be ignored.
- chore: Clear callback caches' persistent handles in destructor
Clearing the persistent handles in the destructor makes it a bit easier to
deal with the cache entry's lifetime: they are cleared whenever the entry
is removed from the cache.
We do this for both the main thread callback cache and the frame callback
cache.
Adding a destructor makes the cache entries non-movable. But the only
place where they were moved was when inserting them into the cache anyway.
We can use C++17's try_emplace() method to insert them without having to
move them.
- chore: Construct FrameCallbackCacheEntry with ID
This avoids the situation of forgetting to add an ID to the cache entry.
- chore: Improve usage of unordered_map APIs in CallbackHandlers
This fixes a few places where we can avoid double lookups:
-
In RunOnMainThreadFdCallback, we already have a valid iterator, so no
need to look up the same key again in RemoveKey (this is the only usage
of RemoveKey, so we can remove it.) (Additionally, we probably want to
remove the cache entry before throwing a NativeScript exception.) -
In PostFrameCallback and RemoveFrameCallback, we should not do
contains() immediately followed by find().
-
chore: Fix runtime typo
-
chore: Ignore main thread and frame callback return values
We don't do anything with the return value from these callbacks, so it's
OK to ignore them and not convert them to a local handle.
v8.5.0
What's Changed
- feat: native timer polyfills by @edusperoni in #1733
- chore: bump compile sdk by @vmutafov in #1739
- fix: memcpy array data for non-direct java bytebuffers by @vmutafov in #1740
- fix: refactor console.log implementation a bit by @vmutafov in #1741
- fix: possible infinite loop and memory leak in metadata reader by @edusperoni in #1749
- chore: merge main into v8-10.3.22-perf by @vmutafov in #1750
- Restore Console inspector for V8 10.3 by @ptomato in #1751
- Restore DOM and Network callback handlers by @ptomato in #1752
- feature/v8 10.3.22 perf by @vmutafov in #1743
New Contributors
Full Changelog: v8.4.0...v8.5.0
v8.4.0
What's Changed
- fix: handle missing child classes when querying native classes by @edusperoni in #1718
- feat: upgrade libzip to 1.9.2 by @edusperoni in #1724
- fix: JvmField annotated fields by @triniwiz in #1726
- feat: add class name to native objects by @edusperoni in #1723
- fix: RunOnMainThreadCallback & PostFrameCallback by @triniwiz in #1721
- chore: perf op by @triniwiz in #1725
- build(deps): bump xmldom and jasmine-reporters in /test-app/build-tools/jsparser/tests by @dependabot in #1727
- Generate metadata for all subprojects by @ammarahm-ed in #1730
- fix: typedarray & raf by @triniwiz in #1729
- feat: settings.gradle plugin by @ammarahm-ed in #1731
- fix: typed array by @triniwiz in #1738
New Contributors
- @ammarahm-ed made their first contribution in #1730
Full Changelog: v8.3.0...v8.4.0