Changeset 62961 in webkit
- Timestamp:
- Jul 9, 2010 9:43:38 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62960 r62961 1 2010-07-09 Kenneth Russell <kbr@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Crash with uniform array test 6 https://bugs.webkit.org/show_bug.cgi?id=36028 7 8 * fast/canvas/webgl/gl-uniform-arrays-expected.txt: 9 - Updated test expectations. 10 * fast/canvas/webgl/gl-uniform-arrays.html: 11 - Separated calling wrong uniform*fv entry point from calling with non-array. 12 1 13 2010-07-09 Chris Fleizach <cfleizach@apple.com> 2 14 -
trunk/LayoutTests/fast/canvas/webgl/gl-uniform-arrays-expected.txt
r62384 r62961 43 43 PASS value put in ([12, 11]) matches value pulled out ([12, 11]) 44 44 PASS using the wrong size of gl.Uniform fails 45 PASS passing non-array to glUniform*fv should throw TypeError 45 46 PASS can call gl.useProgram(null) 46 47 … … 63 64 PASS value put in ([10, 9, 8]) matches value pulled out ([10, 9, 8]) 64 65 PASS using the wrong size of gl.Uniform fails 66 PASS passing non-array to glUniform*fv should throw TypeError 65 67 PASS can call gl.useProgram(null) 66 68 … … 83 85 PASS value put in ([8, 7, 6, 5]) matches value pulled out ([8, 7, 6, 5]) 84 86 PASS using the wrong size of gl.Uniform fails 87 PASS passing non-array to glUniform*fv should throw TypeError 85 88 PASS can call gl.useProgram(null) 86 89 -
trunk/LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
r62384 r62961 91 91 elem: '', 92 92 numSrcValues: 3, 93 badSet: function(loc) {93 invalidSet: function(loc) { 94 94 gl.uniform2fv(loc, [1, 2]); 95 95 }, … … 114 114 elem: '[1]', 115 115 numSrcValues: 3, 116 badSet: function(loc) {116 invalidSet: function(loc) { 117 117 gl.uniform1fv(loc, [2]); 118 }, 119 illegalSet: function(loc) { 120 gl.uniform1fv(loc, 2); 118 121 }, 119 122 srcValueAsString: function(index, srcValues) { … … 141 144 elem: '[2]', 142 145 numSrcValues: 3, 143 badSet: function(loc) {146 invalidSet: function(loc) { 144 147 gl.uniform1fv(loc, [2]); 148 }, 149 illegalSet: function(loc) { 150 gl.uniform1fv(loc, 2); 145 151 }, 146 152 srcValueAsString: function(index, srcValues) { … … 171 177 elem: '[3]', 172 178 numSrcValues: 3, 173 badSet: function(loc) {179 invalidSet: function(loc) { 174 180 gl.uniform1fv(loc, [2]); 181 }, 182 illegalSet: function(loc) { 183 gl.uniform1fv(loc, 2); 175 184 }, 176 185 srcValueAsString: function(index, srcValues) { … … 249 258 typeInfo.returnValueAsString(value) + ")"); 250 259 } 251 typeInfo. badSet(loc);260 typeInfo.invalidSet(loc); 252 261 assertMsg(gl.getError() == gl.INVALID_OPERATION, 253 262 "using the wrong size of gl.Uniform fails"); 263 var exceptionCaught = false; 264 if (typeInfo.illegalSet) { 265 try { 266 typeInfo.illegalSet(loc); 267 } catch (e) { 268 exceptionCaught = true; 269 } 270 assertMsg(exceptionCaught, "passing non-array to glUniform*fv should throw TypeError"); 271 } 254 272 255 273 gl.useProgram(null); -
trunk/WebCore/ChangeLog
r62960 r62961 1 2010-07-09 Kenneth Russell <kbr@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Crash with uniform array test 6 https://bugs.webkit.org/show_bug.cgi?id=36028 7 8 * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: 9 (WebCore::vertexAttribAndUniformHelperf): 10 (WebCore::uniformHelperi): 11 (WebCore::uniformMatrixHelper): 12 - Fixed type tests and casting of incoming arrays. 13 * html/canvas/WebGLRenderingContext.cpp: 14 (WebCore::WebGLRenderingContext::getUniform): 15 - Fixed crash when null WebGLUniform is passed to getUniform. 16 1 17 2010-07-09 Chris Fleizach <cfleizach@apple.com> 2 18 -
trunk/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
r62158 r62961 478 478 } 479 479 480 if (args[1].IsEmpty() || !args[1]->IsArray()) { 481 V8Proxy::throwTypeError(); 482 return notHandledByInterceptor(); 483 } 480 484 v8::Handle<v8::Array> array = 481 485 v8::Local<v8::Array>::Cast(args[1]); 482 if (array.IsEmpty()) {483 V8Proxy::setDOMException(SYNTAX_ERR);484 return notHandledByInterceptor();485 }486 486 uint32_t len = array->Length(); 487 487 float* data = jsArrayToFloatArray(array, len); … … 546 546 } 547 547 548 if (args[1].IsEmpty() || !args[1]->IsArray()) { 549 V8Proxy::throwTypeError(); 550 return notHandledByInterceptor(); 551 } 548 552 v8::Handle<v8::Array> array = 549 553 v8::Local<v8::Array>::Cast(args[1]); 550 if (array.IsEmpty()) {551 V8Proxy::setDOMException(SYNTAX_ERR);552 return notHandledByInterceptor();553 }554 554 uint32_t len = array->Length(); 555 555 int* data = jsArrayToIntArray(array, len); … … 659 659 } 660 660 661 if (args[2].IsEmpty() || !args[2]->IsArray()) { 662 V8Proxy::throwTypeError(); 663 return notHandledByInterceptor(); 664 } 661 665 v8::Handle<v8::Array> array = 662 666 v8::Local<v8::Array>::Cast(args[2]); 663 if (array.IsEmpty()) {664 V8Proxy::setDOMException(SYNTAX_ERR);665 return notHandledByInterceptor();666 }667 667 uint32_t len = array->Length(); 668 668 float* data = jsArrayToFloatArray(array, len); -
trunk/WebCore/html/canvas/WebGLRenderingContext.cpp
r62458 r62961 1558 1558 if (!validateWebGLObject(program)) 1559 1559 return WebGLGetInfo(); 1560 if (!uniformLocation) { 1561 m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE); 1562 return WebGLGetInfo(); 1563 } 1560 1564 if (uniformLocation->program() != program) { 1561 1565 m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
Note: See TracChangeset
for help on using the changeset viewer.