Files
Bartek Iwańczuk 9b40df29ce feat: add bindings for templates, array buffers and script compilation (#2081)
Expands V8 API coverage across three areas.

Templates:

- FunctionTemplate::HasInstance
- Template::SetNativeDataProperty and Template::SetLazyDataProperty, placed
  on Template so that both ObjectTemplate and FunctionTemplate can reach
  them (previously only the ObjectTemplate variant of the former was bound)
- v8::DictionaryTemplate, a new Data subtype, with New and NewInstance. V8
  internalizes the declared names as one-byte strings, so they are transcoded
  from UTF-8 to Latin-1 on the way in; a name holding a code point above
  U+00FF cannot be expressed through this API and panics
- Callback-less FunctionTemplate::New, as
  FunctionTemplate::new_without_callback and a matching FunctionBuilder
  constructor. FunctionBuilder now stores an Option<FunctionCallback>
  internally; the field is private, so this is not a breaking change

ArrayBuffers:

- BackingStoreInitializationMode and BackingStoreOnFailureMode enums
- The four-argument ArrayBuffer::NewBackingStore and
  SharedArrayBuffer::NewBackingStore. kReturnNull maps to an Option return.
  Leaving the allocation uninitialized is only reachable through the separate
  unsafe *_uninitialized entry points, since a BackingStore derefs to
  [Cell<u8>] and reading it before it has been written would be undefined
  behaviour; the safe wrappers always zero-initialize
- ArrayBuffer::MaybeNew (plus its unsafe uninitialized counterpart),
  ArrayBuffer::NewResizableBackingStore,
  ArrayBuffer::IsResizableByUserJavaScript, ArrayBuffer::IsImmutable and
  ArrayBuffer::kMaxByteLength
- BackingStore::MaxByteLength
- SharedArrayBuffer::Data
- SharedArrayBuffer-backed constructors for every typed array subclass and
  for DataView
- The isolate-group-scoped ArrayBuffer::Allocator::NewDefaultAllocator. V8
  only declares that overload in multi-cage pointer compression builds, so
  the wrapper returns an Option

Scripts, modules and isolates:

- ScriptCompiler::CachedData::CompatibilityCheck and its
  CompatibilityCheckResult enum
- ScriptCompiler::CompileOptionsIsValid, as CompileOptions::is_valid
- Isolate::ContextDisposedNotification with the ContextDependants enum
- Context::SetTemporalHostSystemUTCEpochNanosecondsCallback

PropertyCallbackInfo::This is not bound: the pinned V8 no longer declares
it, only Holder. PropertyCallbackInfo::GetIsolate is also left out, since
callbacks already receive a scope.
2026-09-22 18:02:02 +02:00
..
2026-08-01 15:59:36 +02:00
2025-12-09 11:28:33 +01:00