Bug 63515 - AtomicString::show() and WTFString::show() should be const.
: AtomicString::show() and WTFString::show() should be const.
Status: RESOLVED FIXED
: WebKit
Text
: 528+ (Nightly build)
: All Unspecified
: P2 Minor
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-06-28 00:03 PST by
Modified: 2011-06-28 01:54 PST (History)


Attachments
Patch (2.80 KB, patch)
2011-06-28 00:11 PST, Shinya Kawanaka
no flags Review Patch | Details | Formatted Diff | Diff
Patch (2.90 KB, patch)
2011-06-28 00:48 PST, Shinya Kawanaka
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-06-28 00:03:35 PST
AtomicString::show() and WTFString::show are not const, so we have to use const_cast to call them occasionally.
These methods should be const.
------- Comment #1 From 2011-06-28 00:11:35 PST -------
Created an attachment (id=98870) [details]
Patch
------- Comment #2 From 2011-06-28 00:14:58 PST -------
(In reply to comment #0)
> AtomicString::show() and WTFString::show are not const, so we have to use const_cast to call them occasionally.

So you should remove such const_casts in this patch. Otherwise, the patch has no benefit.
------- Comment #3 From 2011-06-28 00:37:43 PST -------
Since this is a debug feature, there is no code to call show() in Sources (maybe). However, when doing something like printf-debug, the lack of const is painful.

This bug is related to 
https://bugs.webkit.org/show_bug.cgi?id=61149
------- Comment #4 From 2011-06-28 00:40:20 PST -------
(In reply to comment #3)
> Since this is a debug feature, there is no code to call show() in Sources (maybe). However, when doing something like printf-debug, the lack of const is painful.

Ok, I understand.  Please note such reasons to ChangeLog.
------- Comment #5 From 2011-06-28 00:48:31 PST -------
Created an attachment (id=98875) [details]
Patch
------- Comment #6 From 2011-06-28 00:50:10 PST -------
(From update of attachment 98875 [details])
ok.
------- Comment #7 From 2011-06-28 01:54:11 PST -------
(From update of attachment 98875 [details])
Clearing flags on attachment: 98875

Committed r89906: <http://trac.webkit.org/changeset/89906>
------- Comment #8 From 2011-06-28 01:54:16 PST -------
All reviewed patches have been landed.  Closing bug.