Open Bug 1453509 Opened 7 years ago Updated 3 years ago

[wpt-sync] Sync PR 10438 - Use PostTask to schedule cross-process postMessage forwarding.

Categories

(Core :: DOM: Security, enhancement, P4)

enhancement

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream][domsecurity-backlog])

Sync web-platform-tests PR 10438 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/w3c/web-platform-tests/pull/10438 Details from upstream follow. Alex Moshchuk <alexmos@chromium.org> wrote: > Use PostTask to schedule cross-process postMessage forwarding. > > Previously, we sent the IPC to forward a cross-process postMessage > immediately. This caused a behavioral difference from the > same-process case where the postMessage is always scheduled. Namely, > in a scenario like this: > > frame.postMessage(...); > doSomethingThatSendsIPCsToFrame(frame); > > the IPCs from JS following the postMessage would've been ordered > incorrectly, causing |frame| to see their side effects after the > postMessage dispatch in the cross-process case, whereas they would be > seen before the postMessage dispatch in the same-process case. One > example of this is frame.focus(), and another is a frame element > onload event (dispatched via FrameHostMsg_DispatchLoad) arriving after > a postMessage dispatched from an inline script while the frame was > still loading. > > To resolve these ordering concerns, this CL changes cross-process > postMessage to do a PostTask on the sender side before sending the > message to the browser process. This improves the current state of > the world, but does not yet achieve a perfect match for the IPC > ordering in the same-process case - see discussion on the bug. > > Bug: 828529 > Change-Id: I1138bcdcd18c458a92dec92e145761b226596c7a > > Reviewed-on: https://chromium-review.googlesource.com/999182 > WPT-Export-Revision: 87f07bc8f0fe8f55b2723f3b6eb7e0ecb570b32c
Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.