2013-02-27  Sharath Kamath  <kamath.sharath@gmail.com>

        createSubBuffer() API crashes the safari browser.
        Issue #105

        Reviewed by NOBODY (OOPS!).

        On running the conformance test case to getInfo on MEM_ASSOCIATED_MEMOBJECT flag , the browser crashes.
        The stack reports crash in ~WebCLMemoryObject.
        Need to investigate the way the desctructor is called for a sub buffer as a subbuffer
        is also WebCLMemoryObject. And it depends on the cl_mem of the WebCLMemoryObject on using which it was created.

        The subbuffer will have a reference count heigher than 1. Thus can check it before calling clRelease.

        No new tests.

        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::~WebCLMemoryObject):
2013-02-27  Sharath Kamath  <kamath.sharath@gmail.com>

        MEM_COPY_HOST_PTR should not be set by ComputeContext.
        Issue #142

        Reviewed by NOBODY (OOPS!).

        MEM_COPY_HOST_PTR must be used when the user sends a data object to initialize
        the new buffer/image.
        Also clean all createBuffer and createImage API.
        And throw valid exceptions when they are error senarious in these API
        mapping the exception to OpenCL error codes.

        No new tests.

        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::createBuffer):
        (WebCore::WebCLContext::createImage2DBase):
        (WebCore::WebCLContext::createImage):
        (WebCore::WebCLContext::createFromGLBuffer):
        (WebCore::WebCLContext::createFromGLRenderBuffer):
        (WebCore::WebCLContext::createFromGLTexture2D):
        * platform/opencl/ComputeContextCL.cpp:
        (WebCore::ComputeContext::createBuffer):
        (WebCore::ComputeContext::createImage2D):