postMessage spamming limit handling is broken
Categories
(Core :: DOM: Workers, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(1 file)
|
847 bytes,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•6 years ago
|
||
In practice this should be enough.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
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•6 years ago
|
||
(FWIW, this bug applies to worker.postMessage only. MessagePort.postMessage and BroadcastChannel.postMessage use different mechanisms)
Comment 5•6 years ago
|
||
| bugherder | ||
Description
•