Commit a80de9f9 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Update blink.natvis for StringImpl

This patch changes "tools/win/DebugVisualizers/webkit.natvis" to handle
new |StringImpl| implementation[1].

I confirmed this change for both 8-Bit string and 16-Bit string, e.g.
8-Bit for |Element::tag_name| via (AtomicString), 16-Bit
|NGInlineNodeData::text_content_|.

Note: We use type cast operator to read |std::atomic_uint32_t|, because
DebugVisualizers can't read value from struct field for it.

[1] http://crrev.com/c/2301589 Make StringImpl flags atomic and
threadsafe

Bug: 1083392
Change-Id: I559ff4619695c1a4b1f5d330c36df2e85149c5c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309528
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792511}
parent 222c7c0b
......@@ -25,16 +25,28 @@
</Type>
<Type Name="WTF::StringImpl">
<DisplayString IncludeView="bare"
Condition="is_8bit_">{(this+1),[length_]sb}</DisplayString>
<DisplayString
Condition="is_8bit_">[{length_}] {(this+1),[length_]s}</DisplayString>
<DisplayString IncludeView="bare">{(this+1),[length_]sub}</DisplayString>
<DisplayString>[{length_}] {(this+1),[length_]su}</DisplayString>
Condition="*(int*)&amp;hash_and_flags_ &amp; 1">
{(this+1),[length_]sb}</DisplayString>
<DisplayString>[{length_}] {(this+1),[length_]s}</DisplayString>
<DisplayString IncludeView="bare"
Condition="*(int*)&amp;hash_and_flags_ &amp; 1">
{(this+1),[length_]sub}</DisplayString>
<DisplayString Condition="(*(int*)&amp;hash_and_flags_ &amp; 1)==0">
[{length_}] {(this+1),[length_]su}</DisplayString>
<Expand>
<Item Name="Length">length_</Item>
<Item Name="Hash">hash_</Item>
<Item Name="AsciiText" Condition="is_8bit_">(char*)(this+1),[length_]s</Item>
<Item Name="UnicodeText" Condition="!is_8bit_">(wchar_t*)(this+1),[length_]su</Item>
<Item Name="AsciiText"
Condition="*(int*)&amp;hash_and_flags_ &amp; 1">
(char*)(this+1),[length_]s</Item>
<Item Name="UnicodeText"
Condition="(*(int*)&amp;hash_and_flags_ &amp; 1)==0">
(wchar_t*)(this+1),[length_]su</Item>
<Item Name="Is8Bit">*(int*)&amp;hash_and_flags_ &amp; 1</Item>
<Item Name="IsStatic">*(int*)&amp;hash_and_flags_ &amp; 2</Item>
<Item Name="IsAtomic">*(int*)&amp;hash_and_flags_ &amp; 4</Item>
<Item Name="AsciiCheckDone">*(int*)&amp;hash_and_flags_ &amp; 8</Item>
<Item Name="ContainsOnlyAscii">*(int*)&amp;hash_and_flags_ &amp; 16</Item>
<Item Name="HashRaw">*(int*)&amp;hash_and_flags_ >> 8</Item>
</Expand>
</Type>
<Type Name="WTF::AtomicString">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment