Closed Bug 2079794 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63388 - [WebMCP] Fix crash for documents without a frame

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63388 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63388
Details from upstream follow.

Niall McCormack <nmccormack@openai.com> wrote:

[WebMCP] Fix crash for documents without a frame

  • createHTMLDocument() creates a document without a frame that shares
    its creator's execution context. Reading modelContext on both documents
    binds the same browser host twice and terminates the renderer.
  • Return from the ModelContext constructor before binding browser
    interfaces when the document has no frame. Preserve the per-document
    cached object and the existing InvalidStateError method rejections.
  • Add regression coverage for both getter orders, active-document tool
    registration, discovery and execution, and inactive-document errors.

Reproducible steps:

  • Open dev tools console and type the following

document.modelContext;
document.implementation.createHTMLDocument().modelContext;

- Chromium renderer will crash



Bug: None
Change-Id: I95dfd9942938d3d773215e51c096ee641dc0943c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8502902
Reviewed-by: Mark Foltz \<mfoltz@chromium.org>
Reviewed-by: Dominic Farolino \<dom@chromium.org>
Commit-Queue: Dominic Farolino \<dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1714113}


CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 69 tests and 2 subtests

Status Summary

Firefox

OK : 2[GitHub] 61[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 1[GitHub] 2[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 4[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 10[GitHub] 137[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
ERROR : 3
NOTRUN: 1

Chrome

OK : 1
PASS : 7
CRASH : 1

Safari

OK : 2
PASS : 1
FAIL : 10

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.