Skip to content

script: Invoke decodeAudioData error callback for detached buffers - #46870

Merged
jdm merged 11 commits into
servo:mainfrom
amittenak47:issue-46602
Aug 30, 2026
Merged

jdm merged 11 commits into
servo:mainfrom
amittenak47:issue-46602

Conversation

@amittenak47

Copy link
Copy Markdown
Contributor

Previously, the detached ArrayBuffer branch only rejected the promise and the decodeErrorCallback was never invoked.

Now, we detect if the ArrayBuffer is detached with IsDetachedArrayBufferObject, and synchronously reject the promise with DataCloneError before enqueuing a media element task to invoke the callback. We use a uuid clone to insert the callback in decode_resolvers and use the uuid in the task to find the callback. Because decode_error_callback is Rc and not Send, which Task expects, it cannot be moved into the queued closure (so we store the callback in the map and enqueue the Task).

Added Step 1 from the spec to reject with InvalidStateError when the document is not fully active.

Updated the decodeAudioData success callback and error callback to be optional nullable to match the Web Audio IDL, so we can pass null for an unused callback.

Testing:

  • WebIDL and code changes compiles in release build: .\mach build -r

  • Call decodeAudioData after detaching AudioContext iframe: .\mach test-wpt -r tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.html

  • Call decodeAudioData after detaching OfflineAudioContext iframe: .\mach test-wpt -r tests/wpt/tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.html

  • Call decodeAudioDataon a closed context: .\mach test-wpt -r tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume-close.html

  • Manually detach buffer with null success callback:

Using console in FireFox Dev Tools:
.\mach run -r --devtools=6080

  var ctx = new AudioContext();
  var ab = new ArrayBuffer(4);
  structuredClone({}, { transfer: [ab] });
  var called = false;
  ctx.decodeAudioData(ab, null, function () { called = true; })
    .catch(function (e) { console.log("reject", e.name, e.message); });
  setTimeout(function () { console.log("callback called?", called); }, 500);

Fixes #46602.

@amittenak47
amittenak47 requested a review from gterzian as a code owner July 29, 2026 22:50
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 29, 2026
@TimvdLippe TimvdLippe added the T-linux-wpt Do a try run of the WPT label Jul 30, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Jul 30, 2026
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#30515789168) for Linux (WPT)

@github-actions

Copy link
Copy Markdown

Test results for linux-wpt from try job (#30515789168):

Flaky unexpected result (39)
  • TIMEOUT /FileAPI/url/url-in-tags-revoke.window.html (#19978)
    • TIMEOUT [expected PASS] subtest: Fetching a blob URL immediately before revoking it works in <script> tags.

      Test timed out
      

  • TIMEOUT [expected OK] /_webgl/conformance/textures/misc/tex-image-and-sub-image-2d-with-array-buffer-view.html
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • FAIL [expected PASS] subtest: WebGL test #45

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #47

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #49

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #51

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #53
    • PASS [expected FAIL] subtest: WebGL test #55
    • PASS [expected FAIL] subtest: WebGL test #57
    • PASS [expected FAIL] subtest: WebGL test #59
    • FAIL [expected PASS] subtest: WebGL test #61

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #63

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • And 6 more unexpected results...
  • CRASH [expected OK] /_webgl/conformance/uniforms/no-over-optimization-on-uniform-array-06.html
  • CRASH [expected OK] /_webgl/conformance/uniforms/no-over-optimization-on-uniform-array-14.html
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/no-over-optimization-on-uniform-array-16.html
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance2/sync/sync-webgl-specific.html
  • OK /cookies/partitioned-cookies/partitioned-cookies-samesite-attribute.https.html (#45255)
    • FAIL [expected PASS] subtest: In embedded cross-site contexts, partitioned cookies can only be set with explicit SameSite=None

      assert_equals: expected 0 but got 3
      

  • TIMEOUT [expected OK] /css/compositing/canvas-composite-modes.html
  • FAIL [expected PASS] /css/css-backgrounds/background-size-042.html
  • FAIL [expected PASS] /css/css-sizing/dynamic-available-size-iframe.html (#45763)
  • TIMEOUT [expected OK] /dom/nodes/NodeList-static-length-getter-tampered-indexOf-3.html
  • TIMEOUT [expected OK] /fetch/content-encoding/br/big-br-body.https.any.html
    • TIMEOUT [expected PASS] subtest: large br data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large br data should be decompressed successfully with byte stream
  • TIMEOUT [expected OK] /fetch/content-encoding/br/big-br-body.https.any.worker.html
    • TIMEOUT [expected PASS] subtest: large br data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large br data should be decompressed successfully with byte stream
  • TIMEOUT [expected OK] /fetch/content-encoding/gzip/big-gzip-body.https.any.worker.html
    • TIMEOUT [expected PASS] subtest: large gzip data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large gzip data should be decompressed successfully with byte stream
  • TIMEOUT [expected OK] /fetch/content-encoding/zstd/big-window-zstd-body.tentative.https.any.worker.html
    • TIMEOUT [expected FAIL] subtest: Consuming the body of a resource with too large of a zstd window size should reject

      Test timed out
      

  • TIMEOUT [expected OK] /fetch/content-encoding/zstd/big-zstd-body.https.any.html
    • TIMEOUT [expected PASS] subtest: large zstd data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large zstd data should be decompressed successfully with byte stream
  • ERROR [expected TIMEOUT] /html/browsers/browsing-the-web/history-traversal/pageswap/pageswap-initial-navigation.html (#40387)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • PASS [expected FAIL] subtest: Same-origin navigation started from unload handler must be ignored
  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-requestsubmit.html (#44098)
    • FAIL [expected TIMEOUT] subtest: Replace before load, triggered by formElement.requestSubmit()

      assert_equals: expected "http://web-platform.test:8000/common/blank.html?thereplacement=" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20form%20%3D%20document.createElement(%22form%22)%3B%0A%20%20%20%20form.action%20%3D%20%22%2Fcommon%2Fblank.html%22%3B%0A%0A%20%20%20%20const%20input%20%3D%20document.createElement(%22input%22)%3B%0A%20%20%20%20input.type%20%3D%20%22hidden%22%3B%0A%20%20%20%20input.name%20%3D%20%22thereplacement%22%3B%0A%20%20%20%20form.append(input)%3B%0A%0A%20%20%20%20document.currentScript.before(form)%3B%0A%20%20%20%20form.requestSubmit()%3B%0A%20%20"
      

  • TIMEOUT [expected ERROR] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • OK /html/browsers/windows/browsing-context-names/duplicate-name-order.html (#34623)
    • PASS [expected FAIL] subtest: Duplicate name lookup order
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected PASS] subtest: Non-HTMLElement should not support autofocus

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus should support autofocus
    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus including no focusable descendants should be skipped
    • NOTRUN [expected FAIL] subtest: Area element should support autofocus
  • OK /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-reload-location-reload.html (#32595)
    • FAIL [expected PASS] subtest: Reloading iframe loading='lazy' before it is loaded: location.reload

      uncaught exception: Error: assert_equals: expected "http://web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/support/blank.htm?src" but got "about:blank"
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_other_frame_popup.sub.html (#39702)
    • TIMEOUT [expected FAIL] subtest: Sandboxed iframe can not navigate other frame's popup

      Test timed out
      

  • TIMEOUT [expected OK] /html/semantics/forms/form-submission-0/form-submit-iframe-then-location-navigate.html (#29634)
    • TIMEOUT [expected FAIL] subtest: Verifies that location navigations take precedence when following form submissions.

      Test timed out
      

  • OK /html/user-activation/propagation-same-and-cross-origin.sub.html
    • FAIL [expected PASS] subtest: Check that activating a same-origin navigable doesn't activate a cross origin navigable

      assert_true: top-frame navigator.userActivation.isActive must be true expected true got false
      

  • OK /html/webappapis/dynamic-markup-insertion/document-write/module-tla-import.html (#42419)
    • FAIL [expected PASS] subtest: document.write in an imported module

      assert_true: onload must be called expected true got false
      

  • ERROR [expected OK] /intersection-observer/v2/animated-opacity.html (#40827)
  • TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html (#44693)
    • NOTRUN [expected PASS] subtest: touch two-finger pan on 'touch-action: pan-x pan-y'
    • NOTRUN [expected FAIL] subtest: touch two-finger pan on 'touch-action: pinch-zoom'
  • OK /resource-timing/buffer-full-add-then-clear.html (#40819)
    • FAIL [expected PASS] subtest: Test that if the buffer is cleared after entries were added to the secondary buffer, those entries make it into the primary one

      assert_equals: Number of entries does not match the expected value. expected 3 but got 0
      

  • OK /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (iframe)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (link)
  • OK /touch-events/mouseevents-after-touchend.tentative.html (#46497)
    • PASS [expected FAIL] subtest: Single tap should cause a click
  • CRASH [expected OK] /trusted-types/TrustedTypePolicyFactory-createPolicy-unenforced.html
  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?11-15 (#44834)
    • PASS [expected TIMEOUT] subtest: Navigate a window via area with javascript:-urls in report-only mode.
  • TIMEOUT [expected OK] /trusted-types/trusted-types-navigation.html?16-20 (#44835)
    • TIMEOUT [expected PASS] subtest: Navigate a frame via area with javascript:-urls w/ default policy in enforcing mode.

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Navigate a frame via area with javascript:-urls in report-only mode.
    • NOTRUN [expected PASS] subtest: Navigate a frame via area with javascript:-urls w/ default policy in report-only mode.
  • OK /upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/fetch.https.html
    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

  • TIMEOUT [expected OK] /visual-viewport/resize-event-order.html (#41981)
    • TIMEOUT [expected FAIL] subtest: Popup: DOMWindow resize fired before VisualViewport.

      Test timed out
      

    • NOTRUN [expected PASS] subtest: iframe: DOMWindow resize fired before VisualViewport.
  • OK /webdriver/tests/classic/dismiss_alert/dismiss.py (#39098)
    • FAIL [expected PASS] subtest: test_dismiss_in_popup_window

      AssertionError: no such alert (404): No user prompt is currently active.
      

Stable unexpected results that are known to be intermittent (18)
  • OK /beacon/beacon-basic.https.window.html (#41723)
    • PASS [expected FAIL] subtest: Payload size restriction should be accumulated: type = arraybuffer
    • PASS [expected FAIL] subtest: Payload size restriction should be accumulated: type = blob
  • FAIL [expected PASS] /css/css-text-decor/text-underline-position-from-font-variable.html (#45615)
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • TIMEOUT [expected PASS] subtest: background-image sec-fetch-site - Not sent to non-trustworthy same-origin destination

      Test timed out
      

    • FAIL [expected PASS] subtest: content sec-fetch-site - HTTPS downgrade-upgrade

      assert_unreached: Reached unreachable code
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • FAIL [expected PASS] subtest: Cross-origin navigation started from unload handler must be ignored

      promise_test: Unhandled rejection with value: object "SecurityError: The operation is insecure."
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html (#28697)
    • FAIL [expected PASS] subtest: aElement.click() before the load event must NOT replace

      assert_equals: expected "http://web-platform.test:8000/common/blank.html?thereplacement" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20a%20%3D%20document.createElement(%22a%22)%3B%0A%20%20%20%20a.href%20%3D%20%22%2Fcommon%2Fblank.html%3Fthereplacement%22%3B%0A%20%20%20%20document.currentScript.before(a)%3B%0A%20%20%20%20a.click()%3B%0A%20%20"
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK /html/browsers/windows/embedded-opener-remove-frame.html (#23867)
    • PASS [expected FAIL] subtest: opener of discarded auxiliary browsing context
  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html (#29087)
    • PASS [expected TIMEOUT] subtest: <dialog>-contained autofocus element gets focused when the dialog is shown
  • TIMEOUT [expected OK] /html/semantics/embedded-content/media-elements/autoplay-disabled-by-permissions-policy.https.sub.html (#46012, #46804)
    • TIMEOUT [expected PASS] subtest: Permissions-Policy header: autoplay "none" has no effect on the top level document.

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: Permissions-Policy header: autoplay "none" disallows same-origin iframes.

      Test timed out
      

  • OK /html/semantics/scripting-1/the-script-element/execution-timing/077.html (#22139)
    • FAIL [expected PASS] subtest: adding several types of scripts through the DOM and removing some of them confuses scheduler

      assert_array_equals: expected property 1 to be "Script #1 ran" but got "Script #3 ran" (expected array ["Script #2 ran", "Script #1 ran", "Script #3 ran", "Script #4 ran"] got ["Script #2 ran", "Script #3 ran", "Script #4 ran", "Script #1 ran"])
      

  • OK /html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html (#44058)
    • PASS [expected FAIL] subtest: Parse errors in different files should be reported depending on different roots
  • TIMEOUT /html/syntax/parsing/html5lib_write.html?file=processing-instructions (#46205)
    • TIMEOUT [expected FAIL] subtest: <body><?x>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <body><?zz2op data>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <body><?xla->

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <body><?xla- data>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <body><?a-b-c>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <body><?a-b-c data>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <body><?S_S-S_S data>

      Test timed out
      

  • TIMEOUT [expected OK] /html/syntax/parsing/html5lib_write_single.html?file=processing-instructions (#46206)
    • TIMEOUT [expected FAIL] subtest: <body><?_x132 data>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <body><?_-_>

      Test timed out
      

  • OK /pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html (#46781)
    • FAIL [expected PASS] subtest: scroll was received while shouldn't

      assert_true: scroll received while shouldn't expected true got false
      

  • OK /pointerevents/pointerevent_pointercapture_in_frame.html?pen (#45536)
    • FAIL [expected PASS] subtest: Test penpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture.

      assert_true: Timed out waiting for lostpointercapture expected true got false
      

    • FAIL [expected PASS] subtest: Test penpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture to outer frame should not capture.

      assert_array_equals: Received events: innerFrame received pointerdown,innerFrame received pointermove,innerFrame received pointerup,innerFrame received lostpointercapture lengths differ, expected array ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup"] length 3, got ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup", "innerFrame received lostpointercapture"] length 4
      

  • OK /sanitizer-api/sanitizer-inert-document.html (#45260)
    • FAIL [expected PASS] subtest: Test whether setHTML loads the image.

      promise_test: Unhandled rejection with value: "The server observed a request. It shouldn't have."
      

    • PASS [expected FAIL] subtest: Test whether setHTMLUnsafe loads the image.
  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • PASS [expected TIMEOUT] subtest: Navigate a window via form-submission with javascript:-urls in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a window via form-submission with javascript:-urls w/ default policy in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls in enforcing mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in enforcing mode.
  • TIMEOUT /trusted-types/trusted-types-navigation.html?31-35 (#38034)
    • PASS [expected TIMEOUT] subtest: Navigate a frame via form-submission with javascript:-urls in report-only mode.
    • TIMEOUT [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in report-only mode.

      Test timed out
      

@github-actions

Copy link
Copy Markdown

✨ Try run (#30515789168) succeeded.

@mrobinson mrobinson added the T-linux-wpt Do a try run of the WPT label Aug 1, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔨 Triggering try run (#30689210043) for Linux (WPT)

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Test results for linux-wpt from try job (#30689210043):

Flaky unexpected result (36)
  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • FAIL [expected PASS] subtest: WebGL test #45

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #47

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #49

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #51

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #53
    • PASS [expected FAIL] subtest: WebGL test #55
    • PASS [expected FAIL] subtest: WebGL test #57
    • PASS [expected FAIL] subtest: WebGL test #59
    • FAIL [expected PASS] subtest: WebGL test #61

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #63

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • And 10 more unexpected results...
  • CRASH [expected OK] /_webgl/conformance/uniforms/no-over-optimization-on-uniform-array-06.html
  • TIMEOUT [expected OK] /_webgl/conformance2/sync/sync-webgl-specific.html
  • OK /cookies/partitioned-cookies/partitioned-cookies-samesite-attribute.https.html (#45255)
    • FAIL [expected PASS] subtest: In embedded cross-site contexts, partitioned cookies can only be set with explicit SameSite=None

      assert_equals: expected 0 but got 3
      

  • TIMEOUT [expected OK] /css/compositing/canvas-composite-modes.html
  • FAIL [expected PASS] /css/css-backgrounds/background-size-041.html
  • FAIL [expected PASS] /css/css-image-animation/image-animation-img-running-to-normal.html (#46567)
  • TIMEOUT [expected OK] /fetch/content-encoding/br/big-br-body.https.any.worker.html
    • TIMEOUT [expected PASS] subtest: large br data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large br data should be decompressed successfully with byte stream
  • TIMEOUT [expected OK] /fetch/content-encoding/zstd/big-zstd-body.https.any.html
    • TIMEOUT [expected PASS] subtest: large zstd data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large zstd data should be decompressed successfully with byte stream
  • OK [expected ERROR] /fetch/fetch-later/quota/same-origin-iframe/multiple-iframes.https.window.html (#35176)
  • OK [expected ERROR] /fetch/fetch-later/quota/same-origin-iframe/sandboxed-iframe.https.window.html (#41704)
  • OK /html/browsers/history/the-history-interface/traverse_the_history_3.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK /html/browsers/history/the-history-interface/traverse_the_history_4.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • CRASH [expected ERROR] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • OK /html/dom/render-blocking/remove-attr-unblocks-rendering.optional.html
    • PASS [expected FAIL] subtest: Render-blocking on parser-inserted async script is cancellable
  • OK [expected TIMEOUT] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html (#30970)
  • TIMEOUT /html/semantics/embedded-content/media-elements/autoplay-allowed-by-permissions-policy.https.sub.html (#46803)
    • TIMEOUT [expected PASS] subtest: Permissions-Policy header: autoplay * allows same-origin iframes.

      Test timed out
      

  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/src_object_blob.html (#40340)
    • PASS [expected TIMEOUT] subtest: HTMLMediaElement.srcObject blob
  • CRASH [expected ERROR] /html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html
  • OK /html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html (#44058)
    • PASS [expected FAIL] subtest: Parse errors in different files should be reported depending on different roots
  • TIMEOUT [expected OK] /html/syntax/parsing/html5lib_write_single.html?file=processing-instructions (#46206)
    • TIMEOUT [expected PASS] subtest: <script><?something></script>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <?something>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <head><?something>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <html><?something><head>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <html><body></body><?something>

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: <html><body></body></html><?something>

      Test timed out
      

  • OK /html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html (#43671)
    • PASS [expected FAIL] subtest: document.write external script into iframe write back into parent
  • OK /infrastructure/testdriver/click_iframe.html
    • FAIL [expected PASS] subtest: TestDriver click on a document in an iframe

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • OK [expected TIMEOUT] /infrastructure/testdriver/click_nested.html (#43887)
    • FAIL [expected NOTRUN] subtest: TestDriver click method with multiple windows and nested iframe

      can't access property "document", child.frames[2] is undefined
      

  • OK /mixed-content/tentative/autoupgrades/mixed-content-cors.https.sub.html (#41123)
    • FAIL [expected PASS] subtest: Cross-Origin audio should get upgraded even if CORS is set

      assert_equals: Length of other host audio is correct expected 1 but got Infinity
      

  • OK /mixed-content/tentative/autoupgrades/video-upgrade.https.sub.html (#41135)
    • FAIL [expected PASS] subtest: Video of other host autoupgraded

      assert_equals: Length. Other host expected 1 but got Infinity
      

  • TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html (#44693)
    • NOTRUN [expected PASS] subtest: touch two-finger pan on 'touch-action: pan-x pan-y'
    • NOTRUN [expected FAIL] subtest: touch two-finger pan on 'touch-action: pinch-zoom'
  • OK /preload/prefetch-document.html (#37210)
    • FAIL [expected PASS] subtest: different-site document prefetch with 'as=document' should not be consumed

      assert_equals: expected 2 but got 1
      

  • OK /resource-timing/buffer-full-add-then-clear.html (#40819)
    • FAIL [expected PASS] subtest: Test that if the buffer is cleared after entries were added to the secondary buffer, those entries make it into the primary one

      assert_equals: Number of entries does not match the expected value. expected 3 but got 0
      

  • OK /resource-timing/buffer-full-then-increased.html (#44408)
    • FAIL [expected PASS] subtest: Test that overflowing the buffer and immediately increasing its limit does not trigger the resourcetimingbufferfull event

      assert_equals: Number of entries does not match the expected value. expected 3 but got 1
      

  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?01-05 (#38975)
    • PASS [expected TIMEOUT] subtest: Navigate a window via anchor with javascript:-urls in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a window via anchor with javascript:-urls w/ default policy in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via anchor with javascript:-urls in enforcing mode.
  • TIMEOUT [expected OK] /trusted-types/trusted-types-navigation.html?16-20 (#44835)
    • PASS [expected FAIL] subtest: Navigate a frame via area with javascript:-urls in report-only mode.
    • TIMEOUT [expected PASS] subtest: Navigate a frame via area with javascript:-urls w/ default policy in report-only mode.

      Test timed out
      

  • CRASH [expected OK] /trusted-types/trusted-types-report-only.html
  • OK /upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/fetch.https.html
    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

  • OK /webdriver/tests/classic/get_alert_text/get.py
    • FAIL [expected PASS] subtest: test_get_confirm_text

      AssertionError: no such alert (404): No user prompt is currently active.
      

    • FAIL [expected PASS] subtest: test_get_prompt_text

      AssertionError: assert 'Hello' == 'Enter Your Name: '
      

  • OK /webxr/xrSession_features_deviceSupport.https.html (#24357)
    • FAIL [expected PASS] subtest: Immersive XRSession requests with no supported device should reject

      assert_unreached: Should have rejected: undefined Reached unreachable code
      

Stable unexpected results that are known to be intermittent (12)
  • OK /beacon/beacon-basic.https.window.html (#41723)
    • PASS [expected FAIL] subtest: Payload size restriction should be accumulated: type = arraybuffer
    • PASS [expected FAIL] subtest: Payload size restriction should be accumulated: type = blob
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-style: 'oblique 20deg' should prefer 'oblique 20deg' over 'oblique 30deg 60deg'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • TIMEOUT [expected PASS] subtest: background-image sec-fetch-mode - Not sent to non-trustworthy cross-site destination

      Test timed out
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • FAIL [expected PASS] subtest: Cross-origin navigation started from unload handler must be ignored

      promise_test: Unhandled rejection with value: object "SecurityError: The operation is insecure."
      

  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html (#29087)
    • PASS [expected TIMEOUT] subtest: <dialog>-contained autofocus element gets focused when the dialog is shown
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Element with tabindex should support autofocus

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Non-HTMLElement should not support autofocus
    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus should support autofocus
    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus including no focusable descendants should be skipped
    • NOTRUN [expected FAIL] subtest: Area element should support autofocus
  • TIMEOUT /html/semantics/embedded-content/media-elements/autoplay-default-permissions-policy.https.sub.html (#46805)
    • PASS [expected TIMEOUT] subtest: Default "autoplay" feature policy ["self"] allows same-origin iframes.
  • TIMEOUT [expected OK] /html/semantics/embedded-content/media-elements/autoplay-disabled-by-permissions-policy.https.sub.html (#46012, #46804)
    • TIMEOUT [expected PASS] subtest: Permissions-Policy header: autoplay "none" has no effect on the top level document.

      Test timed out
      

    • TIMEOUT [expected FAIL] subtest: Permissions-Policy header: autoplay "none" disallows same-origin iframes.

      Test timed out
      

  • OK /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-reload-location-reload.html (#32595)
    • FAIL [expected PASS] subtest: Reloading iframe loading='lazy' before it is loaded: location.reload

      uncaught exception: Error: assert_equals: expected "http://web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/support/blank.htm?src" but got "about:blank"
      

  • OK [expected TIMEOUT] /html/syntax/parsing/html5lib_write.html?file=processing-instructions (#46205)
  • OK /pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html (#46781)
    • FAIL [expected PASS] subtest: scroll was received while shouldn't

      assert_true: scroll received while shouldn't expected true got false
      

  • TIMEOUT /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • PASS [expected TIMEOUT] subtest: Navigate a window via form-submission with javascript:-urls in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a window via form-submission with javascript:-urls w/ default policy in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls in enforcing mode.
    • TIMEOUT [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in enforcing mode.

      Test timed out
      

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

✨ Try run (#30689210043) succeeded.

@jdm jdm added the S-needs-tests New tests have been requested by a reviewer. label Aug 12, 2026

@jdm jdm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Just a couple small changes before we merge this.

Comment thread components/script/dom/audio/baseaudiocontext.rs Outdated
Comment thread components/script/dom/audio/baseaudiocontext.rs Outdated
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 12, 2026
@jdm jdm added the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Aug 12, 2026
@jdm

jdm commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Also, the fact that no tests changed results is very suspicious. Can we add a new test to tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface that passes the error callback and verifies that it is invoked? i don't see any tests in https://github.com/search?q=repo%3Aservo%2Fservo+decodeaudiodata+language%3AHTML&type=code&l=HTML that pass either the success or error callbacks. https://book.servo.org/contributing/testing.html#add-a-new-test has instructions on this.

@amittenak47
amittenak47 marked this pull request as draft August 16, 2026 06:40
@amittenak47

Copy link
Copy Markdown
Contributor Author

Also, the fact that no tests changed results is very suspicious. Can we add a new test to tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface that passes the error callback and verifies that it is invoked? i don't see any tests in https://github.com/search?q=repo%3Aservo%2Fservo+decodeaudiodata+language%3AHTML&type=code&l=HTML that pass either the success or error callbacks. https://book.servo.org/contributing/testing.html#add-a-new-test has instructions on this.

Ok, I marked it as a draft so I can work on it

Sorry about that; I didn't get any Github notifications!

@amittenak47
amittenak47 force-pushed the issue-46602 branch 2 times, most recently from d84da86 to b089e20 Compare August 25, 2026 21:32
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#62205) with upstreamable changes.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62205).

@amittenak47
amittenak47 marked this pull request as ready for review August 26, 2026 00:11
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Aug 26, 2026
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62205).

amittenak47 and others added 10 commits August 28, 2026 16:10
Previously, the detached ArrayBuffer branch only rejected the promise and the decodeErrorCallback was never invoked.

Now, we detect if the ArrayBuffer is detached with IsDetachedArrayBufferObject, and synchronously reject the promise with DataCloneError before enqueuing a media element task to invoke the callback. We use a uuid clone to insert the callback in decode_resolvers and use the uuid in the task to find the callback. Because decode_error_callback is Rc and not Send, which Task expects, it cannot be moved into the queued closure.

Added Step 1 from the spec to reject with InvalidStateError when the document is not fully active.

Updated the decodeAudioData success callback and error callback to be optional nullable to match the Web Audio IDL, so we can pass null for an unused callback.

Fixes servo#46602.

Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Previously, the detached ArrayBuffer branch only rejected the promise and the decodeErrorCallback was never invoked.

Now, we detect if the ArrayBuffer is detached with IsDetachedArrayBufferObject, and synchronously reject the promise with DataCloneError before enqueuing a media element task to invoke the callback. We use a uuid clone to insert the callback in decode_resolvers and use the uuid in the task to find the callback. Because decode_error_callback is Rc and not Send, which Task expects, it cannot be moved into the queued closure.

Added Step 1 from the spec to reject with InvalidStateError when the document is not fully active.

Updated the decodeAudioData success callback and error callback to be optional nullable to match the Web Audio IDL, so we can pass null for an unused callback.

Fixes servo#46602.

Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: amittenak47 <55721729+amittenak47@users.noreply.github.com>
Reuse the same DOMException when rejecting the promise and invoking the error callback, wrapping it in a Trusted::new().

Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Pass the error callback and assert it is invoked with DataCloneError when the ArrayBuffer is detached.

Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Aug 28, 2026
@amittenak47

amittenak47 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author
    OK [expected TIMEOUT] /webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.html
        PASS [expected TIMEOUT] subtest: Executing "decoding-on-detached-iframe"
        PASS [expected NOTRUN] subtest: Audit report
    OK [expected TIMEOUT] /webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.html
        PASS [expected TIMEOUT] subtest: Executing "decoding-on-detached-iframe"
        PASS [expected NOTRUN] subtest: Audit report

Always nice to see more tests passing.

Thank you, I updated the harness to not expect the tests to time out. Should expect PASS now

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62205).

@jdm
jdm added this pull request to the merge queue Aug 29, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 29, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 29, 2026
@jdm
jdm added this pull request to the merge queue Aug 30, 2026
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Aug 30, 2026
Merged via the queue into servo:main with commit ba2b2be Aug 30, 2026
42 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 30, 2026
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

⛔ Failed to properly merge the upstream pull request (web-platform-tests/wpt#62205). Please address any CI issues and try to merge manually.

// Reads the JSObject pointer to check if the array buffer is detached.
#[expect(unsafe_code)]
fn is_detached_array_buffer(array_buffer: &ArrayBuffer) -> bool {
unsafe { IsDetachedArrayBufferObject(*array_buffer.underlying_object()) }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should avoid calling IsDetachedArrayBufferObject directly and use buffer_source.rs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
…ervo#46870)

Previously, the detached ArrayBuffer branch only rejected the promise
and the `decodeErrorCallback` was never invoked.

Now, we detect if the ArrayBuffer is detached with
`IsDetachedArrayBufferObject`, and synchronously reject the promise with
`DataCloneError` before enqueuing a media element task to invoke the
callback. We use a uuid clone to insert the callback in
`decode_resolvers` and use the uuid in the task to find the callback.
Because `decode_error_callback` is Rc and not Send, which Task expects,
it cannot be moved into the queued closure (so we store the callback in
the map and enqueue the Task).

Added Step 1 from the spec to reject with `InvalidStateError` when the
document is not fully active.

Updated the `decodeAudioData` success callback and error callback to be
optional nullable to match the Web Audio IDL, so we can pass null for an
unused callback.

Testing:

- WebIDL and code changes compiles in release build: `.\mach build -r`

- Call `decodeAudioData` after detaching `AudioContext` iframe: `.\mach
test-wpt -r
tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.html`
- Call `decodeAudioData` after detaching `OfflineAudioContext` iframe:
`.\mach test-wpt -r
tests/wpt/tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.html`

- Call `decodeAudioData`on a closed context: `.\mach test-wpt -r
tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume-close.html`

- Manually detach buffer with null success callback:

Using console in FireFox Dev Tools:
`.\mach run -r --devtools=6080`

```js
  var ctx = new AudioContext();
  var ab = new ArrayBuffer(4);
  structuredClone({}, { transfer: [ab] });
  var called = false;
  ctx.decodeAudioData(ab, null, function () { called = true; })
    .catch(function (e) { console.log("reject", e.name, e.message); });
  setTimeout(function () { console.log("callback called?", called); }, 500);
```

Fixes servo#46602.

---------

Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Signed-off-by: amittenak47 <55721729+amittenak47@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Psychpsyo pushed a commit to Psychpsyo/servo that referenced this pull request Oct 12, 2026
…ervo#46870)

Previously, the detached ArrayBuffer branch only rejected the promise
and the `decodeErrorCallback` was never invoked.

Now, we detect if the ArrayBuffer is detached with
`IsDetachedArrayBufferObject`, and synchronously reject the promise with
`DataCloneError` before enqueuing a media element task to invoke the
callback. We use a uuid clone to insert the callback in
`decode_resolvers` and use the uuid in the task to find the callback.
Because `decode_error_callback` is Rc and not Send, which Task expects,
it cannot be moved into the queued closure (so we store the callback in
the map and enqueue the Task).

Added Step 1 from the spec to reject with `InvalidStateError` when the
document is not fully active.

Updated the `decodeAudioData` success callback and error callback to be
optional nullable to match the Web Audio IDL, so we can pass null for an
unused callback.

Testing:

- WebIDL and code changes compiles in release build: `.\mach build -r`

- Call `decodeAudioData` after detaching `AudioContext` iframe: `.\mach
test-wpt -r
tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.html`
- Call `decodeAudioData` after detaching `OfflineAudioContext` iframe:
`.\mach test-wpt -r
tests/wpt/tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.html`

- Call `decodeAudioData`on a closed context: `.\mach test-wpt -r
tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume-close.html`

- Manually detach buffer with null success callback:

Using console in FireFox Dev Tools:
`.\mach run -r --devtools=6080`

```js
  var ctx = new AudioContext();
  var ab = new ArrayBuffer(4);
  structuredClone({}, { transfer: [ab] });
  var called = false;
  ctx.decodeAudioData(ab, null, function () { called = true; })
    .catch(function (e) { console.log("reject", e.name, e.message); });
  setTimeout(function () { console.log("callback called?", called); }, 500);
```

Fixes servo#46602.

---------

Signed-off-by: Amit Anilkumar <aanilkumar30@gatech.edu>
Signed-off-by: amittenak47 <55721729+amittenak47@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed. S-needs-tests New tests have been requested by a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BaseAudioContext::DecodeAudioData doesn't invoke error callback for detached buffer

7 participants