[Public WebGL] oes-texture-float conformance

Cedric Vivier [email protected]
Tue May 10 12:00:04 PDT 2011

Hey Vlad,

On Wed, May 11, 2011 at 01:38, Vladimir Vukicevic <[email protected]> wrote:
> implementation-wise, the internal native object has a JS wrapper that's created when it's returned back to JS.  When you set arbitrary properties on it, they are set on the wrapper itself.  This wrapper is the thing that gets discarded when a GC triggers.  The fact that a new wrapper gets created is only observable due to the additional properties -- otherwise there's no way to check equivalence (because you no longer have the first wrapper reference at all -- it was given up so it could get GC'd).

No, a new wrapper would still break the identity of ext1===ext2
instance-wise even if no property were ever added.

Wouldn't adding the wrapper instance to the GC root of the
WebGLContext wrapper just solves the issue wrt garbage collection?
This guarantees the wrapper won't get GC'd before the context itself.

Interestingly, we might not need/want a wrapper at all for this
particular extension (OES_texture_float) as its object does not define
any member, it would be legal to return a 'pure' JS object (ie.
created with JS_new, equivalent to literal {} - still added to the GC
root of the context) ... though this might be undesirable for other
reasons (handling "empty" or non-empty extensions the same way).


You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list