WebGL context contains following resources: - buffers - framebuffers - programs - shaders - renderbuffers - textures In create methods GraphicsContext3D should return virtual resource handle instead of real resource handle for these because of the following reasons: * Unshared WebGL context: framebuffer is visible from Javascript unless resources are sandboxed. * Shared WebGL context: framebuffer and webview GL context resources are visible from JavaScript unless resources are sandboxed. * Some Web pages might fail since they might assume resource IDs starting from zero. Allocate and proxy virtual handles and map them to real resource handles instead in order to resolve this situation.
I'm working on a patch for this. It is trivial to solve but requires some work.
I think this is something that should be handled higher level than GraphicsContext3D implementation. Have to check if this already addressed in higher level WebGL code.
WebGL resource management is handled in canvas code.