Bug 73878 - webkit.py: Really fix the printing of StringImpl now that 8 bit strings are present
Summary: webkit.py: Really fix the printing of StringImpl now that 8 bit strings are p...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Raphael Kubo da Costa (:rakuco)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 16:48 PST by Raphael Kubo da Costa (:rakuco)
Modified: 2011-12-05 18:09 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.82 KB, patch)
2011-12-05 16:54 PST, Raphael Kubo da Costa (:rakuco)
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa (:rakuco) 2011-12-05 16:48:53 PST
r98624 turned StringImpl::m_data into StringImpl::{m_data8,m_data16}. r98785 made webkit.py always use m_data16, which does not work when the string is an 8-bit string (such as KURL::string()).

I was not able to directly call StringImpl::is8Bit() in the Python code, so I just reproduced the implementation there.
Comment 1 Raphael Kubo da Costa (:rakuco) 2011-12-05 16:54:00 PST
Created attachment 117956 [details]
Patch
Comment 2 Tony Chang 2011-12-05 17:04:50 PST
Comment on attachment 117956 [details]
Patch

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

> Tools/gdb/webkit.py:112
> +        return self.val['m_impl']['m_ptr']['m_hashAndFlags'] & \
> +               self.val['m_impl']['m_ptr']['s_hashFlag8BitBuffer']

The line wrapping is wrong (incorrect indention), but I would either just make this a single line.

> Tools/gdb/webkit.py:136
> +        return self.val['m_impl']['m_ptr']['m_hashAndFlags'] & \
> +               self.val['m_impl']['m_ptr']['s_hashFlag8BitBuffer']

Ditto.
Comment 3 Raphael Kubo da Costa (:rakuco) 2011-12-05 18:09:20 PST
Committed r102083: <http://trac.webkit.org/changeset/102083>