2013-12-02  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        ExceptionCode is wrongly converted twice from ComputeError.
        Issue #352

        Found by Anthony Liot.

        WebCL::createContext passes a CCerror to WebCLContext::create,
        but the later takes an ExceptionCode.
        Given that both are equivalent typedefs there is not build error,
        but logically, the error code is converted twice, and return the
        wrong value to JS.

        It only happens when the creation of a WebCLContext fails.

        * Modules/webcl/WebCL.cpp:
        (WebCore::WebCL::createContext):
        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::create):
2013-12-02  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Make WebCL objects be released explicitly using the method release()
        Issue #229

        Reviewed by Igor.

        Implemented the 'release' method for Context, MemoryObject,
        CommandQueue, Program, Kernel and Sampler classes. Event
        is not supported because it needs issue #321 to be fixed.

        releaseAll is also implemented for Context but not for WebCL global yet.
        For this a parent WebCLAgnosticObject was added. WebCLObject now inherits
        from it.

        WebCLContext stores its descendants in a Vector<WeakPtr<WebCLAgnosticObject>>.
        Elements can be null-checked.

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::WebCLCommandQueue):
        * Modules/webcl/WebCLCommandQueue.idl:
        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::createCommandQueue):
        (WebCore::WebCLContext::createImage2DBase):
        (WebCore::WebCLContext::createUserEvent):
        (WebCore::WebCLContext::getSupportedImageFormats):
        (WebCore::WebCLContext::trackReleaseableWebCLObject):
        (WebCore::WebCLContext::releaseAll):
        * Modules/webcl/WebCLContext.h:
        * Modules/webcl/WebCLContext.idl:
        * Modules/webcl/WebCLEvent.idl:
        * Modules/webcl/WebCLKernel.cpp:
        (WebCore::WebCLKernel::WebCLKernel):
        * Modules/webcl/WebCLKernel.idl:
        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::WebCLMemoryObject):
        * Modules/webcl/WebCLMemoryObject.idl:
        * Modules/webcl/WebCLObject.h:
        (WebCore::WebCLAgnosticObject::~WebCLAgnosticObject):
        (WebCore::WebCLAgnosticObject::isReleased):
        (WebCore::WebCLAgnosticObject::release):
        (WebCore::WebCLAgnosticObject::createWeakPtr):
        (WebCore::WebCLAgnosticObject::WebCLAgnosticObject):
        (WebCore::WebCLObject::release):
        (WebCore::WebCLObject::releasePlatformObject):
        (WebCore::WebCLObject::WebCLObject):
        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::WebCLProgram):
        * Modules/webcl/WebCLProgram.h:
        * Modules/webcl/WebCLSampler.cpp:
        (WebCore::WebCLSampler::WebCLSampler):
        * Modules/webcl/WebCLSampler.idl:
2013-12-03  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Make WebCL objects be released explicitly using the method release()
        Issue #229

        Reviewed by Igor.

        Renamed WebCLAgnosticObject to WebCLObject and
        WebCLObject to WebCLObjectImpl.

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::WebCLCommandQueue):
        * Modules/webcl/WebCLCommandQueue.h:
        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::WebCLContext):
        (WebCore::WebCLContext::trackReleaseableWebCLObject):
        (WebCore::WebCLContext::releaseAll):
        * Modules/webcl/WebCLContext.h:
        * Modules/webcl/WebCLDevice.cpp:
        (WebCore::WebCLDevice::WebCLDevice):
        * Modules/webcl/WebCLDevice.h:
        * Modules/webcl/WebCLEvent.cpp:
        (WebCore::WebCLEvent::WebCLEvent):
        * Modules/webcl/WebCLEvent.h:
        * Modules/webcl/WebCLInputChecker.h:
        (WebCore::WebCLInputChecker::validateWebCLObject):
        * Modules/webcl/WebCLKernel.cpp:
        (WebCore::WebCLKernel::WebCLKernel):
        * Modules/webcl/WebCLKernel.h:
        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::WebCLMemoryObject):
        * Modules/webcl/WebCLMemoryObject.h:
        * Modules/webcl/WebCLObject.h:
        (WebCore::WebCLObject::~WebCLObject):
        (WebCore::WebCLObject::createWeakPtr):
        (WebCore::WebCLObject::WebCLObject):
        (WebCore::WebCLObjectImpl::~WebCLObjectImpl):
        (WebCore::WebCLObjectImpl::WebCLObjectImpl):
        * Modules/webcl/WebCLPlatform.cpp:
        (WebCore::WebCLPlatform::WebCLPlatform):
        * Modules/webcl/WebCLPlatform.h:
        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::WebCLProgram):
        * Modules/webcl/WebCLProgram.h:
        * Modules/webcl/WebCLSampler.cpp:
        (WebCore::WebCLSampler::WebCLSampler):
        * Modules/webcl/WebCLSampler.h:
2013-12-03  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        [CPU] Assert failure running computeinfo/cl_device_getinfo.html
        Issue #354

        Reviewed by Igor.

        The ASSERT is invalid and should be removed: WebCL should never expose
        support for native kernels, even if the device actually supports it.

        Fixes conformance/computeinfo/cl_device_getinfo.html

        * Modules/webcl/WebCLDevice.cpp:
        (WebCore::WebCLDevice::getInfo):