The OES_vertex_array_object spec does not make it clear what happens to buffers that are deleted when they are referenced by vertex array objects. It is inferred that all buffers are reference counted.
Before OES_vertex_array_object there was no way to use a deleted buffer in a single context as the spec states it would be unbound from all bind points. After OES_vertex_array_object it is now possible to use deleted buffers.
Furthermore, the OpenGL ES 2.0 spec specifies that using a deleted buffer has undefined results including possibly corrupt rendering and generating GL errors. Undefined behavior is unacceptable for WebGL.
RESOLVED: Buffers should be reference counted when attached to a vertex array object. This is consistent with the OpenGL ES 3.0 spec's implementation of Vertex Array Objects and matches the behavior of other WebGL objects, such as textures that are attached to framebuffers.
This will require that most implementations do not call glDeleteBuffer when the user calls deleteBuffer on the WebGL context. Instead the implementation must wait for all references to be released before calling glDeleteBuffer to prevent undefined behavior.
If a buffer object is deleted while it is attached to the currently bound vertex array object, then it is as if BindBuffer had been called, with a buffer of 0, for each target to which this buffer was attached in the currently bound vertex array object. In other words, this buffer is first detached from all attachment points in the currently bound vertex array object. Note that the buffer is specifically not detached from any other vertex array object. Detaching the buffer from any other vertex array objects is the responsibility of the application.