This does sound like an unclear area in the OpenGL spec. For example,
On Thu, Sep 9, 2010 at 4:45 PM, Mo, Zhenyao <firstname.lastname@example.org
> According to GLES2 spec, if a texture/renderbuffer object is bound to
> the currently-bound framebuffer and it's deleted, it is first
> detached. However, if the framebuffer is not currently bound, then it
> "is specifically NOT detached ... Detaching ... is the responsibility
> of the application."
> This sounds to me like a security issue where crash could happen. I
> suggest to make it stronger for WebGL spec that no matter the
> framebuffer is bound or not, when one of its attachment is deleted, we
> always detach first.
> Please advise.