postMessage spamming limit handling is broken

RESOLVED FIXED in Firefox 67

Status

()

defect
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Assignee

Comment 1

4 months ago

In practice this should be enough.

Attachment #9043965 - Flags: review?(amarchesini)
Attachment #9043965 - Flags: review?(amarchesini) → review+

Restating (for my own future benefit):

  • Bug 1426467 introduced WorkerDebuggeeRunnable which makes WorkerRunnable::DispatchInternal use WorkerPrivate::DispatchDebuggeeToMainThread instead of WorkerPrivate::DispatchToMainThread.
  • WorkerPrivate::DispatchDebuggeeToMainThread does mMainThreadDebuggeeEventTarget->Dispatch
  • So we need to invoke AwaitIdle on mMainThreadDebuggeeEventTarget instead of mMainThreadEventTarget.

And the meta of bug 1426467 was that there was a broken hacky mechanism where postMessage and error runnables (MessageEvent, ReportErrorRunnable, ReportGenericErrorRunnable) would check if they weren't actually supposed to run when it was their turn to run, instead putting themselves on an ad hoc queue that would completely mess up ordering and cause debugger nightmares when single-stepping. So the solution was the new event target for these content-visible runnables that the debugger likes to be able to stop. (Whereas things like fetch/XHR don't interact with the owning page directly and so their runnables can continue operating even if the owning window is being single-stepped.)

Assignee

Comment 3

4 months ago

(FWIW, this bug applies to worker.postMessage only. MessagePort.postMessage and BroadcastChannel.postMessage use different mechanisms)

Comment 4

4 months ago
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb06f238c16a
bring back the old behavior of worker's postMessage spam limit, r=baku

Comment 5

4 months ago
bugherder
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.