Bug 141069

Summary: Optimize MemoryCache::getSessionMap() a bit
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Page LoadingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, commit-queue, darin, japhet, kling, koivisto, mhock
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 141091    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Chris Dumez 2015-01-29 22:34:52 PST
Optimize MemoryCache::getSessionMap() a bit
Comment 1 Chris Dumez 2015-01-29 22:38:06 PST
Created attachment 245696 [details]
Patch
Comment 2 Anders Carlsson 2015-01-30 07:19:11 PST
Comment on attachment 245696 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=245696&action=review

> Source/WebCore/loader/cache/MemoryCache.cpp:80
> +    std::unique_ptr<CachedResourceMap>& map = m_sessionResources.add(sessionID, nullptr).iterator->value;

auto& map =

> Source/WebCore/loader/cache/MemoryCache.h:187
> -    CachedResourceMap& getSessionMap(SessionID);
> +    CachedResourceMap& sessionResources(SessionID = SessionID::defaultSessionID());

I think it's better to be explicit about which session we want here, otherwise it's easy to always use the default session.
Comment 3 Chris Dumez 2015-01-30 09:43:41 PST
Committed r179403: <http://trac.webkit.org/changeset/179403>
Comment 5 WebKit Commit Bot 2015-01-30 12:42:06 PST
Re-opened since this is blocked by bug 141091
Comment 6 Chris Dumez 2015-01-30 14:02:08 PST
Rolled out in <http://trac.webkit.org/changeset/179410>. I'll propose another fix.
Comment 7 Chris Dumez 2015-01-30 14:47:13 PST
Created attachment 245746 [details]
Patch
Comment 8 Chris Dumez 2015-01-30 14:47:55 PST
New version of the patch will no longer causes any assertion hit in HashTable code.
Comment 9 Chris Dumez 2015-01-30 16:15:20 PST
Created attachment 245752 [details]
Patch
Comment 10 Chris Dumez 2015-01-30 16:45:59 PST
Created attachment 245759 [details]
Patch
Comment 11 WebKit Commit Bot 2015-01-30 17:39:27 PST
Comment on attachment 245759 [details]
Patch

Clearing flags on attachment: 245759

Committed r179431: <http://trac.webkit.org/changeset/179431>
Comment 12 WebKit Commit Bot 2015-01-30 17:39:32 PST
All reviewed patches have been landed.  Closing bug.