| Summary: | Make MIMETypeRegistry::mimeTypeForPath take a StringView | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Nguyen (:ntim) <ntim> | ||||||||
| Component: | Web Template Framework | Assignee: | youenn fablet <youennf> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | cdumez, ews-watchlist, hi, japhet, joepeck, mifenton, pangle, webkit-bug-importer, youennf | ||||||||
| Priority: | P2 | Keywords: | EasyFix, GoodFirstBug, InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Tim Nguyen (:ntim)
2022-02-10 07:01:33 PST
Created attachment 454576 [details]
Patch
Comment on attachment 454576 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454576&action=review > Source/WebCore/platform/MIMETypeRegistry.cpp:402 > + auto result = mimeTypeForExtension(path.substring(position + 1).toString()); Seems we could go one step further and make mimeTypeForExtension() take a StringView too? Comment on attachment 454576 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454576&action=review >> Source/WebCore/platform/MIMETypeRegistry.cpp:402 >> + auto result = mimeTypeForExtension(path.substring(position + 1).toString()); > > Seems we could go one step further and make mimeTypeForExtension() take a StringView too? I thought about it and did not do it as it is a bigger/cross-platform change. I'll give it a try. Created attachment 454679 [details]
Patch
Comment on attachment 454679 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454679&action=review r=me with fix. > Source/WebCore/platform/MIMETypeRegistry.cpp:402 > + auto result = mimeTypeForExtension(path.substring(position + 1).toString()); There should be no .toString() here. Created attachment 454817 [details]
Patch for landing
Committed r291341 (248480@main): <https://commits.webkit.org/248480@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454817 [details]. |