Summary: | GraphicsContext3D should be using fastMalloc | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
Component: | WebGL | Assignee: | Chris Marrin <cmarrin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | oliver, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2009-10-26 09:18:32 PDT
Landed in http://trac.webkit.org/changeset/51535 Sorry, closed wrong bug. Ignore previous comment Created attachment 44074 [details]
Patch with updated test case
style-queue ran check-webkit-style on attachment 44074 [details] without any errors.
Comment on attachment 44074 [details] Patch with updated test case > - GLchar* info = (GLchar*) malloc(length); > + GLchar* info = (GLchar*) fastMalloc(length); > + if (!info) > + return ""; > + > ::glGetProgramInfoLog((GLuint) program->object(), length, &size, info); > String s(info); > free(info); If you use fastMalloc, you need to use fastFree, too. Comment on attachment 44074 [details] Patch with updated test case > +// Test program and shader gets > +var parseError = "ERROR: 0:1: 'I' : syntax error syntax error\nERROR: Parser found no code to compile in source strings.\n"; > +var errorVertString = "I am a bad vertex shader\n"; > +var errorFragString = "I am a bad fragment shader\n"; > +shouldBe('gl.getProgramInfoLog(standardProgram)', '""'); > +shouldBe('gl.getShaderInfoLog(errorVert)', 'parseError'); > +shouldBe('gl.getShaderInfoLog(errorFrag)', 'parseError'); > +shouldBe('gl.getShaderSource(errorVert)', 'errorVertString'); > +shouldBe('gl.getShaderSource(errorFrag)', 'errorFragString'); If you don't quote the second parameter to these functions you'll see the actual error messages in the test output, which might be good. Maybe you should be using shouldBeEqualToString instead? Created attachment 44079 [details]
Replacement patch
Adds fastFree
Comment on attachment 44079 [details]
Replacement patch
r=me
Landed in http://trac.webkit.org/changeset/51537 |