Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NativeScript/common-runtime-tests-app
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8ios-sync
Choose a base ref
...
head repository: NativeScript/common-runtime-tests-app
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 3 files changed
  • 2 contributors

Commits on Aug 11, 2026

  1. Configuration menu
    Copy the full SHA
    a358473 View commit details
    Browse the repository at this point in the history
  2. test: add structuredClone suite (opt-in via runStructuredCloneTests) (#…

    …26)
    
    * test: add structuredClone suite (opt-in via runStructuredCloneTests)
    
    Covers the WHATWG structuredClone global: primitives (including -0, NaN
    and BigInt), plain objects and arrays, Map/Set/Date/RegExp, the wrapper
    objects, Error, ArrayBuffer, every typed array and DataView with their
    offsets, graph identity and cycles, getter invocation, and the
    uncloneable cases.
    
    Transfer coverage asserts both halves of the hand-off: the clone is
    usable and the source is detached, for a bare buffer, a buffer reached
    through a typed array, and buffers not present in the cloned value.
    Rejections cover duplicate entries, non-transferable entries, already
    detached buffers, and non-iterable transfer lists.
    
    Failures are asserted by `.name === "DataCloneError"` rather than
    `instanceof DOMException`, so the suite runs on runtimes that have no
    DOMException. The one runtime-specific expectation (a native object is
    not cloneable) is behind the existing isV8iOS guard.
    
    Deliberately kept out of runAllTests(): Android consumes master and does
    not ship the global yet, so each runtime opts in once it does.
    
    * test: pin single capture of the transfer iterator next method
    
    WebIDL builds the iterator record once, capturing `next` at creation.
    The spec drives iteration with an iterator whose `next` is an accessor
    that yields a working function on the first read and throws on any
    later one, so an implementation that re-reads `next` per step fails
    instead of silently diverging.
    
    * test: cover SharedArrayBuffer sharing and worker message transfer
    
    structuredClone and worker postMessage run on one serialization core, so
    the transfer rules are asserted from both entry points: a buffer posted
    with a transfer list arrives usable in the worker while the sender's copy
    is detached, and duplicate, non-ArrayBuffer and already-detached entries
    are rejected with the same DataCloneError name as on the structuredClone
    side. postMessage takes a plain array only, so a non-array transfer list
    is a TypeError.
    
    The SharedArrayBuffer specs feature-detect the constructor and assert
    sharing in both directions -- written through the clone, read through the
    original, and back -- plus that one shared buffer stays shared across two
    references and that it cannot be transferred.
    
    The worker specs live here rather than in Workers/index.js because this
    suite is opt-in: runAllTests() runs on runtimes that have not implemented
    postMessage transfer yet.
    
    Also pins the deliberate asymmetry in host-object handling: postMessage
    delivers a posted native object as an empty object where structuredClone
    rejects it. Workers/index.js already pins that posting one does not
    throw; this adds what the receiver actually sees.
    
    * test: gate the shared suite on structuredClone presence
    
    The suite was kept out of runAllTests() and wired in per runtime, which
    meant every runtime that shipped the API had to remember to opt in, and
    master could not carry the suite at all.
    
    It now checks for the global itself: where structuredClone is missing it
    registers one pending spec and returns, so the suite can live in
    runAllTests() everywhere and a runtime without the API reports a visible
    skip instead of a wall of failures. The named export stays, since it is
    still the way to run just this suite.
    
    A gate like this can hide the very regression the suite exists to catch,
    so the header points implementing runtimes at the unguarded canary they
    are expected to keep in their own tests.
    edusperoni authored Aug 11, 2026
    Configuration menu
    Copy the full SHA
    2eee85b View commit details
    Browse the repository at this point in the history
  3. test: assert structured-clone detail semantics where structuredClone …

    …exists
    
    The detail specs now follow the spec contract on a runtime that ships
    structuredClone — a distinct snapshot, immune to later mutation, with an
    uncloneable detail rejected by a DataCloneError-named error — and keep
    the by-reference assertions as the documented fallback for a runtime
    that implements the Performance API first.
    edusperoni committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    8be1d9f View commit details
    Browse the repository at this point in the history
  4. test: measure the timeOrigin anchor as a min-of-N offset with a loose…

    … bound
    
    Reconstructing Date.now() from timeOrigin + performance.now() races
    three clock reads in one expression; a ~20ms scheduler or GC stall
    between them on a contended CI host blew the previous 10ms budget
    (observed as tightly clustered first-attempt failures that pass on
    rerun). A stall does not repeat across every sample, so the minimum
    offset over ten samples filters it out, while a genuine anchoring or
    unit error persists through all of them — 250ms still catches those.
    Applies to the main-isolate spec and the worker's inner sample alike.
    edusperoni committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    0baab7c View commit details
    Browse the repository at this point in the history
Loading