Skip to content

Tags: NativeScript/android

Tags

v9.1.0-rc.0

Toggle v9.1.0-rc.0's commit message
fix: lock the remaining process-global state shared across isolates

The caches #2020 named (Console timers, ArgConverter, MetadataNode /
MetadataReader) were already covered by #2013: Console and ArgConverter moved to
per-runtime RuntimeState, MetadataNode got s_nodeCacheMutex, MetadataReader its
own StateMutex, and JEnv / MethodCache a shared_mutex each. Auditing the runtime
for what actually remained in that class turned up four more.

File::Buffer was a single process-wide 1MB scratch buffer that ReadText filled
and returned a pointer into. Main and worker runtimes read modules concurrently
from their own threads, so one thread's fread overwrote bytes another was still
copying out - silent module-source corruption rather than a crash, which is why
it never showed up in a tombstone. The buffer also never saved the allocation it
appears to save: every caller goes through the std::string overload, which
copies out of it on the next line. Reads now go straight into the returned
string, and the borrowing overload, which had no callers, is gone.

JType::EnsureInstance published *instance before Init had filled clazz, ctor and
valueMethodId, so a second thread could find the pointer non-null and call
through uninitialised JNI ids - on the hot boxing path.

CallbackHandlers::Init runs once per runtime from PrepareV8Runtime, so every
worker start rewrote the process-global class and method-id statics, and re-ran
MethodCache::Init, while the isolates already running were reading them.

MetadataNode::IsJavascriptKeyword filled a function-local static set behind an
empty() check, racing reads from every runtime's thread.

Also adds the missing ftell < 0 guard on the read path.

Verified: arm64-v8a native build, full test suite 1038/1038.

v9.1.0-alpha.11

Toggle v9.1.0-alpha.11's commit message
ci: unit test fixes

v9.1.0-alpha.10

Toggle v9.1.0-alpha.10's commit message
ci: unit test fixes

v9.1.0-alpha.9

Toggle v9.1.0-alpha.9's commit message
Merge remote-tracking branch 'origin/main' into feat/hmr-dev-sessions…

…-integrated

v9.0.5

Toggle v9.0.5's commit message
release: 9.0.5

v9.0.4

Toggle v9.0.4's commit message

v9.0.3

Toggle v9.0.3's commit message

v9.0.2

Toggle v9.0.2's commit message

v9.0.1

Toggle v9.0.1's commit message

v9.0.0

Toggle v9.0.0's commit message
release: 9.0.0