Closed Bug 1659523 Opened 4 years ago Closed 4 years ago

Fix Linux and Mac tests under remoted WebGL

Categories

(Core :: Graphics: CanvasWebGL, defect, P1)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: handyman, Assigned: handyman)

References

Details

Attachments

(6 files, 1 obsolete file)

Fix Linux and Mac tests that are busted under webgl.out-of-process=true. Windows tests already pass.

Using the Shmem after our actor has lost IPC capability (say, because the other endpoint crashed) will cause the content process to also crash. ActorDestroy is where we detect that condition.

We want the IPDL actor to be freed when WebGL (not IPDL) no longer holds a strong reference to it. This pattern is handled by detecting when IPDL is the last remaining strong reference, at which point it calls Send__delete__ to begin to safely tear down the actors at both endpoints.

Depends on D87352

Allocate a temporary buffer from the heap to appease GL.

Depends on D87353

Weak pointers need to be cleared by the cycle collector to avoid dangling pointers. WeakPtr and WeakReference have special macros for this. std::weak_ptr, however, has a contract that does not permit clearing them through any means beyond normal weak_ptr use. So we switch to WeakPtr.

Depends on D87354

CanSend() is called (in ChannelSend()) by SendFoo() IPDL calls to prevent calling Send() on a dead actor but shmem creation uses a different code path to Send() -- one that does not use ChannelSend. This adds the guard to shmem allocation as well.

Depends on D87356

Should bug 1654958 be dup'ed onto this? It looks like it's a subset of what these patches fix.

(In reply to Jed Davis [:jld] ⟨⏰|UTC-6⟩ ⟦he/him⟧ from comment #7)

Should bug 1654958 be dup'ed onto this? It looks like it's a subset of what these patches fix.

Yes. Done.

"Validate" bools to guarantee they always (de)serialize to proper values. Require that all enums use EnumSerializer or their own special handlers.

Depends on D87357

Attachment #9170510 - Attachment description: Bug 1659523: Part 5 - Wait for SpecialPowers to set pref before running WebGL tests r=jgilbert → Bug 1659523: Part 4 - Wait for SpecialPowers to set pref before running WebGL tests r=jgilbert
Attachment #9170511 - Attachment description: Bug 1659523: Part 6 - Check CanSend() before calling Send() when allocating Shmems r=nika! → Bug 1659523: Part 5 - Check CanSend() before calling Send() when allocating Shmems r=nika!
Attachment #9170534 - Attachment description: Bug 1659523: Part 7 - Secure bool and enum serialization in remote WebGL r=jgilbert! → Bug 1659523: Part 6 - Secure bool and enum serialization in remote WebGL r=jgilbert!
Attachment #9170509 - Attachment is obsolete: true
Attachment #9170506 - Attachment description: Bug 1659523: Part 1 - Free WebGL command shmem when actor is destroyed r=jgilbert! → Bug 1659523: Free WebGL command shmem when actor is destroyed r=jgilbert!
Attachment #9170507 - Attachment description: Bug 1659523: Part 2 - Make IPDL's reference to PWebGL actors "weak" r=jgilbert!,nika! → Bug 1659523: Make IPDL's reference to PWebGL actors "weak" r=jgilbert!,nika!
Attachment #9170508 - Attachment description: Bug 1659523: Part 3 - Avoid using stack variable as array parameter to GL in WebGL r=jgilbert! → Bug 1659523: Avoid using stack variable as array parameter to GL in WebGL r=jgilbert!
Attachment #9170510 - Attachment description: Bug 1659523: Part 4 - Wait for SpecialPowers to set pref before running WebGL tests r=jgilbert → Bug 1659523: Wait for SpecialPowers to set pref before running WebGL tests r=jgilbert
Attachment #9170511 - Attachment description: Bug 1659523: Part 5 - Check CanSend() before calling Send() when allocating Shmems r=nika! → Bug 1659523: Check CanSend() before calling Send() when allocating Shmems r=nika!
Attachment #9170534 - Attachment description: Bug 1659523: Part 6 - Secure bool and enum serialization in remote WebGL r=jgilbert! → Bug 1659523: Secure bool and enum serialization in remote WebGL r=jgilbert!
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8aab07ad0abc Free WebGL command shmem when actor is destroyed r=jgilbert https://hg.mozilla.org/integration/autoland/rev/6d5443ce7e95 Wait for SpecialPowers to set pref before running WebGL tests r=jgilbert https://hg.mozilla.org/integration/autoland/rev/cb77639a7d0e Check CanSend() before calling Send() when allocating Shmems r=nika https://hg.mozilla.org/integration/autoland/rev/2c9d59a24ce8 Secure bool and enum serialization in remote WebGL r=jgilbert
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: