gecko-dev/gfx
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
..
2d Bug 1874461 - Filter spurious DrawTargetRecording::SetTransform calls. r=aosmond 2024-04-04 19:27:27 +00:00
angle Bug 1880746 - Part 2: Simplify angle moz.build DIRS dependencies. r=firefox-build-system-reviewers,jgilbert,glandium 2024-02-27 07:31:34 +00:00
cairo Bug 1870243 - Cherry-pick https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/256 to correctly reset the current operator when several added highlights in a pdf are printed r=jfkthame 2024-01-03 16:09:28 +00:00
config Bug 1843891 - Enable to present WebGPU without readback with DX12 on Windows r=webgpu-reviewers,nical 2024-03-22 04:13:28 +00:00
docs Bug 1519636 - Remove nbsp in the doc r=firefox-source-docs-reviewers,geckoview-reviewers,ahal,m_kato 2023-12-03 11:01:53 +00:00
gl Bug 1764201 Part 3: Remove screen info stuff from gfxPlatform. r=jgilbert,geckoview-reviewers 2024-03-22 00:55:48 +00:00
graphite2 Bug 1875296 - Vendor graphite2 using `mach vendor` r=jfkthame 2024-01-22 08:45:20 +00:00
harfbuzz Bug 1888698 - Update harfbuzz to 8.4.0 r=jfkthame 2024-04-15 12:39:32 +00:00
ipc Bug 1769913 - P3 Remove WorkerRunnable::mWorkerPrivate. r=dom-worker-reviewers,asuth 2024-04-19 09:41:58 +00:00
layers Bug 1769913 - P3 Remove WorkerRunnable::mWorkerPrivate. r=dom-worker-reviewers,asuth 2024-04-19 09:41:58 +00:00
ots Bug 1769913 - P1 Make WorkerRunnable to be a base class for runnables on Worker thread and Worker's parent thread. r=dom-worker-reviewers,asuth 2024-04-19 09:41:57 +00:00
qcms Bug 1884381 - Use a single allocation for precache_output. r=gfx-reviewers,gw 2024-03-11 13:36:59 +00:00
skia Bug 1882947 - Adjust SkTypeface_mac_ct.cpp after bug 1858347. r=gfx-reviewers,lsalzman 2024-03-01 19:31:43 +00:00
src Bug 1764201 Part 2: Make Gecko_MediaFeatures_VideoDynamicRange check per-screen HDR. r=emilio 2024-03-22 00:55:47 +00:00
tests Bug 1887729 - Implement context lost/restored support for CanvasRenderingContext2D. r=webidl,gfx-reviewers,smaug,lsalzman 2024-03-28 14:50:20 +00:00
thebes Bug 1890245 - Make gfxUserFontSet::mGeneration an atomic var, so we can read it safely without locking. r=gfx-reviewers,lsalzman 2024-04-17 20:45:42 +00:00
vr Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro 2024-03-04 10:24:43 +00:00
webrender_bindings Bug 1889146 - Check if monitor of window enables HDR r=gfx-reviewers,bradwerth 2024-04-17 12:29:35 +00:00
wgpu_bindings Bug 1891754 - Update `wgpu` to revision 2b0e3ed01cfcc4bcccc7fd63b2581b260c00b089. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler 2024-04-18 10:26:32 +00:00
wr Bug 1891322 - more robust solution for NaN offset in gradients r=gfx-reviewers,lsalzman 2024-04-19 05:31:20 +00:00
ycbcr Bug 1867459 - Replace CPU_ARCH with TARGET_CPU. r=firefox-build-system-reviewers,sergesanspaille 2023-12-08 10:43:59 +00:00
metrics.yaml Bug 1877842 - Migrate performance GVST probes r=perry.mcmanis,denispal 2024-02-09 21:11:05 +00:00
moz.build