Bug 52427

Summary: Inconsistent use of m_cache in CachedResourceLoader
Product: WebKit Reporter: Yuzo Fujishima <yuzo>
Component: Page LoadingAssignee: Yuzo Fujishima <yuzo>
Status: RESOLVED FIXED    
Severity: Minor CC: ap, koivisto
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch 2 koivisto: review+

Yuzo Fujishima
Reported 2011-01-13 23:16:50 PST
CachedResourceLoader::m_cache is used only in the constructor and the destructor. cache() is used instead everywhere else. It seems to be better to be consistent.
Attachments
Patch (2.79 KB, patch)
2011-01-13 23:24 PST, Yuzo Fujishima
no flags
Patch 2 (4.72 KB, patch)
2011-01-13 23:38 PST, Yuzo Fujishima
koivisto: review+
Yuzo Fujishima
Comment 1 2011-01-13 23:24:48 PST
Yuzo Fujishima
Comment 2 2011-01-13 23:38:49 PST
Created attachment 78894 [details] Patch 2
Alexey Proskuryakov
Comment 3 2011-01-14 11:07:56 PST
Storing a copy of the pointer in m_cache could be an optimization, as accessing a static variable costs more than accessing an object member. But that's only a guess about the historical reason, and I doubt that the optimization has any real effect.
Yuzo Fujishima
Comment 4 2011-01-16 22:21:12 PST
Note You need to log in before you can comment on or make changes to this bug.