Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 3.03 KB

README.md

File metadata and controls

40 lines (30 loc) · 3.03 KB

Runtime documentation

  • Builtin modules — the ns:/node: builtin-module reference: resolution rules, ns:util/ns:runtime/ns:module, ns:interop/ns:interop/ios and the global interop over them, the node: compatibility shims, import maps and scopes, createRequire and the pumping variant, the module-response (MIME) contract, and app-entry bootstraps. The cross-runtime contract both iOS and Android implement.

  • Performance API — WHATWG performance (hr-time, user timing, performance timeline with PerformanceObserver), per-isolate time origins for workers, the native clock hook that future requestAnimationFrame work must share, and the documented spec deviations.

  • AbortController / AbortSignal — the DOM abort primitives (AbortController, AbortSignal with the abort/timeout/any statics) layered on the runtime's EventTarget, the GC contract (weak timers and any() links, listener-driven persistence), and the DOMException reasons.

  • Error handling — global error/unhandledrejection events, reportError, catching native exceptions in JS (error.nativeException), forwarding JS throws to native (interop.escapeException), JS stacks on NSException, configuration flags, and crash-reporter integration.

  • structuredClone — the WHATWG structuredClone(value, { transfer }) global: what clones, how graph identity and cycles are preserved, ArrayBuffer transfer, and the DataCloneError DOMException on failure.

  • Messaging and node:worker_threads — MessagePort, MessageChannel, BroadcastChannel and MessageEvent, the node:worker_threads real-vs-shim table and its documented deviations, the strong-until-closed port lifetime, HTML port enabling, and the transfer support matrix with its DataCloneError messages.

  • Native stack traces — reading the native backtraces the runtime logs, why function names inside NativeScript.framework can be wrong in release builds, and resolving frames with the matching dSYM and atos (also what crash reporters need uploaded).

  • Node-API — writing a Node-API addon for this runtime: registering a module and loading it with require(), getting the napi_env from native code, the threading contract, finalizer timing, which Node-API version applies, and the divergences from Node's node_api.h.

Knowledge

Notes on work that is done, kept because the reasoning is expensive to reconstruct rather than because anything needs doing.

  • V8 10.3 → 14.9 migration — the API changes and their site counts, why each non-default gn arg exists, the accessor rules that are not mechanical, and the traps that only show up at runtime.
  • Resurrecting finalizers — the patch that restores WeakCallbackType::kFinalizer, removed upstream right after 10.3.22, with its invariants and test plan.