fune/layout
Eden Chuang 2f65cf28ae Bug 1769913 - P3 Remove WorkerRunnable::mWorkerPrivate. r=dom-worker-reviewers,asuth
WorkerRunnable no longer keeps a raw pointer(mWorkerPrivate) for the associated WorkerPrivate in this patch.
Removing the WorkerRunnable::mWorkerPrivate needs to fix the following problems.

1. Thread assertions in WorkerRunnable::Dispatch()

To fix this problem, the associated WorkerPrivate is as a parameter and passed to WorkerRunnable::Dispatch() for the dispatching thread assertions. This associated WorkerPrivate is also propagated to PreDispatch() and PostDispatch() for the children classes of WorkerRunnable()

2. Get the associated WorkerPrivate in WorkerRunnable::Run() for environment setup(GlobabObject, JSContext setting for the runnable)

- For WorkerThreadRunnable

Since WorkerThreadRunnable is supposed to run on the worker thread, it does not need to keep a raw pointer to WorkerPrivate as its class member. GetCurrentThreadWorkerPrivate() should always get the correct WorkerPrivate for WorkerThreadRunnable.

- For WorkerParentThreadRunnable

WorkerParentRef is introduced to keep a RefPtr<WorkerPrivate> for WorkerParentThreadRunnable instead of using a raw pointer.
Checking the associated WorkerPrivate existence by WorkerParentRef at the beginning of WorkerParentThreadRunnable::Run(). If the Worker has already shut down, WorkerParentThreadRunnable cannot do anything with the associated WorkerPrivate, so WorkerParentThreadRunnable::Run() will return NS_OK directly but with a warning.

The associated WorkerPrivate is also passed into WorkerRun(), PreRun(), and PostRun(), so the majority of implementations of child classes of WorkerRunnable do not need to be changed.

If there are any cases in which the child classes of WorkerThreadRunnable/WorkerParentThreadRunnable want to keep the associated WorkerPrivate, they should use WorkerRefs instead of raw pointers.

Depends on D205679

Differential Revision: https://phabricator.services.mozilla.com/D207039
2024-04-19 09:41:58 +00:00
..
base Bug 1733509 - Use TryInferEnclosingResolution for event retargeting. r=botond 2024-04-17 18:47:01 +00:00
build Bug 1888535 Part 6 - Unhook display reflow debugging from nsLayoutStatics, and remove display reflow debugging. r=layout-reviewers,emilio 2024-04-02 19:03:06 +00:00
docs Bug 1889202 - Port mozilla wiki continuation model to firefox source doc. r=dshin 2024-04-18 18:31:28 +00:00
forms Bug 1887867 - Fix button-as-subgrid border/padding computations. r=dholbert 2024-04-08 19:49:29 +00:00
generic Bug 1892341 - Minor clean-up to subdocument display list building. r=tnikkel,layout-reviewers 2024-04-18 22:08:31 +00:00
inspector Bug 1887638 - [devtools] Expose CSS token value in InspectorCSSToken. r=emilio. 2024-04-15 17:14:43 +00:00
ipc
mathml Bug 1890523 - Remove extra space above/below stretchy operators. r=emilio 2024-04-12 14:14:23 +00:00
media
painting Bug 1891279: Increase the assertion tolerance for crashtest 1547420-1.html. r=layout-reviewers,tnikkel 2024-04-18 21:44:39 +00:00
printing
reftests Bug 1891887 - Remove reftest sandbox conditions that are not used. r=tnikkel 2024-04-17 19:17:19 +00:00
style Bug 1769913 - P3 Remove WorkerRunnable::mWorkerPrivate. r=dom-worker-reviewers,asuth 2024-04-19 09:41:58 +00:00
svg Bug 1630900. Handle opacity correctly when creating web render commands for SVGGeometryFrame. r=nical,ahale 2024-04-15 20:41:20 +00:00
tables Bug 1888535 Part 5 - Remove DISPLAY_REFLOW. r=layout-reviewers,emilio 2024-04-02 19:03:05 +00:00
tools Bug 1891887 - Remove reftest sandbox conditions that are not used. r=tnikkel 2024-04-17 19:17:19 +00:00
xul Bug 1890514: Null-check 'view' before using it, in nsTreeBodyFrame::RemoveImageCacheEntry. r=emilio,layout-reviewers 2024-04-18 03:04:49 +00:00
moz.build