Bug 80898

Summary: Make ApplicationCacheHost::isApplicationCacheEnabled() const.
Product: WebKit Reporter: Gavin Peters <gavinp>
Component: New BugsAssignee: Gavin Peters <gavinp>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ap, beidson, japhet, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch gavinp: review-

Description Gavin Peters 2012-03-12 15:16:40 PDT
Make ApplicationCacheHost::isApplicationCacheEnabled() const.
Comment 1 Gavin Peters 2012-03-12 15:19:56 PDT
Created attachment 131424 [details]
Patch
Comment 2 Gavin Peters 2012-03-12 15:25:44 PDT
This patch make this ApplicationCacheHost method const; I'm shortly going to add code to chromium that follows a const pointer, and the function was logically already const.
Comment 3 Alexey Proskuryakov 2012-03-12 15:30:35 PDT
Comment on attachment 131424 [details]
Patch

We generally try to not have const pointers to large objects like this one, because it simply doesn't make sense.

So, it would be slightly better to fix chromium side to not keep a const pointer. But there is no harm in this patch either.

Note that the existing line below is worse:

>          DocumentLoader* documentLoader() const { return m_documentLoader; }

This is basically a sneaky way to remove constness (DocumentLoader owns ApplicationCacheHost and a lot more).
Comment 4 Gavin Peters 2012-03-12 15:48:40 PDT
You're right.  Let's get it right.