Repository navigation
feat: upgrade V8 to 150.2.0 - #36098
Merged
Merged
Conversation
Adapts to the fast-call API change in v8 150.x, where V8 stores the raw CFunction / CFunctionInfo pointers directly inside FunctionTemplateInfo instead of copying them. build_fast, CFunction::new, and CFunctionInfo::new now require 'static borrows, so the overload storage must outlive every FunctionTemplate built from it. - deno_core: store the fast-call overload array in OpCtx (which lives until isolate disposal) and pass a lifetime-extended slice to build_fast. - ext/ffi: build the CFunction overload inside Turbocall so its boxed backing storage, owned by the cppgc FunctionData, outlives the function; hand build_fast a static-extended slice.
Three test failures surfaced by the V8 150.2.0 upgrade: - op_serialize detached transferred ArrayBuffers before registering them with the ValueSerializer and writing the value. V8 150.x checks was_detached() before consulting the transfer map when serializing a typed-array view, so a pre-detached transferred buffer now throws "An ArrayBuffer is detached and could not be cloned" (broke test-worker-workerdata-messageport.js). Register the transfer and write the value first, then detach the buffers. - Regenerate the seeded Math.random() expectations in run/seed_random and the compile standalone_runtime_flags test; V8's seeded PRNG output changed. The crypto.getRandomValues bytes are unchanged.
bartlomieju
added a commit
that referenced
this pull request
Jul 23, 2026
Bumps the `v8` crate from 149.4.0 to 150.2.0. This version changes how the fast-call API stores type information. V8 now keeps the raw `CFunction` and `CFunctionInfo` pointers directly inside `FunctionTemplateInfo` rather than copying them into a managed heap object, so `build_fast`, `CFunction::new`, and `CFunctionInfo::new` now require `'static` borrows. The backing storage for every fast-call overload must therefore outlive the `FunctionTemplate` built from it. Two call sites needed adapting. In `deno_core`, the fast-call overload array is now stored in `OpCtx`, which lives until isolate disposal, and a lifetime-extended slice into that stable storage is handed to `build_fast`. In `ext/ffi`, the trampoline's `CFunction` overload is built inside `Turbocall` so its boxed backing storage, owned by the cppgc-managed `FunctionData` set as the function's data, outlives the function; `build_fast` receives a static-extended slice into that box. Verification of the FFI fast-call path is left to CI for now.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps the
v8crate from 149.4.0 to 150.2.0.This version changes how the fast-call API stores type information. V8
now keeps the raw
CFunctionandCFunctionInfopointers directlyinside
FunctionTemplateInforather than copying them into a managedheap object, so
build_fast,CFunction::new, andCFunctionInfo::newnow require
'staticborrows. The backing storage for every fast-calloverload must therefore outlive the
FunctionTemplatebuilt from it.Two call sites needed adapting. In
deno_core, the fast-call overloadarray is now stored in
OpCtx, which lives until isolate disposal, anda lifetime-extended slice into that stable storage is handed to
build_fast. Inext/ffi, the trampoline'sCFunctionoverload isbuilt inside
Turbocallso its boxed backing storage, owned by thecppgc-managed
FunctionDataset as the function's data, outlives thefunction;
build_fastreceives a static-extended slice into that box.Verification of the FFI fast-call path is left to CI for now.