Open
Bug 1633018
Opened 5 years ago
Updated 5 years ago
nsICanvasRenderingContextInternal is a leaky abstraction
Categories
(Core :: Graphics, defect, P3)
Core
Graphics
Tracking
()
NEW
People
(Reporter: kvark, Unassigned)
References
(Blocks 1 open bug)
Details
It's not a proper abstraction, and it's error prone to use.
Reason-1: the user has to explicitly CC clean up the class'es members:
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_WEAK_PTR(
ClientWebGLContext, mExtLoseContext, mNotLost,
// Don't forget nsICanvasRenderingContextInternal:
mCanvasElement, mOffscreenCanvas)
Reason-2: the user has to unlink from the refresh driver even though they don't register there explicitly:
ClientWebGLContext::~ClientWebGLContext() { RemovePostRefreshObserver(); }
When implementing WebGPU's CanvasContext, I got caught in both of this cases separately.
Updated•5 years ago
|
Severity: -- → normal
Comment 1•5 years ago
|
||
The severity field is not set for this bug.
:jbonisteel, could you have a look please?
For more information, please visit auto_nag documentation.
Flags: needinfo?(jbonisteel)
Updated•5 years ago
|
Severity: normal → S4
Flags: needinfo?(jbonisteel)
You need to log in
before you can comment on or make changes to this bug.
Description
•