Bug 193023 - [lldb-webkit] Remove broken code to print WTF::OptionSet::m_storage
Summary: [lldb-webkit] Remove broken code to print WTF::OptionSet::m_storage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-24 16:14 PST by Daniel Bates
Modified: 2019-01-02 10:51 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.18 KB, patch)
2018-12-24 16:16 PST, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-12-24 16:14:26 PST
The WTF::OptionSet pretty printer contains code to print the value of WTF::OptionSet::m_storage. Due to an off-by-one error this code is broken and as a result we never print the value of WTF::OptionSet::m_storage when pretty printing the option set. Having said that, it does not seem very meaningful to print the value of m_storage as it is just the sum of the values of the enumerators in the set and I find it would just be noise if printed. We should just remove the code that tried to print WTF::OptionSet::m_storage.

If there is someone that likes knowing m_storage then we should still remove the current code and re-implement this functionality as part of the summary string for WTF::OptionSet so that we do not print m_storage as if it was an item in the set.

For completeness, if the code had worked then pretty printed output would look like:

(WTF::OptionSet<ExampleFlags>) $0 = { size = 3 } {
  A = 1
  C = 4
  D = 8
  m_storage = 13
}

Currently it looks like:

(WTF::OptionSet<ExampleFlags>) $0 = { size = 3 } {
  A = 1
  C = 4
  D = 8
}
Comment 1 Daniel Bates 2018-12-24 16:16:48 PST
Created attachment 358049 [details]
Patch
Comment 2 Simon Fraser (smfr) 2019-01-02 10:34:17 PST
Comment on attachment 358049 [details]
Patch

No tests?
Comment 3 Daniel Bates 2019-01-02 10:36:16 PST
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 358049 [details]
> Patch
> 
> No tests?

No tests, because I am removing functionality.
Comment 4 Daniel Bates 2019-01-02 10:50:20 PST
Comment on attachment 358049 [details]
Patch

Clearing flags on attachment: 358049

Committed r239570: <https://trac.webkit.org/changeset/239570>
Comment 5 Daniel Bates 2019-01-02 10:50:21 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-01-02 10:51:25 PST
<rdar://problem/47005480>