Bug 241584
| Summary: | remove concept of non-static Strings with non-owned character data | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Cameron McCormack (:heycam) <heycam> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | fujii.hironori, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Cameron McCormack (:heycam)
It's possible to create non-static String objects that point to non-owned character data. Specifically, StringView::toStringWithoutCopying can do this. It's a bit dangerous since it's then not obvious to users of String that there is an arbitrary ownership dependence in there.
We should consider removing that feature of String objects and replace their use with explicit uses of StringView.
It's possible some places may want to represent "a String or a StringView", and we can consider introducing a type to mean that.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/95563060>