Bug 80898 - Make ApplicationCacheHost::isApplicationCacheEnabled() const.
Summary: Make ApplicationCacheHost::isApplicationCacheEnabled() const.
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Peters
Depends on:
Reported: 2012-03-12 15:16 PDT by Gavin Peters
Modified: 2012-03-12 15:49 PDT (History)
4 users (show)

See Also:

Patch (3.77 KB, patch)
2012-03-12 15:19 PDT, Gavin Peters
gavinp: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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]

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.