Closed Bug 1869999 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 43661 - DOMWindow: Set wrapper reference to global proxy object

Categories

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

task

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Michael Lippautz <mlippautz@chromium.org> wrote:

DOMWindow: Set wrapper reference to global proxy object

The JS global proxy object already points to the
{Local,Remote}DOMWindow via internal field. Make
DOMWindow::main_world_wrapper_ point to the global proxy object as
well. Avoid using the already existing AssociateWithWrapper() methods
as they require that a context is properly set up.

{Local,Remote}WindowProxy's global_proxy_ field becomes a regular
traced reference without setting up the class id. The GC treats it
the same way for liveness but heap snapshot generation would not
consider it as a candidate to merge nodes with a JS object as it's not
ScriptWrappable's::main_world_wrapper_.

This way Wrappable/Wrapper pairs (represented by ScriptWrappable/V8
objects) are properly set up in the entire codebase and may on a
high-level considered as one object or "entity". This allows heap
snapshot generation to merge the nodes without considering the class
id state on the reference. Ultimately, this allows us to get rid of
the class id eventually and speed up all TracedReference creation.

Tests: DevTools frontend e2e memory/*
Bug: chromium:1218404
Change-Id: I4e3273c6ca7da8e3241b4f9ac78c76932c52bce2
Reviewed-on: https://chromium-review.googlesource.com/2953842
WPT-Export-Revision: bb00969df30e0f31a34a715dfd4aa66d80a2283a

The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5b52d4a2e6c0 [wpt PR 43661] - DOMWindow: Set wrapper reference to global proxy object, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.