Changeset 106873 in webkit


Ignore:
Timestamp:
Feb 6, 2012 4:38:43 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

WebGL conformance test misc/functions-returning-strings.html fails
https://bugs.webkit.org/show_bug.cgi?id=77149

Source/WebCore:

Make sure that WebGL methods returning strings don't return null when
they run successfully.

Patch by Ehsan Akhgari <ehsan.akhgari@gmail.com> on 2012-02-06
Reviewed by Kenneth Russell.

Test: fast/canvas/webgl/functions-returning-strings.html

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore):
(WebCore::WebGLRenderingContext::getProgramInfoLog):
(WebCore::WebGLRenderingContext::getShaderInfoLog):
(WebCore::WebGLRenderingContext::getShaderSource):
(WebCore::WebGLRenderingContext::ensureNotNull):

  • html/canvas/WebGLRenderingContext.h:

(WebGLRenderingContext):

LayoutTests:

Imported the WebGL conformance test related to this.

Patch by Ehsan Akhgari <ehsan.akhgari@gmail.com> on 2012-02-06
Reviewed by Kenneth Russell.

  • fast/canvas/webgl/functions-returning-strings-expected.txt: Added.
  • fast/canvas/webgl/functions-returning-strings.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106864 r106873  
     12012-02-06  Ehsan Akhgari  <ehsan.akhgari@gmail.com>
     2
     3        WebGL conformance test misc/functions-returning-strings.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=77149
     5
     6        Imported the WebGL conformance test related to this.
     7
     8        Reviewed by Kenneth Russell.
     9
     10        * fast/canvas/webgl/functions-returning-strings-expected.txt: Added.
     11        * fast/canvas/webgl/functions-returning-strings.html: Added.
     12
    1132012-02-06  Chris Rogers  <crogers@google.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r106872 r106873  
     12012-02-06  Ehsan Akhgari  <ehsan.akhgari@gmail.com>
     2
     3        WebGL conformance test misc/functions-returning-strings.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=77149
     5
     6        Make sure that WebGL methods returning strings don't return null when
     7        they run successfully.
     8
     9        Reviewed by Kenneth Russell.
     10
     11        Test: fast/canvas/webgl/functions-returning-strings.html
     12
     13        * html/canvas/WebGLRenderingContext.cpp:
     14        (WebCore):
     15        (WebCore::WebGLRenderingContext::getProgramInfoLog):
     16        (WebCore::WebGLRenderingContext::getShaderInfoLog):
     17        (WebCore::WebGLRenderingContext::getShaderSource):
     18        (WebCore::WebGLRenderingContext::ensureNotNull):
     19        * html/canvas/WebGLRenderingContext.h:
     20        (WebGLRenderingContext):
     21
    1222012-02-06  Enrica Casucci  <enrica@apple.com>
    223
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r106421 r106873  
    25142514        return "";
    25152515    WebGLStateRestorer(this, false);
    2516     return m_context->getProgramInfoLog(objectOrZero(program));
     2516    return ensureNotNull(m_context->getProgramInfoLog(objectOrZero(program)));
    25172517}
    25182518
     
    26142614        return "";
    26152615    WebGLStateRestorer(this, false);
    2616     return m_context->getShaderInfoLog(objectOrZero(shader));
     2616    return ensureNotNull(m_context->getShaderInfoLog(objectOrZero(shader)));
    26172617}
    26182618
     
    26242624    if (!validateWebGLObject("getShaderSource", shader))
    26252625        return "";
    2626     return shader->getSource();
     2626    return ensureNotNull(shader->getSource());
    26272627}
    26282628
     
    51245124}
    51255125
     5126String WebGLRenderingContext::ensureNotNull(const String& text) const
     5127{
     5128    if (text.isNull())
     5129        return WTF::emptyString();
     5130    return text;
     5131}
     5132
    51265133WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache(int capacity)
    51275134    : m_buffers(adoptArrayPtr(new OwnPtr<ImageBuffer>[capacity]))
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h

    r106421 r106873  
    663663    void synthesizeGLError(GC3Denum, const char* functionName, const char* description);
    664664
     665    String ensureNotNull(const String&) const;
     666
    665667    friend class WebGLStateRestorer;
    666668};
Note: See TracChangeset for help on using the changeset viewer.