Bug 99361

Summary: Re-order CachedRawResource::data() to set m_data earlier
Product: WebKit Reporter: Nate Chapin <japhet>
Component: WebCore Misc.Assignee: Nate Chapin <japhet>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 49246    
Attachments:
Description Flags
patch none

Nate Chapin
Reported 2012-10-15 13:57:16 PDT
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.
Attachments
patch (2.96 KB, patch)
2012-10-15 14:04 PDT, Nate Chapin
no flags
Nate Chapin
Comment 1 2012-10-15 14:04:54 PDT
Adam Barth
Comment 2 2012-10-16 09:51:20 PDT
Comment on attachment 168775 [details] patch ok
WebKit Review Bot
Comment 3 2012-10-16 09:56:20 PDT
Comment on attachment 168775 [details] patch Clearing flags on attachment: 168775 Committed r131467: <http://trac.webkit.org/changeset/131467>
WebKit Review Bot
Comment 4 2012-10-16 09:56:23 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.