Repository navigation
Releases
Releases · tommie/v8go
v0.44.0
v0.43.0
v0.42.0
v0.41.0
v0.40.0
v0.39.0
v0.38.0
Full changelog ⇒ v0.38.0
Added
- Add Windows amd64 support, requiring Go 1.27 and LLVM's MSVC-target clang with LLD. See the README for details. In #121.
- Add
CPUProfiler.Doto profile a function. It keeps the function on the OS thread V8 samples. - Add
Isolate.SetPromiseRejectedCallbackto be notified of unhandled promise rejections, and of rejection handlers added after the fact. Based on #108. NewValuewraps Go pointers in V8 Externals, read back withValue.External, e.g. to wrap Go objects in JavaScript objects. The Go value is released when V8 garbage collects the External, or the Isolate is disposed. In #107.
Changed
- Document that
CPUProfiler.StartProfilingrequires JavaScript to execute on the calling OS thread. V8 only samples that thread, so the profile silently missed samples when Go moved the goroutine to another thread. - Auto-bumped V8 to 15.5.35.23.
Fixed
CPUProfile.GetDurationwas 1000 times too long, since V8's microseconds were read as milliseconds.go mod vendorcopies the V8 and libc++ header files, so vendored builds work again. In #116.
v0.37.0
v0.36.0
Full changelog ⇒ v0.36.0
Added
- Add
Isolate.WriteHeapSnapshotto write a heap snapshot for Chrome DevTools, andIsolate.LowMemoryNotification, based on #110. - Add
ErrHeapLimitReached, matched byerrors.Iswhen execution was terminated because the isolate reached its heap limit. - Add
WithExceptionMessagesandJSError.ExceptionMessage, returning the exception's script, line, columns, source line, and stack frames.
Changed
- Pin depot_tools in V8 builds, upgrading it together with V8, instead of self-updating it during builds.
- Link Clang's compiler-rt builtins on Linux, instead of relying on libgcc from GCC 12 or newer.
- The error message when the heap limit is reached is now
ExecutionTerminated: heap limit reached. - Building requires Clang 21 or newer, and
CGO_CXXFLAGS=-nostdinc++, since V8 and v8go use Chromium's libc++. See the README. This already applied to v0.35.0.
Fixed
- Linux libraries can be linked with glibc older than 2.38, e.g. on Debian 12, Ubuntu 22.04 and RHEL 9. V8 is now built against Chromium's Debian bullseye sysroot, making glibc 2.31 the minimum.
- Restore the heap limit after reaching it terminated execution. It was doubled on every termination, so a reused isolate's limit grew without bound.