Changeset 265708 in webkit
- Timestamp:
- Aug 14, 2020 3:06:42 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 57 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r265706 r265708 1 2020-08-14 Kenneth Russell <kbr@chromium.org> 2 3 [WebGL2] expando-loss and expando-loss-2 conformance tests are failing 4 https://bugs.webkit.org/show_bug.cgi?id=214765 5 6 Reviewed by Yusuke Suzuki. 7 8 Re-land with locking fixes ysuzuki@ pointed out as necessary, and 9 advised heavily on. 10 11 Rebaseline expando-loss.html and expando-loss-2.html, which are 12 now fully passing. 13 14 Add a hook to js-test-pre.js which allows these tests to be run 15 correctly in the MiniBrowser by setting the following environment 16 variables: 17 export JSC_useDollarVM=1 18 export __XPC_JSC_useDollarVM=1 19 20 * webgl/2.0.0/conformance/misc/expando-loss-expected.txt: 21 * webgl/2.0.0/conformance2/misc/expando-loss-2-expected.txt: 22 * webgl/2.0.0/resources/webgl_test_files/js/js-test-pre.js: 23 1 24 2020-08-14 Wenson Hsieh <wenson_hsieh@apple.com> 2 25 -
trunk/LayoutTests/webgl/2.0.0/conformance/misc/expando-loss-expected.txt
r265534 r265708 2 2 3 3 Test: ../../resources/webgl_test_files/conformance/misc/expando-loss.html 4 5 [ 1: PASS ] getParameter(TEXTURE_BINDING_2D) returns instance that was bound. 6 [ 2: FAIL ] getParameter(TEXTURE_BINDING_2D): Expect basic expando to survive despite GC. 7 [ 3: FAIL ] getParameter(TEXTURE_BINDING_2D): Expect subobject expando to survive despite GC. 8 [ 4: PASS ] getParameter(FRAMEBUFFER_BINDING) returns instance that was bound. 9 [ 5: FAIL ] getParameter(FRAMEBUFFER_BINDING): Expect basic expando to survive despite GC. 10 [ 6: FAIL ] getParameter(FRAMEBUFFER_BINDING): Expect subobject expando to survive despite GC. 11 [ 7: PASS ] getParameter(RENDERBUFFER_BINDING) returns instance that was bound. 12 [ 8: FAIL ] getParameter(RENDERBUFFER_BINDING): Expect basic expando to survive despite GC. 13 [ 9: FAIL ] getParameter(RENDERBUFFER_BINDING): Expect subobject expando to survive despite GC. 14 [ 10: PASS ] getParameter(ELEMENT_ARRAY_BUFFER_BINDING) returns instance that was bound. 15 [ 11: FAIL ] getParameter(ELEMENT_ARRAY_BUFFER_BINDING): Expect basic expando to survive despite GC. 16 [ 12: FAIL ] getParameter(ELEMENT_ARRAY_BUFFER_BINDING): Expect subobject expando to survive despite GC. 17 [ 13: PASS ] getParameter(ARRAY_BUFFER_BINDING) returns instance that was bound. 18 [ 14: FAIL ] getParameter(ARRAY_BUFFER_BINDING): Expect basic expando to survive despite GC. 19 [ 15: FAIL ] getParameter(ARRAY_BUFFER_BINDING): Expect subobject expando to survive despite GC. 20 [ 16: PASS ] getParameter(TEXTURE_BINDING_CUBE_MAP) returns instance that was bound. 21 [ 17: FAIL ] getParameter(TEXTURE_BINDING_CUBE_MAP): Expect basic expando to survive despite GC. 22 [ 18: FAIL ] getParameter(TEXTURE_BINDING_CUBE_MAP): Expect subobject expando to survive despite GC. 23 [ 19: PASS ] getParameter(gl.CURRENT_PROGRAM) return instance set with useProgram 24 [ 20: PASS ] Vertex shader instance found in getAttachedShaders 25 [ 21: PASS ] Fragment shader instance found in getAttachedShaders 26 [ 22: FAIL ] Current program: Expect basic expando to survive despite GC. 27 [ 23: FAIL ] Current program: Expect subobject expando to survive despite GC. 28 [ 24: PASS ] [object WebGLProgram] is an instance of WebGLProgram 29 [ 25: FAIL ] Shader[0]: Expect basic expando to survive despite GC. 30 [ 26: FAIL ] Shader[0]: Expect subobject expando to survive despite GC. 31 [ 27: PASS ] [object WebGLShader] is an instance of WebGLShader 32 [ 28: FAIL ] Shader[1]: Expect basic expando to survive despite GC. 33 [ 29: FAIL ] Shader[1]: Expect subobject expando to survive despite GC. 34 [ 30: PASS ] [object WebGLShader] is an instance of WebGLShader 35 [ 31: PASS ] getVertexAttrib(VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) return instance set with vertexAttribPointer 36 [ 32: FAIL ] Vertex Attribute Buffer: Expect basic expando to survive despite GC. 37 [ 33: FAIL ] Vertex Attribute Buffer: Expect subobject expando to survive despite GC. 38 [ 34: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 39 [ 35: PASS ] getFramebufferAttachmentParameter(COLOR_ATTACHMENT0) returns instance set with framebufferRenderbuffer 40 [ 36: PASS ] getFramebufferAttachmentParameter(DEPTH_ATTACHMENT) returns instance set with framebufferRenderbuffer 41 [ 37: PASS ] getFramebufferAttachmentParameter(STENCIL_ATTACHMENT) returns instance set with framebufferRenderbuffer 42 [ 38: PASS ] getFramebufferAttachmentParameter(DEPTH_STENCIL_ATTACHMENT) returns instance set with framebufferRenderbuffer 43 [ 39: FAIL ] COLOR_ATTACHMENT0: Expect basic expando to survive despite GC. 44 [ 40: FAIL ] COLOR_ATTACHMENT0: Expect subobject expando to survive despite GC. 45 [ 41: PASS ] [object WebGLRenderbuffer] is an instance of WebGLRenderbuffer 46 [ 42: FAIL ] DEPTH_ATTACHMENT: Expect basic expando to survive despite GC. 47 [ 43: FAIL ] DEPTH_ATTACHMENT: Expect subobject expando to survive despite GC. 48 [ 44: PASS ] [object WebGLRenderbuffer] is an instance of WebGLRenderbuffer 49 [ 45: FAIL ] STENCIL_ATTACHMENT: Expect basic expando to survive despite GC. 50 [ 46: FAIL ] STENCIL_ATTACHMENT: Expect subobject expando to survive despite GC. 51 [ 47: PASS ] [object WebGLRenderbuffer] is an instance of WebGLRenderbuffer 52 [ 48: FAIL ] DEPTH_STENCIL_ATTACHMENT: Expect basic expando to survive despite GC. 53 [ 49: FAIL ] DEPTH_STENCIL_ATTACHMENT: Expect subobject expando to survive despite GC. 54 [ 50: PASS ] [object WebGLRenderbuffer] is an instance of WebGLRenderbuffer 55 [ 51: PASS ] successfullyParsed is true 56 [ FAIL ] 28 failures reported 4 [ PASS ] All tests passed -
trunk/LayoutTests/webgl/2.0.0/conformance2/misc/expando-loss-2-expected.txt
r265534 r265708 2 2 3 3 Test: ../../resources/webgl_test_files/conformance2/misc/expando-loss-2.html 4 5 [ 1: PASS ] getParameter(SAMPLER_BINDING) returns instance that was bound. 6 [ 2: FAIL ] getParameter(SAMPLER_BINDING): Expect basic expando to survive despite GC. 7 [ 3: FAIL ] getParameter(SAMPLER_BINDING): Expect subobject expando to survive despite GC. 8 [ 4: PASS ] getParameter(SAMPLER_BINDING): Expect extra expando to survive despite GC. 9 [ 5: PASS ] [object WebGLSampler] is an instance of WebGLSampler 10 [ 6: PASS ] getParameter(TRANSFORM_FEEDBACK_BINDING) returns instance that was bound. 11 [ 7: FAIL ] getParameter(TRANSFORM_FEEDBACK_BINDING): Expect basic expando to survive despite GC. 12 [ 8: FAIL ] getParameter(TRANSFORM_FEEDBACK_BINDING): Expect subobject expando to survive despite GC. 13 [ 9: PASS ] getParameter(TRANSFORM_FEEDBACK_BINDING): Expect extra expando to survive despite GC. 14 [ 10: PASS ] [object WebGLTransformFeedback] is an instance of WebGLTransformFeedback 15 [ 11: PASS ] getParameter(VERTEX_ARRAY_BINDING) returns instance that was bound. 16 [ 12: FAIL ] getParameter(VERTEX_ARRAY_BINDING): Expect basic expando to survive despite GC. 17 [ 13: FAIL ] getParameter(VERTEX_ARRAY_BINDING): Expect subobject expando to survive despite GC. 18 [ 14: PASS ] getParameter(VERTEX_ARRAY_BINDING): Expect extra expando to survive despite GC. 19 [ 15: PASS ] [object WebGLVertexArrayObject] is an instance of WebGLVertexArrayObject 20 [ 16: PASS ] getParameter(TEXTURE_BINDING_3D) returns instance that was bound. 21 [ 17: FAIL ] getParameter(TEXTURE_BINDING_3D): Expect basic expando to survive despite GC. 22 [ 18: FAIL ] getParameter(TEXTURE_BINDING_3D): Expect subobject expando to survive despite GC. 23 [ 19: PASS ] getParameter(TEXTURE_BINDING_3D): Expect extra expando to survive despite GC. 24 [ 20: PASS ] [object WebGLTexture] is an instance of WebGLTexture 25 [ 21: PASS ] getParameter(TEXTURE_BINDING_2D_ARRAY) returns instance that was bound. 26 [ 22: FAIL ] getParameter(TEXTURE_BINDING_2D_ARRAY): Expect basic expando to survive despite GC. 27 [ 23: FAIL ] getParameter(TEXTURE_BINDING_2D_ARRAY): Expect subobject expando to survive despite GC. 28 [ 24: PASS ] getParameter(TEXTURE_BINDING_2D_ARRAY): Expect extra expando to survive despite GC. 29 [ 25: PASS ] [object WebGLTexture] is an instance of WebGLTexture 30 [ 26: PASS ] getParameter(READ_FRAMEBUFFER_BINDING) returns instance that was bound. 31 [ 27: FAIL ] getParameter(READ_FRAMEBUFFER_BINDING): Expect basic expando to survive despite GC. 32 [ 28: FAIL ] getParameter(READ_FRAMEBUFFER_BINDING): Expect subobject expando to survive despite GC. 33 [ 29: PASS ] getParameter(READ_FRAMEBUFFER_BINDING): Expect extra expando to survive despite GC. 34 [ 30: PASS ] [object WebGLFramebuffer] is an instance of WebGLFramebuffer 35 [ 31: PASS ] getParameter(DRAW_FRAMEBUFFER_BINDING) returns instance that was bound. 36 [ 32: FAIL ] getParameter(DRAW_FRAMEBUFFER_BINDING): Expect basic expando to survive despite GC. 37 [ 33: FAIL ] getParameter(DRAW_FRAMEBUFFER_BINDING): Expect subobject expando to survive despite GC. 38 [ 34: PASS ] getParameter(DRAW_FRAMEBUFFER_BINDING): Expect extra expando to survive despite GC. 39 [ 35: PASS ] [object WebGLFramebuffer] is an instance of WebGLFramebuffer 40 [ 36: PASS ] getParameter(COPY_READ_BUFFER_BINDING) returns instance that was bound. 41 [ 37: FAIL ] getParameter(COPY_READ_BUFFER_BINDING): Expect basic expando to survive despite GC. 42 [ 38: FAIL ] getParameter(COPY_READ_BUFFER_BINDING): Expect subobject expando to survive despite GC. 43 [ 39: PASS ] getParameter(COPY_READ_BUFFER_BINDING): Expect extra expando to survive despite GC. 44 [ 40: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 45 [ 41: PASS ] getParameter(COPY_WRITE_BUFFER_BINDING) returns instance that was bound. 46 [ 42: FAIL ] getParameter(COPY_WRITE_BUFFER_BINDING): Expect basic expando to survive despite GC. 47 [ 43: FAIL ] getParameter(COPY_WRITE_BUFFER_BINDING): Expect subobject expando to survive despite GC. 48 [ 44: PASS ] getParameter(COPY_WRITE_BUFFER_BINDING): Expect extra expando to survive despite GC. 49 [ 45: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 50 [ 46: PASS ] getParameter(PIXEL_PACK_BUFFER_BINDING) returns instance that was bound. 51 [ 47: FAIL ] getParameter(PIXEL_PACK_BUFFER_BINDING): Expect basic expando to survive despite GC. 52 [ 48: FAIL ] getParameter(PIXEL_PACK_BUFFER_BINDING): Expect subobject expando to survive despite GC. 53 [ 49: PASS ] getParameter(PIXEL_PACK_BUFFER_BINDING): Expect extra expando to survive despite GC. 54 [ 50: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 55 [ 51: PASS ] getParameter(PIXEL_UNPACK_BUFFER_BINDING) returns instance that was bound. 56 [ 52: FAIL ] getParameter(PIXEL_UNPACK_BUFFER_BINDING): Expect basic expando to survive despite GC. 57 [ 53: FAIL ] getParameter(PIXEL_UNPACK_BUFFER_BINDING): Expect subobject expando to survive despite GC. 58 [ 54: PASS ] getParameter(PIXEL_UNPACK_BUFFER_BINDING): Expect extra expando to survive despite GC. 59 [ 55: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 60 [ 56: PASS ] getParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING) returns instance that was bound. 61 [ 57: FAIL ] getParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING): Expect basic expando to survive despite GC. 62 [ 58: FAIL ] getParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING): Expect subobject expando to survive despite GC. 63 [ 59: PASS ] getParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING): Expect extra expando to survive despite GC. 64 [ 60: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 65 [ 61: PASS ] getParameter(UNIFORM_BUFFER_BINDING) returns instance that was bound. 66 [ 62: FAIL ] getParameter(UNIFORM_BUFFER_BINDING): Expect basic expando to survive despite GC. 67 [ 63: FAIL ] getParameter(UNIFORM_BUFFER_BINDING): Expect subobject expando to survive despite GC. 68 [ 64: PASS ] getParameter(UNIFORM_BUFFER_BINDING): Expect extra expando to survive despite GC. 69 [ 65: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 70 [ 66: PASS ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) returns instance that was bound. 71 [ 67: PASS ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 1) returns instance that was bound. 72 [ 68: PASS ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 2) returns instance that was bound. 73 [ 69: PASS ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 3) returns instance that was bound. 74 [ 70: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 0): Expect basic expando to survive despite GC. 75 [ 71: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 0): Expect subobject expando to survive despite GC. 76 [ 72: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 0): Expect extra expando to survive despite GC. 77 [ 73: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 78 [ 74: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 1): Expect basic expando to survive despite GC. 79 [ 75: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 1): Expect subobject expando to survive despite GC. 80 [ 76: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 1): Expect extra expando to survive despite GC. 81 [ 77: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 82 [ 78: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 2): Expect basic expando to survive despite GC. 83 [ 79: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 2): Expect subobject expando to survive despite GC. 84 [ 80: FAIL ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 2): Expect extra expando to survive despite GC. 85 [ 81: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 86 [ 82: PASS ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 3): Expect basic expando to survive despite GC. 87 [ 83: PASS ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 3): Expect subobject expando to survive despite GC. 88 [ 84: PASS ] getIndexedParameter(TRANSFORM_FEEDBACK_BUFFER_BINDING, 3): Expect extra expando to survive despite GC. 89 [ 85: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 90 [ 86: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 0) returns instance that was bound. 91 [ 87: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 1) returns instance that was bound. 92 [ 88: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 2) returns instance that was bound. 93 [ 89: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 3) returns instance that was bound. 94 [ 90: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 4) returns instance that was bound. 95 [ 91: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 5) returns instance that was bound. 96 [ 92: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 6) returns instance that was bound. 97 [ 93: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 7) returns instance that was bound. 98 [ 94: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 8) returns instance that was bound. 99 [ 95: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 9) returns instance that was bound. 100 [ 96: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 10) returns instance that was bound. 101 [ 97: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 11) returns instance that was bound. 102 [ 98: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 12) returns instance that was bound. 103 [ 99: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 13) returns instance that was bound. 104 [ 100: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 14) returns instance that was bound. 105 [ 101: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 15) returns instance that was bound. 106 [ 102: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 16) returns instance that was bound. 107 [ 103: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 17) returns instance that was bound. 108 [ 104: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 18) returns instance that was bound. 109 [ 105: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 19) returns instance that was bound. 110 [ 106: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 20) returns instance that was bound. 111 [ 107: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 21) returns instance that was bound. 112 [ 108: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 22) returns instance that was bound. 113 [ 109: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 23) returns instance that was bound. 114 [ 110: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 24) returns instance that was bound. 115 [ 111: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 25) returns instance that was bound. 116 [ 112: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 26) returns instance that was bound. 117 [ 113: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 27) returns instance that was bound. 118 [ 114: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 28) returns instance that was bound. 119 [ 115: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 29) returns instance that was bound. 120 [ 116: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 30) returns instance that was bound. 121 [ 117: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 31) returns instance that was bound. 122 [ 118: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 32) returns instance that was bound. 123 [ 119: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 33) returns instance that was bound. 124 [ 120: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 34) returns instance that was bound. 125 [ 121: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 35) returns instance that was bound. 126 [ 122: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 36) returns instance that was bound. 127 [ 123: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 37) returns instance that was bound. 128 [ 124: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 38) returns instance that was bound. 129 [ 125: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 39) returns instance that was bound. 130 [ 126: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 40) returns instance that was bound. 131 [ 127: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 41) returns instance that was bound. 132 [ 128: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 42) returns instance that was bound. 133 [ 129: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 43) returns instance that was bound. 134 [ 130: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 44) returns instance that was bound. 135 [ 131: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 45) returns instance that was bound. 136 [ 132: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 46) returns instance that was bound. 137 [ 133: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 47) returns instance that was bound. 138 [ 134: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 0): Expect basic expando to survive despite GC. 139 [ 135: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 0): Expect subobject expando to survive despite GC. 140 [ 136: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 0): Expect extra expando to survive despite GC. 141 [ 137: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 142 [ 138: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 1): Expect basic expando to survive despite GC. 143 [ 139: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 1): Expect subobject expando to survive despite GC. 144 [ 140: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 1): Expect extra expando to survive despite GC. 145 [ 141: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 146 [ 142: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 2): Expect basic expando to survive despite GC. 147 [ 143: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 2): Expect subobject expando to survive despite GC. 148 [ 144: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 2): Expect extra expando to survive despite GC. 149 [ 145: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 150 [ 146: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 3): Expect basic expando to survive despite GC. 151 [ 147: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 3): Expect subobject expando to survive despite GC. 152 [ 148: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 3): Expect extra expando to survive despite GC. 153 [ 149: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 154 [ 150: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 4): Expect basic expando to survive despite GC. 155 [ 151: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 4): Expect subobject expando to survive despite GC. 156 [ 152: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 4): Expect extra expando to survive despite GC. 157 [ 153: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 158 [ 154: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 5): Expect basic expando to survive despite GC. 159 [ 155: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 5): Expect subobject expando to survive despite GC. 160 [ 156: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 5): Expect extra expando to survive despite GC. 161 [ 157: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 162 [ 158: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 6): Expect basic expando to survive despite GC. 163 [ 159: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 6): Expect subobject expando to survive despite GC. 164 [ 160: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 6): Expect extra expando to survive despite GC. 165 [ 161: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 166 [ 162: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 7): Expect basic expando to survive despite GC. 167 [ 163: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 7): Expect subobject expando to survive despite GC. 168 [ 164: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 7): Expect extra expando to survive despite GC. 169 [ 165: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 170 [ 166: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 8): Expect basic expando to survive despite GC. 171 [ 167: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 8): Expect subobject expando to survive despite GC. 172 [ 168: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 8): Expect extra expando to survive despite GC. 173 [ 169: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 174 [ 170: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 9): Expect basic expando to survive despite GC. 175 [ 171: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 9): Expect subobject expando to survive despite GC. 176 [ 172: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 9): Expect extra expando to survive despite GC. 177 [ 173: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 178 [ 174: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 10): Expect basic expando to survive despite GC. 179 [ 175: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 10): Expect subobject expando to survive despite GC. 180 [ 176: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 10): Expect extra expando to survive despite GC. 181 [ 177: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 182 [ 178: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 11): Expect basic expando to survive despite GC. 183 [ 179: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 11): Expect subobject expando to survive despite GC. 184 [ 180: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 11): Expect extra expando to survive despite GC. 185 [ 181: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 186 [ 182: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 12): Expect basic expando to survive despite GC. 187 [ 183: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 12): Expect subobject expando to survive despite GC. 188 [ 184: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 12): Expect extra expando to survive despite GC. 189 [ 185: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 190 [ 186: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 13): Expect basic expando to survive despite GC. 191 [ 187: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 13): Expect subobject expando to survive despite GC. 192 [ 188: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 13): Expect extra expando to survive despite GC. 193 [ 189: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 194 [ 190: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 14): Expect basic expando to survive despite GC. 195 [ 191: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 14): Expect subobject expando to survive despite GC. 196 [ 192: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 14): Expect extra expando to survive despite GC. 197 [ 193: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 198 [ 194: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 15): Expect basic expando to survive despite GC. 199 [ 195: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 15): Expect subobject expando to survive despite GC. 200 [ 196: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 15): Expect extra expando to survive despite GC. 201 [ 197: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 202 [ 198: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 16): Expect basic expando to survive despite GC. 203 [ 199: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 16): Expect subobject expando to survive despite GC. 204 [ 200: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 16): Expect extra expando to survive despite GC. 205 [ 201: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 206 [ 202: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 17): Expect basic expando to survive despite GC. 207 [ 203: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 17): Expect subobject expando to survive despite GC. 208 [ 204: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 17): Expect extra expando to survive despite GC. 209 [ 205: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 210 [ 206: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 18): Expect basic expando to survive despite GC. 211 [ 207: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 18): Expect subobject expando to survive despite GC. 212 [ 208: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 18): Expect extra expando to survive despite GC. 213 [ 209: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 214 [ 210: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 19): Expect basic expando to survive despite GC. 215 [ 211: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 19): Expect subobject expando to survive despite GC. 216 [ 212: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 19): Expect extra expando to survive despite GC. 217 [ 213: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 218 [ 214: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 20): Expect basic expando to survive despite GC. 219 [ 215: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 20): Expect subobject expando to survive despite GC. 220 [ 216: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 20): Expect extra expando to survive despite GC. 221 [ 217: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 222 [ 218: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 21): Expect basic expando to survive despite GC. 223 [ 219: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 21): Expect subobject expando to survive despite GC. 224 [ 220: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 21): Expect extra expando to survive despite GC. 225 [ 221: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 226 [ 222: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 22): Expect basic expando to survive despite GC. 227 [ 223: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 22): Expect subobject expando to survive despite GC. 228 [ 224: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 22): Expect extra expando to survive despite GC. 229 [ 225: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 230 [ 226: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 23): Expect basic expando to survive despite GC. 231 [ 227: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 23): Expect subobject expando to survive despite GC. 232 [ 228: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 23): Expect extra expando to survive despite GC. 233 [ 229: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 234 [ 230: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 24): Expect basic expando to survive despite GC. 235 [ 231: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 24): Expect subobject expando to survive despite GC. 236 [ 232: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 24): Expect extra expando to survive despite GC. 237 [ 233: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 238 [ 234: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 25): Expect basic expando to survive despite GC. 239 [ 235: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 25): Expect subobject expando to survive despite GC. 240 [ 236: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 25): Expect extra expando to survive despite GC. 241 [ 237: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 242 [ 238: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 26): Expect basic expando to survive despite GC. 243 [ 239: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 26): Expect subobject expando to survive despite GC. 244 [ 240: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 26): Expect extra expando to survive despite GC. 245 [ 241: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 246 [ 242: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 27): Expect basic expando to survive despite GC. 247 [ 243: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 27): Expect subobject expando to survive despite GC. 248 [ 244: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 27): Expect extra expando to survive despite GC. 249 [ 245: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 250 [ 246: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 28): Expect basic expando to survive despite GC. 251 [ 247: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 28): Expect subobject expando to survive despite GC. 252 [ 248: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 28): Expect extra expando to survive despite GC. 253 [ 249: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 254 [ 250: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 29): Expect basic expando to survive despite GC. 255 [ 251: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 29): Expect subobject expando to survive despite GC. 256 [ 252: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 29): Expect extra expando to survive despite GC. 257 [ 253: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 258 [ 254: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 30): Expect basic expando to survive despite GC. 259 [ 255: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 30): Expect subobject expando to survive despite GC. 260 [ 256: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 30): Expect extra expando to survive despite GC. 261 [ 257: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 262 [ 258: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 31): Expect basic expando to survive despite GC. 263 [ 259: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 31): Expect subobject expando to survive despite GC. 264 [ 260: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 31): Expect extra expando to survive despite GC. 265 [ 261: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 266 [ 262: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 32): Expect basic expando to survive despite GC. 267 [ 263: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 32): Expect subobject expando to survive despite GC. 268 [ 264: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 32): Expect extra expando to survive despite GC. 269 [ 265: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 270 [ 266: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 33): Expect basic expando to survive despite GC. 271 [ 267: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 33): Expect subobject expando to survive despite GC. 272 [ 268: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 33): Expect extra expando to survive despite GC. 273 [ 269: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 274 [ 270: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 34): Expect basic expando to survive despite GC. 275 [ 271: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 34): Expect subobject expando to survive despite GC. 276 [ 272: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 34): Expect extra expando to survive despite GC. 277 [ 273: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 278 [ 274: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 35): Expect basic expando to survive despite GC. 279 [ 275: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 35): Expect subobject expando to survive despite GC. 280 [ 276: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 35): Expect extra expando to survive despite GC. 281 [ 277: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 282 [ 278: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 36): Expect basic expando to survive despite GC. 283 [ 279: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 36): Expect subobject expando to survive despite GC. 284 [ 280: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 36): Expect extra expando to survive despite GC. 285 [ 281: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 286 [ 282: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 37): Expect basic expando to survive despite GC. 287 [ 283: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 37): Expect subobject expando to survive despite GC. 288 [ 284: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 37): Expect extra expando to survive despite GC. 289 [ 285: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 290 [ 286: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 38): Expect basic expando to survive despite GC. 291 [ 287: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 38): Expect subobject expando to survive despite GC. 292 [ 288: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 38): Expect extra expando to survive despite GC. 293 [ 289: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 294 [ 290: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 39): Expect basic expando to survive despite GC. 295 [ 291: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 39): Expect subobject expando to survive despite GC. 296 [ 292: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 39): Expect extra expando to survive despite GC. 297 [ 293: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 298 [ 294: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 40): Expect basic expando to survive despite GC. 299 [ 295: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 40): Expect subobject expando to survive despite GC. 300 [ 296: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 40): Expect extra expando to survive despite GC. 301 [ 297: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 302 [ 298: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 41): Expect basic expando to survive despite GC. 303 [ 299: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 41): Expect subobject expando to survive despite GC. 304 [ 300: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 41): Expect extra expando to survive despite GC. 305 [ 301: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 306 [ 302: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 42): Expect basic expando to survive despite GC. 307 [ 303: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 42): Expect subobject expando to survive despite GC. 308 [ 304: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 42): Expect extra expando to survive despite GC. 309 [ 305: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 310 [ 306: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 43): Expect basic expando to survive despite GC. 311 [ 307: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 43): Expect subobject expando to survive despite GC. 312 [ 308: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 43): Expect extra expando to survive despite GC. 313 [ 309: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 314 [ 310: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 44): Expect basic expando to survive despite GC. 315 [ 311: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 44): Expect subobject expando to survive despite GC. 316 [ 312: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 44): Expect extra expando to survive despite GC. 317 [ 313: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 318 [ 314: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 45): Expect basic expando to survive despite GC. 319 [ 315: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 45): Expect subobject expando to survive despite GC. 320 [ 316: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 45): Expect extra expando to survive despite GC. 321 [ 317: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 322 [ 318: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 46): Expect basic expando to survive despite GC. 323 [ 319: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 46): Expect subobject expando to survive despite GC. 324 [ 320: FAIL ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 46): Expect extra expando to survive despite GC. 325 [ 321: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 326 [ 322: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 47): Expect basic expando to survive despite GC. 327 [ 323: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 47): Expect subobject expando to survive despite GC. 328 [ 324: PASS ] getIndexedParameter(UNIFORM_BUFFER_BINDING, 47): Expect extra expando to survive despite GC. 329 [ 325: PASS ] [object WebGLBuffer] is an instance of WebGLBuffer 330 [ 326: PASS ] CURRENT_QUERY returns instance that was bound. 331 [ 327: PASS ] CURRENT_QUERY returns instance that was bound. 332 [ 328: FAIL ] Query: Expect basic expando to survive despite GC. 333 [ 329: FAIL ] Query: Expect subobject expando to survive despite GC. 334 [ 330: PASS ] Query: Expect extra expando to survive despite GC. 335 [ 331: PASS ] [object WebGLQuery] is an instance of WebGLQuery 336 [ 332: FAIL ] Query: Expect basic expando to survive despite GC. 337 [ 333: FAIL ] Query: Expect subobject expando to survive despite GC. 338 [ 334: PASS ] Query: Expect extra expando to survive despite GC. 339 [ 335: PASS ] [object WebGLQuery] is an instance of WebGLQuery 340 [ 336: PASS ] successfullyParsed is true 341 [ FAIL ] 180 failures reported 4 [ PASS ] All tests passed -
trunk/LayoutTests/webgl/2.0.0/resources/webgl_test_files/js/js-test-pre.js
r265523 r265708 709 709 } 710 710 711 // WebKit's MiniBrowser 712 if (window.$vm) { 713 window.$vm.gc(); 714 return; 715 } 716 711 717 function gcRec(n) { 712 718 if (n < 1) -
trunk/Source/WebCore/ChangeLog
r265705 r265708 1 2020-08-14 Kenneth Russell <kbr@chromium.org> 2 3 [WebGL2] expando-loss and expando-loss-2 conformance tests are failing 4 https://bugs.webkit.org/show_bug.cgi?id=214765 5 6 Reviewed by Yusuke Suzuki. 7 8 Re-land with locking fixes ysuzuki@ pointed out as necessary, and 9 advised heavily on. 10 11 Use JSWebGLRenderingContext's and JSWebGL2RenderingContext's 12 existing visitAdditionalChildren hook, via JSCustomMarkFunction in 13 their IDL, to add opaque roots for all WebGLObjects latched in to 14 the context state, and all WebGLObjects they refer to. Extensions 15 were already previously handled. 16 17 In order to support JSC's concurrent marking, grab a 18 per-WebGL-context lock in visitAdditionalChildren, and in all 19 WebGL context- and object-related methods which modify compound 20 data structures like HashMaps and Vectors that are traversed by 21 visitAdditionalChildren and its callees. Add "const 22 AbstractLocker&" throughout WebGL's call hierarchy to guarantee 23 that this lock is held where needed. Add needed exception in 24 WebGLObjects' destructors to avoid recursive locking, and in 25 WebGLContextGroup destruction to avoid mutating objects that GC 26 might be traversing when a lock is no longer available on the 27 application's thread. 28 29 Add "GenerateIsReachable=Impl" to the IDL files of needed WebGL 30 objects (WebGLBuffer, WebGLTexture, etc.) so that they pay 31 attention to the opaque root state when determining liveness of 32 their JavaScript wrappers. Add a FIXME to objectGraphLock in 33 WebGLRenderingContextBase to consider rewriting this in a 34 lock-free manner. 35 36 Covered by existing WebGL conformance tests. 37 38 * bindings/js/JSWebGL2RenderingContextCustom.cpp: 39 (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren): 40 * bindings/js/JSWebGLRenderingContextCustom.cpp: 41 (WebCore::JSWebGLRenderingContext::visitAdditionalChildren): 42 * html/canvas/OESVertexArrayObject.cpp: 43 (WebCore::OESVertexArrayObject::deleteVertexArrayOES): 44 (WebCore::OESVertexArrayObject::bindVertexArrayOES): 45 * html/canvas/WebGL2RenderingContext.cpp: 46 (WebCore::WebGL2RenderingContext::validateAndCacheBufferBinding): 47 (WebCore::WebGL2RenderingContext::bindFramebuffer): 48 (WebCore::WebGL2RenderingContext::deleteFramebuffer): 49 (WebCore::WebGL2RenderingContext::deleteQuery): 50 (WebCore::WebGL2RenderingContext::beginQuery): 51 (WebCore::WebGL2RenderingContext::endQuery): 52 (WebCore::WebGL2RenderingContext::deleteSampler): 53 (WebCore::WebGL2RenderingContext::bindSampler): 54 (WebCore::WebGL2RenderingContext::deleteSync): 55 (WebCore::WebGL2RenderingContext::deleteTransformFeedback): 56 (WebCore::WebGL2RenderingContext::bindTransformFeedback): 57 (WebCore::WebGL2RenderingContext::beginTransformFeedback): 58 (WebCore::WebGL2RenderingContext::setIndexedBufferBinding): 59 (WebCore::WebGL2RenderingContext::deleteVertexArray): 60 (WebCore::WebGL2RenderingContext::bindVertexArray): 61 (WebCore::WebGL2RenderingContext::addMembersToOpaqueRoots): 62 (WebCore::WebGL2RenderingContext::uncacheDeletedBuffer): 63 * html/canvas/WebGL2RenderingContext.h: 64 * html/canvas/WebGLBuffer.cpp: 65 (WebCore::WebGLBuffer::~WebGLBuffer): 66 (WebCore::WebGLBuffer::deleteObjectImpl): 67 * html/canvas/WebGLBuffer.h: 68 * html/canvas/WebGLBuffer.idl: 69 * html/canvas/WebGLContextGroup.cpp: 70 (WebCore::WebGLContextGroup::hasAContext const): 71 (WebCore::WebGLContextGroup::objectGraphLockForAContext): 72 (WebCore::WebGLContextGroup::detachAndRemoveAllObjects): 73 * html/canvas/WebGLContextGroup.h: 74 * html/canvas/WebGLContextObject.cpp: 75 (WebCore::WebGLContextObject::detachContext): 76 (WebCore::WebGLContextObject::objectGraphLockForContext): 77 * html/canvas/WebGLContextObject.h: 78 * html/canvas/WebGLFramebuffer.cpp: 79 (WebCore::WebGLFramebuffer::~WebGLFramebuffer): 80 (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): 81 (WebCore::WebGLFramebuffer::deleteObjectImpl): 82 (WebCore::WebGLFramebuffer::initializeAttachments): 83 (WebCore::WebGLFramebuffer::addMembersToOpaqueRoots): 84 (WebCore::WebGLFramebuffer::setAttachmentInternal): 85 (WebCore::WebGLFramebuffer::removeAttachmentInternal): 86 * html/canvas/WebGLFramebuffer.h: 87 * html/canvas/WebGLFramebuffer.idl: 88 * html/canvas/WebGLObject.cpp: 89 (WebCore::WebGLObject::runDestructor): 90 (WebCore::WebGLObject::deleteObject): 91 * html/canvas/WebGLObject.h: 92 * html/canvas/WebGLProgram.cpp: 93 (WebCore::WebGLProgram::~WebGLProgram): 94 (WebCore::WebGLProgram::deleteObjectImpl): 95 (WebCore::WebGLProgram::attachShader): 96 (WebCore::WebGLProgram::detachShader): 97 (WebCore::WebGLProgram::addMembersToOpaqueRoots): 98 * html/canvas/WebGLProgram.h: 99 * html/canvas/WebGLProgram.idl: 100 * html/canvas/WebGLQuery.cpp: 101 (WebCore::WebGLQuery::~WebGLQuery): 102 (WebCore::WebGLQuery::deleteObjectImpl): 103 * html/canvas/WebGLQuery.h: 104 * html/canvas/WebGLQuery.idl: 105 * html/canvas/WebGLRenderbuffer.cpp: 106 (WebCore::WebGLRenderbuffer::~WebGLRenderbuffer): 107 (WebCore::WebGLRenderbuffer::deleteObjectImpl): 108 * html/canvas/WebGLRenderbuffer.h: 109 * html/canvas/WebGLRenderbuffer.idl: 110 * html/canvas/WebGLRenderingContextBase.cpp: 111 (WebCore::WebGLRenderingContextBase::attachShader): 112 (WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding): 113 (WebCore::WebGLRenderingContextBase::bindBuffer): 114 (WebCore::WebGLRenderingContextBase::bindFramebuffer): 115 (WebCore::WebGLRenderingContextBase::bindRenderbuffer): 116 (WebCore::WebGLRenderingContextBase::bindTexture): 117 (WebCore::WebGLRenderingContextBase::deleteObject): 118 (WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer): 119 (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject): 120 (WebCore::WebGLRenderingContextBase::deleteBuffer): 121 (WebCore::WebGLRenderingContextBase::deleteFramebuffer): 122 (WebCore::WebGLRenderingContextBase::deleteProgram): 123 (WebCore::WebGLRenderingContextBase::deleteRenderbuffer): 124 (WebCore::WebGLRenderingContextBase::deleteShader): 125 (WebCore::WebGLRenderingContextBase::deleteTexture): 126 (WebCore::WebGLRenderingContextBase::detachShader): 127 (WebCore::WebGLRenderingContextBase::useProgram): 128 (WebCore::WebGLRenderingContextBase::vertexAttribPointer): 129 (WebCore::WebGLRenderingContextBase::detachAndRemoveAllObjects): 130 (WebCore::WebGLRenderingContextBase::setFramebuffer): 131 (WebCore::WebGLRenderingContextBase::addMembersToOpaqueRoots): 132 (WebCore::WebGLRenderingContextBase::objectGraphLock): 133 * html/canvas/WebGLRenderingContextBase.h: 134 (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject): Deleted. 135 * html/canvas/WebGLSampler.cpp: 136 (WebCore::WebGLSampler::~WebGLSampler): 137 (WebCore::WebGLSampler::deleteObjectImpl): 138 * html/canvas/WebGLSampler.h: 139 * html/canvas/WebGLSampler.idl: 140 * html/canvas/WebGLShader.cpp: 141 (WebCore::WebGLShader::~WebGLShader): 142 (WebCore::WebGLShader::deleteObjectImpl): 143 * html/canvas/WebGLShader.h: 144 * html/canvas/WebGLShader.idl: 145 * html/canvas/WebGLSharedObject.cpp: 146 (WebCore::WebGLSharedObject::detachContextGroup): 147 (WebCore::WebGLSharedObject::detachContextGroupWithoutDeletingObject): 148 (WebCore::WebGLSharedObject::hasGroupOrContext const): 149 (WebCore::WebGLSharedObject::objectGraphLockForContext): 150 * html/canvas/WebGLSharedObject.h: 151 * html/canvas/WebGLSync.cpp: 152 (WebCore::WebGLSync::~WebGLSync): 153 (WebCore::WebGLSync::deleteObjectImpl): 154 * html/canvas/WebGLSync.h: 155 * html/canvas/WebGLTexture.cpp: 156 (WebCore::WebGLTexture::~WebGLTexture): 157 (WebCore::WebGLTexture::deleteObjectImpl): 158 * html/canvas/WebGLTexture.h: 159 * html/canvas/WebGLTexture.idl: 160 * html/canvas/WebGLTransformFeedback.cpp: 161 (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): 162 (WebCore::WebGLTransformFeedback::deleteObjectImpl): 163 (WebCore::WebGLTransformFeedback::setProgram): 164 (WebCore::WebGLTransformFeedback::setBoundIndexedTransformFeedbackBuffer): 165 (WebCore::WebGLTransformFeedback::addMembersToOpaqueRoots): 166 (WebCore::WebGLTransformFeedback::unbindBuffer): 167 * html/canvas/WebGLTransformFeedback.h: 168 * html/canvas/WebGLTransformFeedback.idl: 169 * html/canvas/WebGLVertexArrayObject.cpp: 170 (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): 171 (WebCore::WebGLVertexArrayObject::deleteObjectImpl): 172 * html/canvas/WebGLVertexArrayObject.h: 173 * html/canvas/WebGLVertexArrayObject.idl: 174 * html/canvas/WebGLVertexArrayObjectBase.cpp: 175 (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer): 176 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState): 177 (WebCore::WebGLVertexArrayObjectBase::unbindBuffer): 178 (WebCore::WebGLVertexArrayObjectBase::addMembersToOpaqueRoots): 179 * html/canvas/WebGLVertexArrayObjectBase.h: 180 * html/canvas/WebGLVertexArrayObjectOES.cpp: 181 (WebCore::WebGLVertexArrayObjectOES::~WebGLVertexArrayObjectOES): 182 (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl): 183 * html/canvas/WebGLVertexArrayObjectOES.h: 184 * html/canvas/WebGLVertexArrayObjectOES.idl: 185 1 186 2020-08-14 Andres Gonzalez <andresg_22@apple.com> 2 187 -
trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp
r265523 r265708 37 37 { 38 38 visitor.addOpaqueRoot(&wrapped()); 39 wrapped().addMembersToOpaqueRoots(visitor); 39 40 } 40 41 -
trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
r265523 r265708 37 37 { 38 38 visitor.addOpaqueRoot(&wrapped()); 39 wrapped().addMembersToOpaqueRoots(visitor); 39 40 } 40 41 -
trunk/Source/WebCore/html/canvas/OESVertexArrayObject.cpp
r254214 r265708 31 31 #include "ExtensionsGL.h" 32 32 #include "WebGLRenderingContext.h" 33 #include <wtf/Lock.h> 34 #include <wtf/Locker.h> 33 35 34 36 namespace WebCore { … … 56 58 void OESVertexArrayObject::deleteVertexArrayOES(WebGLVertexArrayObjectOES* arrayObject) 57 59 { 60 auto locker = holdLock(m_context.objectGraphLock()); 61 58 62 if (!arrayObject || m_context.isContextLost()) 59 63 return; 60 64 61 65 if (!arrayObject->isDefaultObject() && arrayObject == static_cast<WebGLRenderingContext&>(m_context).m_boundVertexArrayObject) 62 static_cast<WebGLRenderingContext&>(m_context).setBoundVertexArrayObject( nullptr);66 static_cast<WebGLRenderingContext&>(m_context).setBoundVertexArrayObject(locker, nullptr); 63 67 64 arrayObject->deleteObject( m_context.graphicsContextGL());68 arrayObject->deleteObject(locker, m_context.graphicsContextGL()); 65 69 } 66 70 … … 73 77 void OESVertexArrayObject::bindVertexArrayOES(WebGLVertexArrayObjectOES* arrayObject) 74 78 { 79 auto locker = holdLock(m_context.objectGraphLock()); 80 75 81 if (m_context.isContextLost()) 76 82 return; … … 86 92 extensions.bindVertexArrayOES(arrayObject->object()); 87 93 arrayObject->setHasEverBeenBound(); 88 context.setBoundVertexArrayObject( arrayObject);94 context.setBoundVertexArrayObject(locker, arrayObject); 89 95 } else { 90 96 extensions.bindVertexArrayOES(0); 91 context.setBoundVertexArrayObject( nullptr);97 context.setBoundVertexArrayObject(locker, nullptr); 92 98 } 93 99 } -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
r265523 r265708 67 67 #include <JavaScriptCore/HeapInlines.h> 68 68 #include <JavaScriptCore/JSGenericTypedArrayViewInlines.h> 69 #include <JavaScriptCore/SlotVisitor.h> 70 #include <JavaScriptCore/SlotVisitorInlines.h> 69 71 #include <JavaScriptCore/TypedArrayType.h> 70 72 #include <wtf/IsoMallocInlines.h> 73 #include <wtf/Lock.h> 74 #include <wtf/Locker.h> 71 75 72 76 namespace WebCore { … … 350 354 } 351 355 352 bool WebGL2RenderingContext::validateAndCacheBufferBinding(const char* functionName, GCGLenum target, WebGLBuffer* buffer)356 bool WebGL2RenderingContext::validateAndCacheBufferBinding(const AbstractLocker& locker, const char* functionName, GCGLenum target, WebGLBuffer* buffer) 353 357 { 354 358 if (!validateBufferTarget(functionName, target)) … … 369 373 break; 370 374 case GraphicsContextGL::ELEMENT_ARRAY_BUFFER: 371 m_boundVertexArrayObject->setElementArrayBuffer( buffer);375 m_boundVertexArrayObject->setElementArrayBuffer(locker, buffer); 372 376 break; 373 377 case GraphicsContextGL::PIXEL_PACK_BUFFER: … … 694 698 void WebGL2RenderingContext::bindFramebuffer(GCGLenum target, WebGLFramebuffer* buffer) 695 699 { 700 auto locker = holdLock(objectGraphLock()); 701 696 702 if (!checkObjectToBeBound("bindFramebuffer", buffer)) 697 703 return; … … 709 715 } 710 716 711 setFramebuffer( target, buffer);717 setFramebuffer(locker, target, buffer); 712 718 } 713 719 … … 722 728 void WebGL2RenderingContext::deleteFramebuffer(WebGLFramebuffer* framebuffer) 723 729 { 724 if (!deleteObject(framebuffer)) 730 auto locker = holdLock(objectGraphLock()); 731 732 if (!deleteObject(locker, framebuffer)) 725 733 return; 726 734 … … 1841 1849 void WebGL2RenderingContext::deleteQuery(WebGLQuery* query) 1842 1850 { 1851 auto locker = holdLock(objectGraphLock()); 1852 1843 1853 if (isContextLostOrPending() || !query || !query->object() || !validateWebGLObject("deleteQuery", query)) 1844 1854 return; … … 1847 1857 m_activeQueries.remove(query->target()); 1848 1858 } 1849 deleteObject( query);1859 deleteObject(locker, query); 1850 1860 } 1851 1861 … … 1870 1880 void WebGL2RenderingContext::beginQuery(GCGLenum target, WebGLQuery& query) 1871 1881 { 1882 auto locker = holdLock(objectGraphLock()); 1883 1872 1884 GCGLenum targetKey; 1873 1885 if (isContextLostOrPending() || !validateWebGLObject("beginQuery", &query) || !validateQueryTarget("beginQuery", target, &targetKey)) … … 1893 1905 void WebGL2RenderingContext::endQuery(GCGLenum target) 1894 1906 { 1907 auto locker = holdLock(objectGraphLock()); 1908 1895 1909 GCGLenum targetKey; 1896 1910 if (isContextLostOrPending() || !scriptExecutionContext() || !validateQueryTarget("beginQuery", target, &targetKey)) … … 1964 1978 void WebGL2RenderingContext::deleteSampler(WebGLSampler* sampler) 1965 1979 { 1980 auto locker = holdLock(objectGraphLock()); 1981 1966 1982 if (isContextLostOrPending()) 1967 1983 return; … … 1975 1991 } 1976 1992 1977 deleteObject( sampler);1993 deleteObject(locker, sampler); 1978 1994 } 1979 1995 … … 1988 2004 void WebGL2RenderingContext::bindSampler(GCGLuint unit, WebGLSampler* sampler) 1989 2005 { 2006 auto locker = holdLock(objectGraphLock()); 2007 1990 2008 if (isContextLostOrPending()) 1991 2009 return; … … 2078 2096 void WebGL2RenderingContext::deleteSync(WebGLSync* sync) 2079 2097 { 2098 auto locker = holdLock(objectGraphLock()); 2099 2080 2100 if (isContextLostOrPending() || !sync || sync->isDeleted() || !validateWebGLObject("deleteSync", sync)) 2081 2101 return; 2082 deleteObject( sync);2102 deleteObject(locker, sync); 2083 2103 } 2084 2104 … … 2149 2169 void WebGL2RenderingContext::deleteTransformFeedback(WebGLTransformFeedback* feedbackObject) 2150 2170 { 2171 auto locker = holdLock(objectGraphLock()); 2172 2151 2173 if (isContextLostOrPending() || !feedbackObject || feedbackObject->isDeleted() || !validateWebGLObject("deleteTransformFeedback", feedbackObject)) 2152 2174 return; … … 2162 2184 m_boundTransformFeedback = m_defaultTransformFeedback; 2163 2185 2164 deleteObject( feedbackObject);2186 deleteObject(locker, feedbackObject); 2165 2187 } 2166 2188 … … 2175 2197 void WebGL2RenderingContext::bindTransformFeedback(GCGLenum target, WebGLTransformFeedback* feedbackObject) 2176 2198 { 2199 auto locker = holdLock(objectGraphLock()); 2200 2177 2201 if (isContextLostOrPending()) 2178 2202 return; … … 2243 2267 m_context->beginTransformFeedback(primitiveMode); 2244 2268 2245 m_boundTransformFeedback->setProgram(*m_currentProgram); 2269 auto locker = holdLock(objectGraphLock()); 2270 m_boundTransformFeedback->setProgram(locker, *m_currentProgram); 2246 2271 m_boundTransformFeedback->setActive(true); 2247 2272 m_boundTransformFeedback->setPaused(false); … … 2340 2365 bool WebGL2RenderingContext::setIndexedBufferBinding(const char *functionName, GCGLenum target, GCGLuint index, WebGLBuffer* buffer) 2341 2366 { 2367 auto locker = holdLock(objectGraphLock()); 2368 2342 2369 if (isContextLostOrPending()) 2343 2370 return false; … … 2364 2391 } 2365 2392 2366 if (!validateAndCacheBufferBinding( functionName, target, buffer))2393 if (!validateAndCacheBufferBinding(locker, functionName, target, buffer)) 2367 2394 return false; 2368 2395 2369 2396 switch (target) { 2370 2397 case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER: 2371 m_boundTransformFeedback->setBoundIndexedTransformFeedbackBuffer( index, buffer);2398 m_boundTransformFeedback->setBoundIndexedTransformFeedbackBuffer(locker, index, buffer); 2372 2399 break; 2373 2400 case GraphicsContextGL::UNIFORM_BUFFER: … … 2574 2601 void WebGL2RenderingContext::deleteVertexArray(WebGLVertexArrayObject* arrayObject) 2575 2602 { 2603 auto locker = holdLock(objectGraphLock()); 2604 2576 2605 if (!arrayObject || isContextLost()) 2577 2606 return; … … 2580 2609 return; 2581 2610 2582 if (!arrayObject->isDefaultObject() && arrayObject == m_boundVertexArrayObject) 2611 if (!arrayObject->isDefaultObject() && arrayObject == m_boundVertexArrayObject) { 2583 2612 #if USE(OPENGL_ES) 2584 setBoundVertexArrayObject( nullptr);2613 setBoundVertexArrayObject(locker, nullptr); 2585 2614 #else 2615 // bindVertexArray grabs the lock internally. 2616 locker.unlockEarly(); 2586 2617 bindVertexArray(nullptr); // The default VAO was removed in OpenGL 3.3 but not from WebGL 2; bind the default for WebGL to use. 2618 locker = holdLock(objectGraphLock()); 2587 2619 #endif 2588 2589 arrayObject->deleteObject(graphicsContextGL()); 2620 } 2621 2622 arrayObject->deleteObject(locker, graphicsContextGL()); 2590 2623 } 2591 2624 … … 2603 2636 void WebGL2RenderingContext::bindVertexArray(WebGLVertexArrayObject* arrayObject) 2604 2637 { 2638 auto locker = holdLock(objectGraphLock()); 2639 2605 2640 if (isContextLost()) 2606 2641 return; … … 2614 2649 2615 2650 arrayObject->setHasEverBeenBound(); 2616 setBoundVertexArrayObject( arrayObject);2651 setBoundVertexArrayObject(locker, arrayObject); 2617 2652 } else { 2618 2653 m_context->bindVertexArray(m_defaultVertexArrayObject->object()); 2619 setBoundVertexArrayObject( m_defaultVertexArrayObject.get());2654 setBoundVertexArrayObject(locker, m_defaultVertexArrayObject.get()); 2620 2655 } 2621 2656 } … … 3009 3044 } 3010 3045 return true; 3046 } 3047 3048 void WebGL2RenderingContext::addMembersToOpaqueRoots(JSC::SlotVisitor& visitor) 3049 { 3050 WebGLRenderingContextBase::addMembersToOpaqueRoots(visitor); 3051 3052 auto locker = holdLock(objectGraphLock()); 3053 visitor.addOpaqueRoot(m_readFramebufferBinding.get()); 3054 if (m_readFramebufferBinding) 3055 m_readFramebufferBinding->addMembersToOpaqueRoots(locker, visitor); 3056 3057 visitor.addOpaqueRoot(m_boundTransformFeedback.get()); 3058 if (m_boundTransformFeedback) 3059 m_boundTransformFeedback->addMembersToOpaqueRoots(locker, visitor); 3060 3061 visitor.addOpaqueRoot(m_boundCopyReadBuffer.get()); 3062 visitor.addOpaqueRoot(m_boundCopyWriteBuffer.get()); 3063 visitor.addOpaqueRoot(m_boundPixelPackBuffer.get()); 3064 visitor.addOpaqueRoot(m_boundPixelUnpackBuffer.get()); 3065 visitor.addOpaqueRoot(m_boundTransformFeedbackBuffer.get()); 3066 visitor.addOpaqueRoot(m_boundUniformBuffer.get()); 3067 3068 for (auto& buffer : m_boundIndexedUniformBuffers) 3069 visitor.addOpaqueRoot(buffer.get()); 3070 3071 for (auto& entry : m_activeQueries) 3072 visitor.addOpaqueRoot(entry.value.get()); 3073 3074 for (auto& entry : m_boundSamplers) 3075 visitor.addOpaqueRoot(entry.get()); 3011 3076 } 3012 3077 … … 3492 3557 binding = nullptr; 3493 3558 3494 void WebGL2RenderingContext::uncacheDeletedBuffer( WebGLBuffer* buffer)3559 void WebGL2RenderingContext::uncacheDeletedBuffer(const AbstractLocker& locker, WebGLBuffer* buffer) 3495 3560 { 3496 3561 ASSERT(buffer); … … 3502 3567 REMOVE_BUFFER_FROM_BINDING(m_boundTransformFeedbackBuffer); 3503 3568 REMOVE_BUFFER_FROM_BINDING(m_boundUniformBuffer); 3504 m_boundTransformFeedback->unbindBuffer( *buffer);3505 3506 WebGLRenderingContextBase::uncacheDeletedBuffer( buffer);3569 m_boundTransformFeedback->unbindBuffer(locker, *buffer); 3570 3571 WebGLRenderingContextBase::uncacheDeletedBuffer(locker, buffer); 3507 3572 } 3508 3573 -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h
r265523 r265708 262 262 bool checkAndTranslateAttachments(const char* functionName, GCGLenum, Vector<GCGLenum>&); 263 263 264 void addMembersToOpaqueRoots(JSC::SlotVisitor&) override; 265 264 266 private: 265 267 WebGL2RenderingContext(CanvasBase&, GraphicsContextGLAttributes); … … 285 287 WebGLBuffer* validateBufferDataParameters(const char* functionName, GCGLenum target, GCGLenum usage) final; 286 288 WebGLBuffer* validateBufferDataTarget(const char* functionName, GCGLenum target) final; 287 bool validateAndCacheBufferBinding(const char* functionName, GCGLenum target, WebGLBuffer*) final;289 bool validateAndCacheBufferBinding(const WTF::AbstractLocker&, const char* functionName, GCGLenum target, WebGLBuffer*) final; 288 290 GCGLint getMaxDrawBuffers() final; 289 291 GCGLint getMaxColorAttachments() final; … … 322 324 #endif 323 325 324 void uncacheDeletedBuffer( WebGLBuffer*) final;326 void uncacheDeletedBuffer(const WTF::AbstractLocker&, WebGLBuffer*) final; 325 327 326 328 enum class ClearBufferCaller : uint8_t { -
trunk/Source/WebCore/html/canvas/WebGLBuffer.cpp
r261413 r265708 32 32 #include "WebGLRenderingContextBase.h" 33 33 #include <JavaScriptCore/ArrayBuffer.h> 34 #include <wtf/Lock.h> 35 #include <wtf/Locker.h> 34 36 35 37 namespace WebCore { … … 49 51 WebGLBuffer::~WebGLBuffer() 50 52 { 51 deleteObject(0); 52 } 53 54 void WebGLBuffer::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 53 if (!hasGroupOrContext()) 54 return; 55 56 runDestructor(); 57 } 58 59 void WebGLBuffer::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 55 60 { 56 61 context3d->deleteBuffer(object); -
trunk/Source/WebCore/html/canvas/WebGLBuffer.h
r261413 r265708 68 68 WebGLBuffer(WebGLRenderingContextBase&); 69 69 70 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;70 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 71 71 72 72 GCGLenum m_target { 0 }; -
trunk/Source/WebCore/html/canvas/WebGLBuffer.idl
r265523 r265708 26 26 [ 27 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLBuffer { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLContextGroup.cpp
r254064 r265708 45 45 } 46 46 47 bool WebGLContextGroup::hasAContext() const 48 { 49 return !m_contexts.isEmpty(); 50 } 51 47 52 GraphicsContextGLOpenGL& WebGLContextGroup::getAGraphicsContextGL() 48 53 { 49 54 ASSERT(!m_contexts.isEmpty()); 50 55 return *(*m_contexts.begin())->graphicsContextGL(); 56 } 57 58 WTF::Lock& WebGLContextGroup::objectGraphLockForAContext() 59 { 60 ASSERT(!m_contexts.isEmpty()); 61 // Since the WEBGL_shared_objects extension never shipped, and is 62 // unlikely to, this is equivalent to WebGLContextObject's 63 // implementation. If there were the possibility of WebGL objects 64 // being shared between multiple contexts, this would have to be 65 // rethought. 66 return (*m_contexts.begin())->objectGraphLock(); 51 67 } 52 68 … … 77 93 void WebGLContextGroup::detachAndRemoveAllObjects() 78 94 { 95 if (m_contexts.isEmpty()) { 96 // No objectGraphLock is available to cover the calls to 97 // WebGLObject::deleteObject. 98 while (!m_groupObjects.isEmpty()) 99 (*m_groupObjects.begin())->detachContextGroupWithoutDeletingObject(); 100 return; 101 } 102 103 auto locker = holdLock(objectGraphLockForAContext()); 79 104 while (!m_groupObjects.isEmpty()) 80 (*m_groupObjects.begin())->detachContextGroup( );105 (*m_groupObjects.begin())->detachContextGroup(locker); 81 106 } 82 107 -
trunk/Source/WebCore/html/canvas/WebGLContextGroup.h
r254064 r265708 29 29 30 30 #include "WebGLRenderingContextBase.h" 31 #include <wtf/Lock.h> 31 32 32 33 namespace WebCore { … … 43 44 void removeObject(WebGLSharedObject&); 44 45 46 bool hasAContext() const; 45 47 GraphicsContextGLOpenGL& getAGraphicsContextGL(); 48 Lock& objectGraphLockForAContext(); 46 49 47 50 void loseContextGroup(WebGLRenderingContextBase::LostContextMode); -
trunk/Source/WebCore/html/canvas/WebGLContextObject.cpp
r254064 r265708 30 30 31 31 #include "WebGLRenderingContextBase.h" 32 #include <wtf/Lock.h> 32 33 33 34 namespace WebCore { … … 44 45 } 45 46 46 void WebGLContextObject::detachContext( )47 void WebGLContextObject::detachContext(const AbstractLocker& locker) 47 48 { 48 49 detach(); 49 50 if (m_context) { 50 deleteObject( m_context->graphicsContextGL());51 deleteObject(locker, m_context->graphicsContextGL()); 51 52 m_context->removeContextObject(*this); 52 53 m_context = nullptr; 53 54 } 55 } 56 57 WTF::Lock& WebGLContextObject::objectGraphLockForContext() 58 { 59 // Should not call this if the object or context has been deleted. 60 ASSERT(m_context); 61 return m_context->objectGraphLock(); 54 62 } 55 63 -
trunk/Source/WebCore/html/canvas/WebGLContextObject.h
r254064 r265708 48 48 } 49 49 50 void detachContext(); 50 void detachContext(const WTF::AbstractLocker&); 51 52 WTF::Lock& objectGraphLockForContext() override; 51 53 52 54 protected: -
trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp
r265523 r265708 33 33 #include "WebGLDrawBuffers.h" 34 34 #include "WebGLRenderingContextBase.h" 35 #include <JavaScriptCore/SlotVisitor.h> 36 #include <JavaScriptCore/SlotVisitorInlines.h> 37 #include <wtf/Lock.h> 38 #include <wtf/Locker.h> 35 39 36 40 namespace WebCore { … … 54 58 bool isInitialized() const override; 55 59 void setInitialized() override; 56 void onDetached( GraphicsContextGLOpenGL*) override;60 void onDetached(const AbstractLocker&, GraphicsContextGLOpenGL*) override; 57 61 void attach(GraphicsContextGLOpenGL*, GCGLenum target, GCGLenum attachment) override; 58 62 void unattach(GraphicsContextGLOpenGL*, GCGLenum target, GCGLenum attachment) override; 63 void addMembersToOpaqueRoots(const AbstractLocker&, JSC::SlotVisitor&) override; 59 64 60 65 WebGLRenderbufferAttachment() { }; … … 116 121 } 117 122 118 void WebGLRenderbufferAttachment::onDetached( GraphicsContextGLOpenGL* context)119 { 120 m_renderbuffer->onDetached( context);123 void WebGLRenderbufferAttachment::onDetached(const AbstractLocker& locker, GraphicsContextGLOpenGL* context) 124 { 125 m_renderbuffer->onDetached(locker, context); 121 126 } 122 127 … … 136 141 #endif 137 142 context->framebufferRenderbuffer(target, attachment, GraphicsContextGL::RENDERBUFFER, 0); 143 } 144 145 void WebGLRenderbufferAttachment::addMembersToOpaqueRoots(const AbstractLocker&, JSC::SlotVisitor& visitor) 146 { 147 visitor.addOpaqueRoot(m_renderbuffer.get()); 138 148 } 139 149 … … 154 164 bool isInitialized() const override; 155 165 void setInitialized() override; 156 void onDetached( GraphicsContextGLOpenGL*) override;166 void onDetached(const AbstractLocker&, GraphicsContextGLOpenGL*) override; 157 167 void attach(GraphicsContextGLOpenGL*, GCGLenum target, GCGLenum attachment) override; 158 168 void unattach(GraphicsContextGLOpenGL*, GCGLenum target, GCGLenum attachment) override; 169 void addMembersToOpaqueRoots(const AbstractLocker&, JSC::SlotVisitor&) override; 159 170 160 171 WebGLTextureAttachment() { }; … … 222 233 } 223 234 224 void WebGLTextureAttachment::onDetached( GraphicsContextGLOpenGL* context)225 { 226 m_texture->onDetached( context);235 void WebGLTextureAttachment::onDetached(const AbstractLocker& locker, GraphicsContextGLOpenGL* context) 236 { 237 m_texture->onDetached(locker, context); 227 238 } 228 239 … … 254 265 } 255 266 267 void WebGLTextureAttachment::addMembersToOpaqueRoots(const AbstractLocker&, JSC::SlotVisitor& visitor) 268 { 269 visitor.addOpaqueRoot(m_texture.get()); 270 } 271 256 272 #if !USE(ANGLE) 257 273 bool isAttachmentComplete(WebGLFramebuffer::WebGLAttachment* attachedObject, GCGLenum attachment, const char** reason) … … 300 316 WebGLFramebuffer::~WebGLFramebuffer() 301 317 { 302 deleteObject(0); 318 if (!context()) 319 return; 320 321 runDestructor(); 303 322 } 304 323 … … 372 391 } 373 392 374 void WebGLFramebuffer::removeAttachmentFromBoundFramebuffer(GCGLenum target, GCGLenum attachment) 375 { 393 void WebGLFramebuffer::removeAttachmentFromBoundFramebuffer(const AbstractLocker& locker, GCGLenum target, GCGLenum attachment) 394 { 395 if (!context()) { 396 // Context has been deleted - should not be calling this. 397 return; 398 } 399 376 400 #if ASSERT_ENABLED 377 401 ASSERT(isBound(target)); … … 384 408 RefPtr<WebGLAttachment> attachmentObject = getAttachment(attachment); 385 409 if (attachmentObject) { 386 attachmentObject->onDetached( context()->graphicsContextGL());410 attachmentObject->onDetached(locker, context()->graphicsContextGL()); 387 411 m_attachments.remove(attachment); 388 412 drawBuffersIfNecessary(false); … … 404 428 } 405 429 406 void WebGLFramebuffer::removeAttachmentFromBoundFramebuffer( GCGLenum target, WebGLSharedObject* attachment)430 void WebGLFramebuffer::removeAttachmentFromBoundFramebuffer(const AbstractLocker& locker, GCGLenum target, WebGLSharedObject* attachment) 407 431 { 408 432 ASSERT(isBound(target)); … … 420 444 GCGLenum attachmentType = entry.key; 421 445 attachmentObject->unattach(context()->graphicsContextGL(), target, attachmentType); 422 removeAttachmentFromBoundFramebuffer( target, attachmentType);446 removeAttachmentFromBoundFramebuffer(locker, target, attachmentType); 423 447 checkMore = true; 424 448 break; … … 540 564 } 541 565 542 void WebGLFramebuffer::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)566 void WebGLFramebuffer::deleteObjectImpl(const AbstractLocker& locker, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 543 567 { 544 568 for (auto& attachment : m_attachments.values()) 545 attachment->onDetached( context3d);569 attachment->onDetached(locker, context3d); 546 570 547 571 context3d->deleteFramebuffer(object); 548 572 } 549 573 574 #if !USE(ANGLE) 550 575 bool WebGLFramebuffer::initializeAttachments(GraphicsContextGLOpenGL* g3d, const char** reason) 551 576 { 577 if (!context()) { 578 // Context has been deleted - should not be calling this. 579 return false; 580 } 581 auto locker = holdLock(objectGraphLockForContext()); 582 552 583 ASSERT(object()); 553 584 GCGLbitfield mask = 0; … … 634 665 return true; 635 666 } 667 #endif 636 668 637 669 bool WebGLFramebuffer::isBound(GCGLenum target) const … … 690 722 } 691 723 724 void WebGLFramebuffer::addMembersToOpaqueRoots(const AbstractLocker& locker, JSC::SlotVisitor& visitor) 725 { 726 for (auto& entry : m_attachments) 727 entry.value->addMembersToOpaqueRoots(locker, visitor); 728 } 729 692 730 void WebGLFramebuffer::setAttachmentInternal(GCGLenum attachment, GCGLenum texTarget, WebGLTexture* texture, GCGLint level, GCGLint layer) 693 731 { 694 removeAttachmentInternal(attachment); 732 if (!context()) { 733 // Context has been deleted - should not be calling this. 734 return; 735 } 736 auto locker = holdLock(objectGraphLockForContext()); 737 738 removeAttachmentInternal(locker, attachment); 695 739 if (texture && texture->object()) { 696 740 m_attachments.set(attachment, WebGLTextureAttachment::create(texture, texTarget, level, layer)); … … 702 746 void WebGLFramebuffer::setAttachmentInternal(GCGLenum attachment, WebGLRenderbuffer* renderbuffer) 703 747 { 704 removeAttachmentInternal(attachment); 748 if (!context()) { 749 // Context has been deleted - should not be calling this. 750 return; 751 } 752 auto locker = holdLock(objectGraphLockForContext()); 753 754 removeAttachmentInternal(locker, attachment); 705 755 if (renderbuffer && renderbuffer->object()) { 706 756 m_attachments.set(attachment, WebGLRenderbufferAttachment::create(renderbuffer)); … … 710 760 } 711 761 712 void WebGLFramebuffer::removeAttachmentInternal( GCGLenum attachment)762 void WebGLFramebuffer::removeAttachmentInternal(const AbstractLocker& locker, GCGLenum attachment) 713 763 { 714 764 WebGLAttachment* attachmentObject = getAttachment(attachment); 715 765 if (attachmentObject) { 716 attachmentObject->onDetached( context()->graphicsContextGL());766 attachmentObject->onDetached(locker, context()->graphicsContextGL()); 717 767 m_attachments.remove(attachment); 718 768 drawBuffersIfNecessary(false); -
trunk/Source/WebCore/html/canvas/WebGLFramebuffer.h
r265523 r265708 34 34 #include <wtf/Vector.h> 35 35 36 namespace JSC { 37 class SlotVisitor; 38 } 39 40 namespace WTF { 41 class AbstractLocker; 42 } 43 36 44 namespace WebCore { 37 45 … … 55 63 virtual bool isInitialized() const = 0; 56 64 virtual void setInitialized() = 0; 57 virtual void onDetached( GraphicsContextGLOpenGL*) = 0;65 virtual void onDetached(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*) = 0; 58 66 virtual void attach(GraphicsContextGLOpenGL*, GCGLenum target, GCGLenum attachment) = 0; 59 67 virtual void unattach(GraphicsContextGLOpenGL*, GCGLenum target, GCGLenum attachment) = 0; 68 virtual void addMembersToOpaqueRoots(const WTF::AbstractLocker&, JSC::SlotVisitor&) = 0; 60 69 61 70 protected: … … 70 79 void setAttachmentForBoundFramebuffer(GCGLenum target, GCGLenum attachment, WebGLRenderbuffer*); 71 80 // If an object is attached to the currently bound framebuffer, remove it. 72 void removeAttachmentFromBoundFramebuffer( GCGLenum target, WebGLSharedObject*);81 void removeAttachmentFromBoundFramebuffer(const WTF::AbstractLocker&, GCGLenum target, WebGLSharedObject*); 73 82 // If a given attachment point for the currently bound framebuffer is not null, remove the attached object. 74 void removeAttachmentFromBoundFramebuffer( GCGLenum target, GCGLenum attachment);83 void removeAttachmentFromBoundFramebuffer(const WTF::AbstractLocker&, GCGLenum target, GCGLenum attachment); 75 84 WebGLSharedObject* getAttachmentObject(GCGLenum) const; 76 85 … … 106 115 GCGLenum getDrawBuffer(GCGLenum); 107 116 117 void addMembersToOpaqueRoots(const WTF::AbstractLocker&, JSC::SlotVisitor&); 118 108 119 private: 109 120 WebGLFramebuffer(WebGLRenderingContextBase&); 110 121 111 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;122 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 112 123 113 124 WebGLAttachment* getAttachment(GCGLenum) const; 114 125 126 #if !USE(ANGLE) 115 127 // Return false if framebuffer is incomplete. 116 128 bool initializeAttachments(GraphicsContextGLOpenGL*, const char** reason); 129 #endif 117 130 118 131 // Check if the framebuffer is currently bound to the given target. … … 129 142 // If a given attachment point for the currently bound framebuffer is not 130 143 // null, remove the attached object. 131 void removeAttachmentInternal( GCGLenum attachment);144 void removeAttachmentInternal(const WTF::AbstractLocker&, GCGLenum attachment); 132 145 133 146 typedef WTF::HashMap<GCGLenum, RefPtr<WebGLAttachment>> AttachmentMap; -
trunk/Source/WebCore/html/canvas/WebGLFramebuffer.idl
r265523 r265708 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLFramebuffer { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLObject.cpp
r256758 r265708 45 45 } 46 46 47 void WebGLObject::deleteObject(GraphicsContextGLOpenGL* context3d) 47 void WebGLObject::runDestructor() 48 { 49 auto& lock = objectGraphLockForContext(); 50 if (lock.isHeld()) { 51 // Destruction of WebGLObjects can happen in chains triggered from GC. 52 // The lock must be held only once, at the beginning of the chain. 53 auto locker = AbstractLocker(NoLockingNecessary); 54 deleteObject(locker, nullptr); 55 } else { 56 auto locker = holdLock(lock); 57 deleteObject(locker, nullptr); 58 } 59 } 60 61 void WebGLObject::deleteObject(const AbstractLocker& locker, GraphicsContextGLOpenGL* context3d) 48 62 { 49 63 m_deleted = true; … … 67 81 68 82 if (context3d) 69 deleteObjectImpl( context3d, m_object);83 deleteObjectImpl(locker, context3d, m_object); 70 84 } 71 85 … … 79 93 } 80 94 81 void WebGLObject::onDetached( GraphicsContextGLOpenGL* context3d)95 void WebGLObject::onDetached(const AbstractLocker& locker, GraphicsContextGLOpenGL* context3d) 82 96 { 83 97 if (m_attachmentCount) 84 98 --m_attachmentCount; 85 99 if (m_deleted) 86 deleteObject( context3d);100 deleteObject(locker, context3d); 87 101 } 88 102 -
trunk/Source/WebCore/html/canvas/WebGLObject.h
r256758 r265708 31 31 #include <wtf/RefCounted.h> 32 32 33 namespace WTF { 34 class AbstractLocker; 35 class Lock; 36 } 37 33 38 namespace WebCore { 34 39 … … 46 51 // shaders, deletion is delayed until they are no longer attached. 47 52 // FIXME: revisit this when resource sharing between contexts are implemented. 48 void deleteObject(GraphicsContextGLOpenGL*); 53 // The AbstractLocker argument enforces at compile time that the objectGraphLock 54 // is held. This isn't necessary for all object types, but enough of them that 55 // it's done for all of them. 56 void deleteObject(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*); 49 57 50 58 void onAttached() { ++m_attachmentCount; } 51 void onDetached( GraphicsContextGLOpenGL*);59 void onDetached(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*); 52 60 53 61 // This indicates whether the client side issue a delete call already, not … … 59 67 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextBase&) const = 0; 60 68 69 // Returns the object graph lock associated with the context most 70 // closely associated with this object. Since the 71 // WEBGL_shared_objects extension specification never shipped (and 72 // is unlikely to), this basically returns the same result for 73 // both context objects and shared objects. 74 virtual WTF::Lock& objectGraphLockForContext() = 0; 75 61 76 protected: 62 77 WebGLObject() = default; … … 65 80 void setObject(PlatformGLObject); 66 81 82 void runDestructor(); 83 67 84 // deleteObjectImpl should be only called once to delete the OpenGL resource. 68 virtual void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) = 0;85 virtual void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) = 0; 69 86 70 87 virtual bool hasGroupOrContext() const = 0; -
trunk/Source/WebCore/html/canvas/WebGLProgram.cpp
r265523 r265708 34 34 #include "WebGLRenderingContextBase.h" 35 35 #include "WebGLShader.h" 36 #include <JavaScriptCore/SlotVisitor.h> 37 #include <JavaScriptCore/SlotVisitorInlines.h> 36 38 #include <wtf/Lock.h> 39 #include <wtf/Locker.h> 37 40 #include <wtf/NeverDestroyed.h> 38 41 … … 73 76 { 74 77 InspectorInstrumentation::willDestroyWebGLProgram(*this); 75 76 deleteObject(0);77 78 78 79 { … … 81 82 instances(lock).remove(this); 82 83 } 84 85 if (!hasGroupOrContext()) 86 return; 87 88 runDestructor(); 83 89 } 84 90 … … 90 96 } 91 97 92 void WebGLProgram::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject obj)98 void WebGLProgram::deleteObjectImpl(const AbstractLocker& locker, GraphicsContextGLOpenGL* context3d, PlatformGLObject obj) 93 99 { 94 100 context3d->deleteProgram(obj); 95 101 if (m_vertexShader) { 96 m_vertexShader->onDetached( context3d);102 m_vertexShader->onDetached(locker, context3d); 97 103 m_vertexShader = nullptr; 98 104 } 99 105 if (m_fragmentShader) { 100 m_fragmentShader->onDetached( context3d);106 m_fragmentShader->onDetached(locker, context3d); 101 107 m_fragmentShader = nullptr; 102 108 } … … 157 163 } 158 164 159 bool WebGLProgram::attachShader( WebGLShader* shader)165 bool WebGLProgram::attachShader(const AbstractLocker&, WebGLShader* shader) 160 166 { 161 167 if (!shader || !shader->object()) … … 177 183 } 178 184 179 bool WebGLProgram::detachShader( WebGLShader* shader)185 bool WebGLProgram::detachShader(const AbstractLocker&, WebGLShader* shader) 180 186 { 181 187 if (!shader || !shader->object()) … … 195 201 return false; 196 202 } 203 } 204 205 void WebGLProgram::addMembersToOpaqueRoots(const AbstractLocker&, JSC::SlotVisitor& visitor) 206 { 207 visitor.addOpaqueRoot(m_vertexShader.get()); 208 visitor.addOpaqueRoot(m_fragmentShader.get()); 197 209 } 198 210 -
trunk/Source/WebCore/html/canvas/WebGLProgram.h
r265523 r265708 35 35 #include <wtf/Vector.h> 36 36 37 namespace JSC { 38 class SlotVisitor; 39 } 40 41 namespace WTF { 42 class AbstractLocker; 43 }; 44 37 45 namespace WebCore { 38 46 … … 68 76 69 77 WebGLShader* getAttachedShader(GCGLenum); 70 bool attachShader( WebGLShader*);71 bool detachShader( WebGLShader*);78 bool attachShader(const WTF::AbstractLocker&, WebGLShader*); 79 bool detachShader(const WTF::AbstractLocker&, WebGLShader*); 72 80 73 81 void setRequiredTransformFeedbackBufferCount(int count) … … 81 89 } 82 90 91 void addMembersToOpaqueRoots(const WTF::AbstractLocker&, JSC::SlotVisitor&); 92 83 93 private: 84 94 WebGLProgram(WebGLRenderingContextBase&); 85 95 86 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;96 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 87 97 88 98 void cacheActiveAttribLocations(GraphicsContextGLOpenGL*); -
trunk/Source/WebCore/html/canvas/WebGLProgram.idl
r265523 r265708 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLProgram { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLQuery.cpp
r264807 r265708 31 31 #include "WebGLContextGroup.h" 32 32 #include "WebGLRenderingContextBase.h" 33 #include <wtf/Lock.h> 34 #include <wtf/Locker.h> 33 35 34 36 namespace WebCore { … … 41 43 WebGLQuery::~WebGLQuery() 42 44 { 43 deleteObject(0); 45 if (!contextGroup()) 46 return; 47 48 runDestructor(); 44 49 } 45 50 … … 50 55 } 51 56 52 void WebGLQuery::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)57 void WebGLQuery::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 53 58 { 54 59 context3d->deleteQuery(object); -
trunk/Source/WebCore/html/canvas/WebGLQuery.h
r264807 r265708 30 30 #include "WebGLSharedObject.h" 31 31 32 namespace WTF { 33 class AbstractLocker; 34 } 35 32 36 namespace WebCore { 33 37 … … 46 50 private: 47 51 explicit WebGLQuery(WebGLRenderingContextBase&); 48 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;52 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 49 53 50 54 bool m_isResultAvailable { false }; -
trunk/Source/WebCore/html/canvas/WebGLQuery.idl
r265523 r265708 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLQuery { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLRenderbuffer.cpp
r254214 r265708 32 32 #include "WebGLContextGroup.h" 33 33 #include "WebGLRenderingContextBase.h" 34 #include <wtf/Lock.h> 35 #include <wtf/Locker.h> 34 36 35 37 namespace WebCore { … … 42 44 WebGLRenderbuffer::~WebGLRenderbuffer() 43 45 { 44 deleteObject(0); 46 if (!hasGroupOrContext()) 47 return; 48 49 runDestructor(); 45 50 } 46 51 … … 57 62 } 58 63 59 void WebGLRenderbuffer::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)64 void WebGLRenderbuffer::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 60 65 { 61 66 context3d->deleteRenderbuffer(object); -
trunk/Source/WebCore/html/canvas/WebGLRenderbuffer.h
r260415 r265708 66 66 WebGLRenderbuffer(WebGLRenderingContextBase&); 67 67 68 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;68 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 69 69 70 70 bool isRenderbuffer() const override { return true; } -
trunk/Source/WebCore/html/canvas/WebGLRenderbuffer.idl
r265523 r265708 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLRenderbuffer { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r265540 r265708 103 103 #include <JavaScriptCore/ScriptCallStack.h> 104 104 #include <JavaScriptCore/ScriptCallStackFactory.h> 105 #include <JavaScriptCore/SlotVisitor.h> 106 #include <JavaScriptCore/SlotVisitorInlines.h> 105 107 #include <JavaScriptCore/TypedArrayInlines.h> 106 108 #include <JavaScriptCore/Uint32Array.h> … … 110 112 #include <wtf/IsoMallocInlines.h> 111 113 #include <wtf/Lock.h> 114 #include <wtf/Locker.h> 112 115 #include <wtf/Scope.h> 113 116 #include <wtf/StdLibExtras.h> … … 1320 1323 void WebGLRenderingContextBase::attachShader(WebGLProgram* program, WebGLShader* shader) 1321 1324 { 1325 auto locker = holdLock(objectGraphLock()); 1326 1322 1327 if (isContextLostOrPending() || !validateWebGLProgramOrShader("attachShader", program) || !validateWebGLProgramOrShader("attachShader", shader)) 1323 1328 return; 1324 if (!program->attachShader( shader)) {1329 if (!program->attachShader(locker, shader)) { 1325 1330 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "attachShader", "shader attachment already has shader"); 1326 1331 return; … … 1399 1404 } 1400 1405 1401 bool WebGLRenderingContextBase::validateAndCacheBufferBinding(const char* functionName, GCGLenum target, WebGLBuffer* buffer)1406 bool WebGLRenderingContextBase::validateAndCacheBufferBinding(const AbstractLocker& locker, const char* functionName, GCGLenum target, WebGLBuffer* buffer) 1402 1407 { 1403 1408 if (!validateBufferTarget(functionName, target)) … … 1413 1418 else { 1414 1419 ASSERT(target == GraphicsContextGL::ELEMENT_ARRAY_BUFFER); 1415 m_boundVertexArrayObject->setElementArrayBuffer( buffer);1420 m_boundVertexArrayObject->setElementArrayBuffer(locker, buffer); 1416 1421 } 1417 1422 … … 1423 1428 void WebGLRenderingContextBase::bindBuffer(GCGLenum target, WebGLBuffer* buffer) 1424 1429 { 1430 auto locker = holdLock(objectGraphLock()); 1431 1425 1432 if (!checkObjectToBeBound("bindBuffer", buffer)) 1426 1433 return; 1427 1434 1428 if (!validateAndCacheBufferBinding( "bindBuffer", target, buffer))1435 if (!validateAndCacheBufferBinding(locker, "bindBuffer", target, buffer)) 1429 1436 return; 1430 1437 … … 1434 1441 void WebGLRenderingContextBase::bindFramebuffer(GCGLenum target, WebGLFramebuffer* buffer) 1435 1442 { 1443 auto locker = holdLock(objectGraphLock()); 1444 1436 1445 if (!checkObjectToBeBound("bindFramebuffer", buffer)) 1437 1446 return; … … 1442 1451 } 1443 1452 1444 setFramebuffer( target, buffer);1453 setFramebuffer(locker, target, buffer); 1445 1454 } 1446 1455 1447 1456 void WebGLRenderingContextBase::bindRenderbuffer(GCGLenum target, WebGLRenderbuffer* renderBuffer) 1448 1457 { 1458 auto locker = holdLock(objectGraphLock()); 1459 1449 1460 if (!checkObjectToBeBound("bindRenderbuffer", renderBuffer)) 1450 1461 return; … … 1461 1472 void WebGLRenderingContextBase::bindTexture(GCGLenum target, WebGLTexture* texture) 1462 1473 { 1474 auto locker = holdLock(objectGraphLock()); 1475 1463 1476 if (!checkObjectToBeBound("bindTexture", texture)) 1464 1477 return; … … 1980 1993 } 1981 1994 1982 bool WebGLRenderingContextBase::deleteObject( WebGLObject* object)1995 bool WebGLRenderingContextBase::deleteObject(const AbstractLocker& locker, WebGLObject* object) 1983 1996 { 1984 1997 if (isContextLostOrPending() || !object) … … 1993 2006 // We need to pass in context here because we want 1994 2007 // things in this context unbound. 1995 object->deleteObject( graphicsContextGL());2008 object->deleteObject(locker, graphicsContextGL()); 1996 2009 return true; 1997 2010 } … … 2001 2014 binding = nullptr; 2002 2015 2003 void WebGLRenderingContextBase::uncacheDeletedBuffer( WebGLBuffer* buffer)2016 void WebGLRenderingContextBase::uncacheDeletedBuffer(const AbstractLocker& locker, WebGLBuffer* buffer) 2004 2017 { 2005 2018 REMOVE_BUFFER_FROM_BINDING(m_boundArrayBuffer); 2006 2019 2007 m_boundVertexArrayObject->unbindBuffer(*buffer); 2020 m_boundVertexArrayObject->unbindBuffer(locker, *buffer); 2021 } 2022 2023 void WebGLRenderingContextBase::setBoundVertexArrayObject(const AbstractLocker&, WebGLVertexArrayObjectBase* arrayObject) 2024 { 2025 m_boundVertexArrayObject = arrayObject ? arrayObject : m_defaultVertexArrayObject; 2008 2026 } 2009 2027 … … 2012 2030 void WebGLRenderingContextBase::deleteBuffer(WebGLBuffer* buffer) 2013 2031 { 2014 if (!deleteObject(buffer)) 2015 return; 2016 2017 uncacheDeletedBuffer(buffer); 2032 auto locker = holdLock(objectGraphLock()); 2033 2034 if (!deleteObject(locker, buffer)) 2035 return; 2036 2037 uncacheDeletedBuffer(locker, buffer); 2018 2038 } 2019 2039 2020 2040 void WebGLRenderingContextBase::deleteFramebuffer(WebGLFramebuffer* framebuffer) 2021 2041 { 2022 if (!deleteObject(framebuffer)) 2042 auto locker = holdLock(objectGraphLock()); 2043 2044 if (!deleteObject(locker, framebuffer)) 2023 2045 return; 2024 2046 … … 2034 2056 InspectorInstrumentation::willDestroyWebGLProgram(*program); 2035 2057 2036 deleteObject(program); 2058 auto locker = holdLock(objectGraphLock()); 2059 2060 deleteObject(locker, program); 2037 2061 // We don't reset m_currentProgram to 0 here because the deletion of the 2038 2062 // current program is delayed. … … 2041 2065 void WebGLRenderingContextBase::deleteRenderbuffer(WebGLRenderbuffer* renderbuffer) 2042 2066 { 2043 if (!deleteObject(renderbuffer)) 2067 auto locker = holdLock(objectGraphLock()); 2068 2069 if (!deleteObject(locker, renderbuffer)) 2044 2070 return; 2045 2071 if (renderbuffer == m_renderbufferBinding) 2046 2072 m_renderbufferBinding = nullptr; 2047 2073 if (m_framebufferBinding) 2048 m_framebufferBinding->removeAttachmentFromBoundFramebuffer( GraphicsContextGL::FRAMEBUFFER, renderbuffer);2074 m_framebufferBinding->removeAttachmentFromBoundFramebuffer(locker, GraphicsContextGL::FRAMEBUFFER, renderbuffer); 2049 2075 auto readFramebufferBinding = getFramebufferBinding(GraphicsContextGL::READ_FRAMEBUFFER); 2050 2076 if (readFramebufferBinding) 2051 readFramebufferBinding->removeAttachmentFromBoundFramebuffer( GraphicsContextGL::READ_FRAMEBUFFER, renderbuffer);2077 readFramebufferBinding->removeAttachmentFromBoundFramebuffer(locker, GraphicsContextGL::READ_FRAMEBUFFER, renderbuffer); 2052 2078 } 2053 2079 2054 2080 void WebGLRenderingContextBase::deleteShader(WebGLShader* shader) 2055 2081 { 2056 deleteObject(shader); 2082 auto locker = holdLock(objectGraphLock()); 2083 deleteObject(locker, shader); 2057 2084 } 2058 2085 2059 2086 void WebGLRenderingContextBase::deleteTexture(WebGLTexture* texture) 2060 2087 { 2061 if (!deleteObject(texture)) 2088 auto locker = holdLock(objectGraphLock()); 2089 2090 if (!deleteObject(locker, texture)) 2062 2091 return; 2063 2092 … … 2085 2114 } 2086 2115 if (m_framebufferBinding) 2087 m_framebufferBinding->removeAttachmentFromBoundFramebuffer( GraphicsContextGL::FRAMEBUFFER, texture);2116 m_framebufferBinding->removeAttachmentFromBoundFramebuffer(locker, GraphicsContextGL::FRAMEBUFFER, texture); 2088 2117 auto readFramebufferBinding = getFramebufferBinding(GraphicsContextGL::READ_FRAMEBUFFER); 2089 2118 if (readFramebufferBinding) 2090 readFramebufferBinding->removeAttachmentFromBoundFramebuffer( GraphicsContextGL::READ_FRAMEBUFFER, texture);2119 readFramebufferBinding->removeAttachmentFromBoundFramebuffer(locker, GraphicsContextGL::READ_FRAMEBUFFER, texture); 2091 2120 } 2092 2121 … … 2119 2148 void WebGLRenderingContextBase::detachShader(WebGLProgram* program, WebGLShader* shader) 2120 2149 { 2150 auto locker = holdLock(objectGraphLock()); 2151 2121 2152 if (isContextLostOrPending() || !validateWebGLProgramOrShader("detachShader", program) || !validateWebGLProgramOrShader("detachShader", shader)) 2122 2153 return; 2123 if (!program->detachShader( shader)) {2154 if (!program->detachShader(locker, shader)) { 2124 2155 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "detachShader", "shader not attached"); 2125 2156 return; 2126 2157 } 2127 2158 m_context->detachShader(objectOrZero(program), objectOrZero(shader)); 2128 shader->onDetached( graphicsContextGL());2159 shader->onDetached(locker, graphicsContextGL()); 2129 2160 } 2130 2161 … … 5896 5927 void WebGLRenderingContextBase::useProgram(WebGLProgram* program) 5897 5928 { 5929 auto locker = holdLock(objectGraphLock()); 5930 5898 5931 if (!checkObjectToBeBound("useProgram", program)) 5899 5932 return; … … 5904 5937 if (m_currentProgram != program) { 5905 5938 if (m_currentProgram) 5906 m_currentProgram->onDetached( graphicsContextGL());5939 m_currentProgram->onDetached(locker, graphicsContextGL()); 5907 5940 m_currentProgram = program; 5908 5941 m_context->useProgram(objectOrZero(program)); … … 5961 5994 void WebGLRenderingContextBase::vertexAttribPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, long long offset) 5962 5995 { 5996 auto locker = holdLock(objectGraphLock()); 5997 5963 5998 if (isContextLostOrPending()) 5964 5999 return; … … 6024 6059 GCGLsizei bytesPerElement = size * typeSize; 6025 6060 6026 m_boundVertexArrayObject->setVertexAttribState( index, bytesPerElement, size, type, normalized, stride, static_cast<GCGLintptr>(offset), m_boundArrayBuffer.get());6061 m_boundVertexArrayObject->setVertexAttribState(locker, index, bytesPerElement, size, type, normalized, stride, static_cast<GCGLintptr>(offset), m_boundArrayBuffer.get()); 6027 6062 m_context->vertexAttribPointer(index, size, type, normalized, stride, static_cast<GCGLintptr>(offset)); 6028 6063 } … … 6153 6188 return; 6154 6189 6190 auto locker = holdLock(objectGraphLock()); 6191 6155 6192 while (m_contextObjects.size() > 0) { 6156 6193 HashSet<WebGLContextObject*>::iterator it = m_contextObjects.begin(); 6157 (*it)->detachContext( );6194 (*it)->detachContext(locker); 6158 6195 } 6159 6196 } … … 7559 7596 } 7560 7597 7561 void WebGLRenderingContextBase::setFramebuffer( GCGLenum target, WebGLFramebuffer* buffer)7598 void WebGLRenderingContextBase::setFramebuffer(const AbstractLocker&, GCGLenum target, WebGLFramebuffer* buffer) 7562 7599 { 7563 7600 if (buffer) … … 7765 7802 } 7766 7803 7804 void WebGLRenderingContextBase::addMembersToOpaqueRoots(JSC::SlotVisitor& visitor) 7805 { 7806 auto locker = holdLock(objectGraphLock()); 7807 7808 visitor.addOpaqueRoot(m_boundArrayBuffer.get()); 7809 7810 visitor.addOpaqueRoot(m_boundVertexArrayObject.get()); 7811 if (m_boundVertexArrayObject) 7812 m_boundVertexArrayObject->addMembersToOpaqueRoots(locker, visitor); 7813 7814 visitor.addOpaqueRoot(m_currentProgram.get()); 7815 if (m_currentProgram) 7816 m_currentProgram->addMembersToOpaqueRoots(locker, visitor); 7817 7818 visitor.addOpaqueRoot(m_framebufferBinding.get()); 7819 if (m_framebufferBinding) 7820 m_framebufferBinding->addMembersToOpaqueRoots(locker, visitor); 7821 7822 visitor.addOpaqueRoot(m_renderbufferBinding.get()); 7823 7824 for (auto& unit : m_textureUnits) { 7825 visitor.addOpaqueRoot(unit.texture2DBinding.get()); 7826 visitor.addOpaqueRoot(unit.textureCubeMapBinding.get()); 7827 visitor.addOpaqueRoot(unit.texture3DBinding.get()); 7828 visitor.addOpaqueRoot(unit.texture2DArrayBinding.get()); 7829 } 7830 7831 // Extensions' IDL files use GenerateIsReachable=ImplWebGLRenderingContext, 7832 // which checks to see whether the context is in the opaque root set (it is; 7833 // it's added in JSWebGLRenderingContext / JSWebGL2RenderingContext's custom 7834 // bindings code). For this reason it's unnecessary to explicitly add opaque 7835 // roots for extensions. 7836 } 7837 7838 Lock& WebGLRenderingContextBase::objectGraphLock() 7839 { 7840 return m_objectGraphLock; 7841 } 7842 7767 7843 void WebGLRenderingContextBase::prepareForDisplay() 7768 7844 { -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r265523 r265708 48 48 #include <memory> 49 49 #include <wtf/CheckedArithmetic.h> 50 #include <wtf/Lock.h> 50 51 51 52 #if ENABLE(WEBGL2) … … 56 57 #include "JSDOMPromiseDeferred.h" 57 58 #endif 59 60 namespace JSC { 61 class SlotVisitor; 62 } 63 64 namespace WTF { 65 class AbstractLocker; 66 } 58 67 59 68 namespace WebCore { … … 399 408 void dispatchContextChangedNotification() override; 400 409 410 virtual void addMembersToOpaqueRoots(JSC::SlotVisitor&); 411 // This lock must be held across all mutations of containers like 412 // Vectors, HashSets, etc. which contain RefPtr<WebGLObject>, and 413 // which are traversed by addMembersToOpaqueRoots() or any of the 414 // similarly-named methods in WebGLObject subclasses. 415 // 416 // FIXME: consider changing this mechanism to instead record when 417 // individual WebGLObjects are latched / unlatched in the 418 // context's state, either directly, or indirectly through 419 // container objects. If that were done, then the 420 // "GenerateIsReachable=Impl" in various WebGL objects' IDL files 421 // would need to be changed to instead query whether the object is 422 // currently latched into the context - without traversing all of 423 // the latched objects to find the current one, which would be 424 // prohibitively expensive. 425 Lock& objectGraphLock(); 426 401 427 protected: 402 428 WebGLRenderingContextBase(CanvasBase&, WebGLContextAttributes); … … 492 518 bool enableSupportedExtension(ASCIILiteral extensionNameLiteral); 493 519 494 virtual void uncacheDeletedBuffer( WebGLBuffer*);520 virtual void uncacheDeletedBuffer(const WTF::AbstractLocker&, WebGLBuffer*); 495 521 496 522 RefPtr<GraphicsContextGLOpenGL> m_context; 497 523 RefPtr<WebGLContextGroup> m_contextGroup; 524 Lock m_objectGraphLock; 498 525 499 526 bool m_restoreAllowed { false }; … … 510 537 RefPtr<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; 511 538 512 void setBoundVertexArrayObject(WebGLVertexArrayObjectBase* arrayObject) 513 { 514 m_boundVertexArrayObject = arrayObject ? arrayObject : m_defaultVertexArrayObject; 515 } 539 void setBoundVertexArrayObject(const WTF::AbstractLocker&, WebGLVertexArrayObjectBase*); 516 540 517 541 class VertexAttribValue { … … 993 1017 // Helper function for delete* (deleteBuffer, deleteProgram, etc) functions. 994 1018 // Return false if caller should return without further processing. 995 bool deleteObject( WebGLObject*);1019 bool deleteObject(const WTF::AbstractLocker&, WebGLObject*); 996 1020 997 1021 // Helper function for bind* (bindBuffer, bindTexture, etc) and useProgram. … … 1007 1031 virtual WebGLBuffer* validateBufferDataTarget(const char* functionName, GCGLenum target); 1008 1032 1009 virtual bool validateAndCacheBufferBinding(const char* functionName, GCGLenum target, WebGLBuffer*);1033 virtual bool validateAndCacheBufferBinding(const WTF::AbstractLocker&, const char* functionName, GCGLenum target, WebGLBuffer*); 1010 1034 1011 1035 #if !USE(ANGLE) … … 1036 1060 1037 1061 void setBackDrawBuffer(GCGLenum); 1038 void setFramebuffer( GCGLenum, WebGLFramebuffer*);1062 void setFramebuffer(const WTF::AbstractLocker&, GCGLenum, WebGLFramebuffer*); 1039 1063 1040 1064 virtual void restoreCurrentFramebuffer(); -
trunk/Source/WebCore/html/canvas/WebGLSampler.cpp
r254869 r265708 31 31 #include "WebGLContextGroup.h" 32 32 #include "WebGLRenderingContextBase.h" 33 #include <wtf/Lock.h> 34 #include <wtf/Locker.h> 33 35 34 36 namespace WebCore { … … 41 43 WebGLSampler::~WebGLSampler() 42 44 { 43 deleteObject(0); 45 if (!hasGroupOrContext()) 46 return; 47 48 runDestructor(); 44 49 } 45 50 … … 50 55 } 51 56 52 void WebGLSampler::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)57 void WebGLSampler::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 53 58 { 54 59 context3d->deleteSampler(object); -
trunk/Source/WebCore/html/canvas/WebGLSampler.h
r260415 r265708 30 30 #include "WebGLSharedObject.h" 31 31 32 namespace WTF { 33 class AbstractLocker; 34 } 35 32 36 namespace WebCore { 33 37 … … 39 43 private: 40 44 explicit WebGLSampler(WebGLRenderingContextBase&); 41 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) final;45 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) final; 42 46 }; 43 47 -
trunk/Source/WebCore/html/canvas/WebGLSampler.idl
r265523 r265708 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLSampler { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLShader.cpp
r254214 r265708 32 32 #include "WebGLContextGroup.h" 33 33 #include "WebGLRenderingContextBase.h" 34 #include <wtf/Lock.h> 35 #include <wtf/Locker.h> 34 36 35 37 namespace WebCore { … … 51 53 WebGLShader::~WebGLShader() 52 54 { 53 deleteObject(0); 55 if (!hasGroupOrContext()) 56 return; 57 58 runDestructor(); 54 59 } 55 60 56 void WebGLShader::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)61 void WebGLShader::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 57 62 { 58 63 context3d->deleteShader(object); -
trunk/Source/WebCore/html/canvas/WebGLShader.h
r254214 r265708 49 49 WebGLShader(WebGLRenderingContextBase&, GCGLenum); 50 50 51 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) final;51 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) final; 52 52 53 53 GCGLenum m_type; -
trunk/Source/WebCore/html/canvas/WebGLShader.idl
r265523 r265708 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLShader { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLSharedObject.cpp
r254064 r265708 31 31 #include "WebGLContextGroup.h" 32 32 #include "WebGLRenderingContextBase.h" 33 #include <wtf/Lock.h> 33 34 34 35 namespace WebCore { … … 45 46 } 46 47 47 void WebGLSharedObject::detachContextGroup( )48 void WebGLSharedObject::detachContextGroup(const AbstractLocker& locker) 48 49 { 49 50 detach(); 50 51 if (m_contextGroup) { 51 deleteObject( nullptr);52 deleteObject(locker, nullptr); 52 53 m_contextGroup->removeObject(*this); 53 54 m_contextGroup = nullptr; 54 55 } 56 } 57 58 void WebGLSharedObject::detachContextGroupWithoutDeletingObject() 59 { 60 // This can be called during context teardown if the sole context 61 // in the share group has already been removed. In this case, the 62 // underlying WebGL object has already been implicitly deleted, so 63 // it's not necessary to call deleteObject on it - which couldn't 64 // be protected by the objectGraphLock. 65 detach(); 66 if (m_contextGroup) { 67 m_contextGroup->removeObject(*this); 68 m_contextGroup = nullptr; 69 } 70 } 71 72 bool WebGLSharedObject::hasGroupOrContext() const 73 { 74 // Returning true from this implies that there's at least one (or, 75 // since context sharing isn't currently implemented, exactly one) 76 // viable context from which to grab the objectGraphLock. 77 return m_contextGroup && m_contextGroup->hasAContext(); 55 78 } 56 79 … … 60 83 } 61 84 85 WTF::Lock& WebGLSharedObject::objectGraphLockForContext() 86 { 87 // Should not call this if the object or context has been deleted. 88 ASSERT(m_contextGroup); 89 return m_contextGroup->objectGraphLockForAContext(); 90 } 91 62 92 } 63 93 -
trunk/Source/WebCore/html/canvas/WebGLSharedObject.h
r254064 r265708 30 30 #include "WebGLObject.h" 31 31 32 namespace WTF { 33 class AbstractLocker; 34 class Lock; 35 } 36 32 37 namespace WebCore { 33 38 … … 51 56 } 52 57 53 void detachContextGroup(); 58 void detachContextGroup(const WTF::AbstractLocker&); 59 60 void detachContextGroupWithoutDeletingObject(); 61 62 WTF::Lock& objectGraphLockForContext() override; 54 63 55 64 protected: 56 65 WebGLSharedObject(WebGLRenderingContextBase&); 57 66 58 bool hasGroupOrContext() const override 59 { 60 return m_contextGroup; 61 } 67 bool hasGroupOrContext() const override; 62 68 63 69 GraphicsContextGLOpenGL* getAGraphicsContextGL() const override; -
trunk/Source/WebCore/html/canvas/WebGLSync.cpp
r264587 r265708 32 32 #include "WebGLContextGroup.h" 33 33 #include "WebGLRenderingContextBase.h" 34 #include <wtf/Lock.h> 35 #include <wtf/Locker.h> 34 36 35 37 namespace WebCore { … … 42 44 WebGLSync::~WebGLSync() 43 45 { 44 deleteObject(0); 46 if (!hasGroupOrContext()) 47 return; 48 49 runDestructor(); 45 50 } 46 51 … … 54 59 } 55 60 56 void WebGLSync::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)61 void WebGLSync::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 57 62 { 58 63 UNUSED_PARAM(object); -
trunk/Source/WebCore/html/canvas/WebGLSync.h
r264587 r265708 51 51 GCGLsync m_sync; 52 52 53 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;53 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 54 54 }; 55 55 -
trunk/Source/WebCore/html/canvas/WebGLTexture.cpp
r259139 r265708 63 63 WebGLTexture::~WebGLTexture() 64 64 { 65 deleteObject(0); 65 if (!hasGroupOrContext()) 66 return; 67 68 runDestructor(); 66 69 } 67 70 … … 93 96 } 94 97 95 void WebGLTexture::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)98 void WebGLTexture::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 96 99 { 97 100 context3d->deleteTexture(object); -
trunk/Source/WebCore/html/canvas/WebGLTexture.h
r259139 r265708 91 91 WebGLTexture(WebGLRenderingContextBase&); 92 92 93 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;93 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 94 94 95 95 bool isTexture() const override { return true; } -
trunk/Source/WebCore/html/canvas/WebGLTexture.idl
r265523 r265708 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL, 28 GenerateIsReachable=Impl 28 29 ] interface WebGLTexture { 29 30 }; -
trunk/Source/WebCore/html/canvas/WebGLTransformFeedback.cpp
r265523 r265708 31 31 #include "WebGLContextGroup.h" 32 32 #include "WebGLRenderingContextBase.h" 33 #include <JavaScriptCore/SlotVisitor.h> 34 #include <JavaScriptCore/SlotVisitorInlines.h> 35 #include <wtf/Lock.h> 36 #include <wtf/Locker.h> 33 37 34 38 namespace WebCore { … … 41 45 WebGLTransformFeedback::~WebGLTransformFeedback() 42 46 { 43 deleteObject(0); 47 if (!hasGroupOrContext()) 48 return; 49 50 runDestructor(); 44 51 } 45 52 … … 51 58 } 52 59 53 void WebGLTransformFeedback::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)60 void WebGLTransformFeedback::deleteObjectImpl(const AbstractLocker&, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 54 61 { 55 62 context3d->deleteTransformFeedback(object); 56 63 } 57 64 58 void WebGLTransformFeedback::setProgram( WebGLProgram& program)65 void WebGLTransformFeedback::setProgram(const AbstractLocker&, WebGLProgram& program) 59 66 { 60 67 m_program = &program; … … 62 69 } 63 70 64 void WebGLTransformFeedback::setBoundIndexedTransformFeedbackBuffer( GCGLuint index, WebGLBuffer* buffer)71 void WebGLTransformFeedback::setBoundIndexedTransformFeedbackBuffer(const AbstractLocker&, GCGLuint index, WebGLBuffer* buffer) 65 72 { 66 73 ASSERT(index < m_boundIndexedTransformFeedbackBuffers.size()); … … 87 94 } 88 95 89 void WebGLTransformFeedback::unbindBuffer(WebGLBuffer& buffer) 96 void WebGLTransformFeedback::addMembersToOpaqueRoots(const AbstractLocker& locker, JSC::SlotVisitor& visitor) 97 { 98 for (auto& buffer : m_boundIndexedTransformFeedbackBuffers) 99 visitor.addOpaqueRoot(buffer.get()); 100 101 visitor.addOpaqueRoot(m_program.get()); 102 if (m_program) 103 m_program->addMembersToOpaqueRoots(locker, visitor); 104 } 105 106 void WebGLTransformFeedback::unbindBuffer(const AbstractLocker&, WebGLBuffer& buffer) 90 107 { 91 108 for (auto& boundBuffer : m_boundIndexedTransformFeedbackBuffers) { -
trunk/Source/WebCore/html/canvas/WebGLTransformFeedback.h
r265523 r265708 31 31 #include "WebGLSharedObject.h" 32 32 33 namespace JSC { 34 class SlotVisitor; 35 } 36 37 namespace WTF { 38 class AbstractLocker; 39 } 40 33 41 namespace WebCore { 34 42 … … 48 56 // Returns false if index is out of range and the caller should 49 57 // synthesize a GL error. 50 void setBoundIndexedTransformFeedbackBuffer( GCGLuint index, WebGLBuffer*);58 void setBoundIndexedTransformFeedbackBuffer(const WTF::AbstractLocker&, GCGLuint index, WebGLBuffer*); 51 59 bool getBoundIndexedTransformFeedbackBuffer(GCGLuint index, WebGLBuffer** outBuffer); 52 60 … … 57 65 58 66 WebGLProgram* program() const { return m_program.get(); } 59 void setProgram( WebGLProgram&);67 void setProgram(const WTF::AbstractLocker&, WebGLProgram&); 60 68 61 void unbindBuffer( WebGLBuffer&);69 void unbindBuffer(const AbstractLocker&, WebGLBuffer&); 62 70 63 71 bool hasEnoughBuffers(GCGLuint numRequired) const; 72 73 void addMembersToOpaqueRoots(const AbstractLocker&, JSC::SlotVisitor&); 74 64 75 private: 65 76 WebGLTransformFeedback(WebGL2RenderingContext&); 66 77 67 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override;78 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override; 68 79 69 80 bool m_active { false }; -
trunk/Source/WebCore/html/canvas/WebGLTransformFeedback.idl
r265523 r265708 26 26 [ 27 27 Conditional=WEBGL2, 28 EnabledAtRuntime=WebGL2 28 EnabledAtRuntime=WebGL2, 29 GenerateIsReachable=Impl 29 30 ] interface WebGLTransformFeedback { 30 31 }; -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp
r265205 r265708 31 31 #include "WebGL2RenderingContext.h" 32 32 #include "WebGLContextGroup.h" 33 #include <wtf/Lock.h> 34 #include <wtf/Locker.h> 33 35 34 36 namespace WebCore { … … 41 43 WebGLVertexArrayObject::~WebGLVertexArrayObject() 42 44 { 43 deleteObject(nullptr); 45 if (!context()) 46 return; 47 48 runDestructor(); 44 49 } 45 50 … … 54 59 } 55 60 56 void WebGLVertexArrayObject::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)61 void WebGLVertexArrayObject::deleteObjectImpl(const AbstractLocker& locker, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 57 62 { 58 63 switch (m_type) { … … 65 70 66 71 if (m_boundElementArrayBuffer) 67 m_boundElementArrayBuffer->onDetached( context3d);72 m_boundElementArrayBuffer->onDetached(locker, context3d); 68 73 69 74 for (auto& state : m_vertexAttribState) { 70 75 if (state.bufferBinding) 71 state.bufferBinding->onDetached( context3d);76 state.bufferBinding->onDetached(locker, context3d); 72 77 } 73 78 } -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObject.h
r254214 r265708 30 30 #include "WebGLVertexArrayObjectBase.h" 31 31 32 namespace WTF { 33 class AbstractLocker; 34 } 35 32 36 namespace WebCore { 33 37 … … 40 44 private: 41 45 WebGLVertexArrayObject(WebGLRenderingContextBase&, Type); 42 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) final;46 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) final; 43 47 }; 44 48 -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObject.idl
r265523 r265708 26 26 [ 27 27 Conditional=WEBGL2, 28 EnabledAtRuntime=WebGL2 28 EnabledAtRuntime=WebGL2, 29 GenerateIsReachable=Impl 29 30 ] interface WebGLVertexArrayObject { 30 31 }; -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp
r265523 r265708 30 30 31 31 #include "WebGLRenderingContextBase.h" 32 #include <JavaScriptCore/SlotVisitor.h> 33 #include <JavaScriptCore/SlotVisitorInlines.h> 34 #include <wtf/Locker.h> 32 35 33 36 namespace WebCore { … … 40 43 } 41 44 42 void WebGLVertexArrayObjectBase::setElementArrayBuffer( WebGLBuffer* buffer)45 void WebGLVertexArrayObjectBase::setElementArrayBuffer(const AbstractLocker& locker, WebGLBuffer* buffer) 43 46 { 44 47 if (buffer) 45 48 buffer->onAttached(); 46 49 if (m_boundElementArrayBuffer) 47 m_boundElementArrayBuffer->onDetached( context()->graphicsContextGL());50 m_boundElementArrayBuffer->onDetached(locker, context()->graphicsContextGL()); 48 51 m_boundElementArrayBuffer = buffer; 49 52 50 53 } 51 54 52 void WebGLVertexArrayObjectBase::setVertexAttribState( GCGLuint index, GCGLsizei bytesPerElement, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset, WebGLBuffer* buffer)55 void WebGLVertexArrayObjectBase::setVertexAttribState(const AbstractLocker& locker, GCGLuint index, GCGLsizei bytesPerElement, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset, WebGLBuffer* buffer) 53 56 { 54 57 GCGLsizei validatedStride = stride ? stride : bytesPerElement; … … 59 62 buffer->onAttached(); 60 63 if (state.bufferBinding) 61 state.bufferBinding->onDetached( context()->graphicsContextGL());64 state.bufferBinding->onDetached(locker, context()->graphicsContextGL()); 62 65 63 66 state.bufferBinding = buffer; … … 71 74 } 72 75 73 void WebGLVertexArrayObjectBase::unbindBuffer( WebGLBuffer& buffer)76 void WebGLVertexArrayObjectBase::unbindBuffer(const AbstractLocker& locker, WebGLBuffer& buffer) 74 77 { 75 78 if (m_boundElementArrayBuffer == &buffer) { 76 m_boundElementArrayBuffer->onDetached( context()->graphicsContextGL());79 m_boundElementArrayBuffer->onDetached(locker, context()->graphicsContextGL()); 77 80 m_boundElementArrayBuffer = nullptr; 78 81 } … … 81 84 auto& state = m_vertexAttribState[i]; 82 85 if (state.bufferBinding == &buffer) { 83 buffer.onDetached( context()->graphicsContextGL());86 buffer.onDetached(locker, context()->graphicsContextGL()); 84 87 85 88 #if !USE(ANGLE) … … 105 108 m_vertexAttribState[index].divisor = divisor; 106 109 } 107 110 111 void WebGLVertexArrayObjectBase::addMembersToOpaqueRoots(const AbstractLocker&, JSC::SlotVisitor& visitor) 112 { 113 visitor.addOpaqueRoot(m_boundElementArrayBuffer.get()); 114 for (auto& state : m_vertexAttribState) 115 visitor.addOpaqueRoot(state.bufferBinding.get()); 116 } 117 108 118 } 109 119 -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h
r265523 r265708 32 32 #include "WebGLContextObject.h" 33 33 34 namespace JSC { 35 class SlotVisitor; 36 } 37 38 namespace WTF { 39 class AbstractLocker; 40 } 41 34 42 namespace WebCore { 35 43 … … 61 69 62 70 WebGLBuffer* getElementArrayBuffer() const { return m_boundElementArrayBuffer.get(); } 63 void setElementArrayBuffer( WebGLBuffer*);71 void setElementArrayBuffer(const WTF::AbstractLocker&, WebGLBuffer*); 64 72 65 73 VertexAttribState& getVertexAttribState(int index) { return m_vertexAttribState[index]; } 66 void setVertexAttribState( GCGLuint, GCGLsizei, GCGLint, GCGLenum, GCGLboolean, GCGLsizei, GCGLintptr, WebGLBuffer*);67 void unbindBuffer( WebGLBuffer&);74 void setVertexAttribState(const WTF::AbstractLocker&, GCGLuint, GCGLsizei, GCGLint, GCGLenum, GCGLboolean, GCGLsizei, GCGLintptr, WebGLBuffer*); 75 void unbindBuffer(const WTF::AbstractLocker&, WebGLBuffer&); 68 76 69 77 void setVertexAttribDivisor(GCGLuint index, GCGLuint divisor); 70 78 79 void addMembersToOpaqueRoots(const WTF::AbstractLocker&, JSC::SlotVisitor&); 80 71 81 protected: 72 82 WebGLVertexArrayObjectBase(WebGLRenderingContextBase&, Type); 73 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) override = 0;83 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) override = 0; 74 84 75 85 Type m_type; -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp
r254214 r265708 54 54 WebGLVertexArrayObjectOES::~WebGLVertexArrayObjectOES() 55 55 { 56 deleteObject(nullptr); 56 if (!context()) 57 return; 58 59 runDestructor(); 57 60 } 58 61 59 void WebGLVertexArrayObjectOES::deleteObjectImpl( GraphicsContextGLOpenGL* context3d, PlatformGLObject object)62 void WebGLVertexArrayObjectOES::deleteObjectImpl(const WTF::AbstractLocker& locker, GraphicsContextGLOpenGL* context3d, PlatformGLObject object) 60 63 { 61 64 switch (m_type) { … … 68 71 69 72 if (m_boundElementArrayBuffer) 70 m_boundElementArrayBuffer->onDetached( context3d);73 m_boundElementArrayBuffer->onDetached(locker, context3d); 71 74 72 75 for (auto& state : m_vertexAttribState) { 73 76 if (state.bufferBinding) 74 state.bufferBinding->onDetached( context3d);77 state.bufferBinding->onDetached(locker, context3d); 75 78 } 76 79 } -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h
r254214 r265708 38 38 private: 39 39 WebGLVertexArrayObjectOES(WebGLRenderingContextBase&, Type); 40 void deleteObjectImpl( GraphicsContextGLOpenGL*, PlatformGLObject) final;40 void deleteObjectImpl(const WTF::AbstractLocker&, GraphicsContextGLOpenGL*, PlatformGLObject) final; 41 41 }; 42 42 -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.idl
r265523 r265708 26 26 [ 27 27 NoInterfaceObject, 28 Conditional=WEBGL 28 Conditional=WEBGL, 29 GenerateIsReachable=Impl 29 30 ] interface WebGLVertexArrayObjectOES { 30 31 };
Note: See TracChangeset
for help on using the changeset viewer.