RESOLVED FIXED 77715
SharedBuffer m_segments and m_dataArray must be exclusive
https://bugs.webkit.org/show_bug.cgi?id=77715
Summary SharedBuffer m_segments and m_dataArray must be exclusive
Benjamin Poulain
Reported 2012-02-02 22:19:15 PST
There is a clear order and size relation between m_buffer and m_segments. With m_dataArray, there is the implicit rule that m_dataArray comes after m_buffer and m_segments, and all segments are completely full. In practice, we never mix m_dataArray and m_segments (well, I hope at least) which is why that works. We should make those relations explicit. Related to: <rdar://problem/10801705>
Attachments
Patch (6.13 KB, patch)
2012-11-29 13:59 PST, Pratik Solanki
no flags
Patch (5.57 KB, patch)
2013-05-03 12:05 PDT, Pratik Solanki
benjamin: review+
benjamin: commit-queue-
Benjamin Poulain
Comment 1 2012-02-03 17:46:37 PST
Pratik Solanki
Comment 2 2012-11-19 12:56:25 PST
Updating title. m_buffer is still needed even with data array. Also taking bug since I have a patch.
Pratik Solanki
Comment 3 2012-11-29 13:59:55 PST
Pratik Solanki
Comment 4 2013-05-03 12:05:44 PDT
Benjamin Poulain
Comment 5 2013-05-03 16:06:00 PDT
Comment on attachment 200453 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=200453&action=review > Source/WebCore/platform/SharedBuffer.cpp:211 > + m_buffer.reserveInitialCapacity(length); I don't think that matters. The append() call has the size, it will allocate the best block size for the input.
Pratik Solanki
Comment 6 2013-05-03 16:33:04 PDT
Comment on attachment 200453 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=200453&action=review >> Source/WebCore/platform/SharedBuffer.cpp:211 >> + m_buffer.reserveInitialCapacity(length); > > I don't think that matters. The append() call has the size, it will allocate the best block size for the input. That change was inspired by <http://trac.webkit.org/changeset/135098> made for bug 102625
Pratik Solanki
Comment 7 2013-08-28 17:13:13 PDT
Hmm.. Looks like I never checked this in. :( I am going to rebase the patch, make sure it works and maybe upload a new one for review.
Pratik Solanki
Comment 8 2013-08-28 17:50:19 PDT
Looks like the patch compiles and runs fine with USE(NETWORK_CFDATA_ARRAY_CALLBACK) disabled. If it works fine with the flag turned on, I'll just go ahead and commit.
Pratik Solanki
Comment 9 2013-08-29 11:00:43 PDT
Note You need to log in before you can comment on or make changes to this bug.