2014-01-27  Sharath Kamath  <s.kamath@samsung.com>

        Enqueue* API boundary checks.

        Issue #408

        Reviewed by Antonio.

        Currently we do not do any boundary check on the memory being
        read or written by the enqueue* API's.

        Since opencl take the input pointer as a void* and does no validation
        on the read/write, WebCL has to check the same.
        Also to avoid waiting for OpenCL to throw exception on
        illegal reads/writes wrt buffer/images WebCL does a size check and
        throws exception if they is illegal size read/write.

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::enqueueWriteBufferBase):
        (WebCore::WebCLCommandQueue::enqueueWriteBufferRectBase):
        (WebCore::WebCLCommandQueue::enqueueReadBufferBase):
        (WebCore::WebCLCommandQueue::enqueueReadBuffer):
        (WebCore::WebCLCommandQueue::enqueueReadImageBase):
        (WebCore::WebCLCommandQueue::enqueueReadImage):
        (WebCore::WebCLCommandQueue::enqueueReadBufferRectBase):
        (WebCore::WebCLCommandQueue::enqueueReadBufferRect):
        (WebCore::WebCLCommandQueue::enqueueWriteImageBase):
        (WebCore::WebCLCommandQueue::enqueueWriteImage):
        * Modules/webcl/WebCLCommandQueue.h:
        * Modules/webcl/WebCLInputChecker.cpp:
        (WebCore::WebCLInputChecker::isValidLengthForRegion):
        * Modules/webcl/WebCLInputChecker.h:
        * Modules/webcl/WebCLMemoryObject.h:
        (WebCore::WebCLMemoryObject::sizeInBytes):