Currently, we calculate the diff between the data parameter and m_data, call dataReceived(), then set m_data to data. If something inside dataReceived() tries to access m_data via CachedResource::resourceBuffer(), it will see the old data instead of the new data, which seems inconsistent. To the best of my knowledge, this isn't needed currently, but it's necessary for caching main resources, as much more work will be done on main resource dataReceived() callbacks.
Created attachment 168775 [details] patch
Comment on attachment 168775 [details] patch ok
Comment on attachment 168775 [details] patch Clearing flags on attachment: 168775 Committed r131467: <http://trac.webkit.org/changeset/131467>
All reviewed patches have been landed. Closing bug.