Title: [102083] trunk/Tools
- Revision
- 102083
- Author
- [email protected]
- Date
- 2011-12-05 18:07:23 -0800 (Mon, 05 Dec 2011)
Log Message
webkit.py: Really fix the printing of StringImpl now that 8-bit strings are present.
https://bugs.webkit.org/show_bug.cgi?id=73878
Reviewed by Tony Chang.
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.
* gdb/webkit.py:
(WTFStringPrinter.is_8bit): Reproduced StringImpl::is8Bit().
(WTFStringPrinter.to_string):
(JSCUStringPrinter.is_8bit): Reproduced StringImpl::is8Bit().
(JSCUStringPrinter.to_string):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (102082 => 102083)
--- trunk/Tools/ChangeLog 2011-12-06 02:06:48 UTC (rev 102082)
+++ trunk/Tools/ChangeLog 2011-12-06 02:07:23 UTC (rev 102083)
@@ -1,3 +1,23 @@
+2011-12-05 Raphael Kubo da Costa <[email protected]>
+
+ webkit.py: Really fix the printing of StringImpl now that 8-bit strings are present.
+ https://bugs.webkit.org/show_bug.cgi?id=73878
+
+ Reviewed by Tony Chang.
+
+ 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.
+
+ * gdb/webkit.py:
+ (WTFStringPrinter.is_8bit): Reproduced StringImpl::is8Bit().
+ (WTFStringPrinter.to_string):
+ (JSCUStringPrinter.is_8bit): Reproduced StringImpl::is8Bit().
+ (JSCUStringPrinter.to_string):
+
2011-12-05 Eric Seidel <[email protected]>
Up the "expected ram for each DRT instance" to 400MB instead of 300MB
Modified: trunk/Tools/gdb/webkit.py (102082 => 102083)
--- trunk/Tools/gdb/webkit.py 2011-12-06 02:06:48 UTC (rev 102082)
+++ trunk/Tools/gdb/webkit.py 2011-12-06 02:07:23 UTC (rev 102083)
@@ -107,11 +107,19 @@
return 0
return self.val['m_impl']['m_ptr']['m_length']
+ def is_8bit(self):
+ return self.val['m_impl']['m_ptr']['m_hashAndFlags'] & self.val['m_impl']['m_ptr']['s_hashFlag8BitBuffer']
+
def to_string(self):
if self.get_length() == 0:
return '(null)'
- return ustring_to_string(self.val['m_impl']['m_ptr']['m_data16'],
+ if self.is_8bit():
+ data_member = 'm_data8'
+ else:
+ data_member = 'm_data16'
+
+ return ustring_to_string(self.val['m_impl']['m_ptr'][data_member],
self.get_length())
@@ -122,11 +130,19 @@
return 0
return self.val['m_impl']['m_ptr']['m_length']
+ def is_8bit(self):
+ return self.val['m_impl']['m_ptr']['m_hashAndFlags'] & self.val['m_impl']['m_ptr']['s_hashFlag8BitBuffer']
+
def to_string(self):
if self.get_length() == 0:
return ''
- return ustring_to_string(self.val['m_impl']['m_ptr']['m_data16'],
+ if self.is_8bit():
+ data_member = 'm_data8'
+ else:
+ data_member = 'm_data16'
+
+ return ustring_to_string(self.val['m_impl']['m_ptr'][data_member],
self.get_length())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes