[Webkit-unassigned] [Bug 39083] Refactor FormData and Blob for better support of Blobs synthesized by BlobBuilder

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 2 14:49:47 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39083





--- Comment #48 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-06-02 14:49:45 PST ---
(From update of attachment 57080)
WebCore/platform/BlobItem.cpp:32
 +  
nit: no new line here.

WebCore/platform/BlobItem.h:52
 +  class BytesArrayBlobItem;
nit: BytesArrayBlobItem -> ByteArrayBlobItem, the term "byte array" is more common.

WebCore/platform/BlobItem.h:45
 +  enum EndingType {
nit: LineEnding might be a more natural name for this enum.

WebCore/platform/network/FormData.h:46
 +          BlobItemWrapper(const BlobItemWrapper& v) : m_item(v.m_item) { }
this copy constructor should be generated by the compiler automatically.

WebCore/platform/network/FormData.h:60
 +          char* releaseBuffer() const
the name "releaseBuffer" typically implies an efficient operation that
does not require the allocation of memory.  it implies that memory is
being released from one owner and passed to the caller to own.  but this
is calling copyBuffer, which is a copy.  i see, however, that this is
just a temporary solution.

WebCore/platform/network/FormData.h:67
 +      } m_data;
nit: it is usually better style to do:
struct BlobItemWrapper {
  ...
};
BlobItemWrapper m_data;

WebCore/platform/BlobItem.cpp:59
 +      if (fileItem) {
it seems like it would be better to define slice for DataBlobItem
and FileBlobItem, and then leave BlobItem::slice pure virtual.
the only code you are sharing is the checks at the top of this
function.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list