WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
239021
Avoid redundant calls to findHTTPHeaderName()
https://bugs.webkit.org/show_bug.cgi?id=239021
Summary
Avoid redundant calls to findHTTPHeaderName()
Chris Dumez
Reported
2022-04-08 16:35:06 PDT
Avoid redundant calls to findHTTPHeaderName().
Attachments
Patch
(11.88 KB, patch)
2022-04-08 16:41 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2022-04-08 16:41:06 PDT
Created
attachment 457127
[details]
Patch
Darin Adler
Comment 2
2022-04-10 15:46:11 PDT
Comment on
attachment 457127
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457127&action=review
> Source/WebCore/ChangeLog:3 > + Avoid redundant calls to findHTTPHeaderName()
Can some of this be changed to use StringView later?
Chris Dumez
Comment 3
2022-04-10 16:03:14 PDT
(In reply to Darin Adler from
comment #2
)
> Comment on
attachment 457127
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=457127&action=review
> > > Source/WebCore/ChangeLog:3 > > + Avoid redundant calls to findHTTPHeaderName() > > Can some of this be changed to use StringView later?
What part? findHTTPHeaderName() already takes a Stringview: Source/WebCore/platform/network/create-http-header-name-table:bool findHTTPHeaderName(StringView stringView, HTTPHeaderName& headerName)
EWS
Comment 4
2022-04-10 16:55:41 PDT
Committed
r292692
(
249484@main
): <
https://commits.webkit.org/249484@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 457127
[details]
.
Radar WebKit Bug Importer
Comment 5
2022-04-10 17:03:58 PDT
<
rdar://problem/91540482
>
Darin Adler
Comment 6
2022-04-11 08:34:00 PDT
Comment on
attachment 457127
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457127&action=review
>>> Source/WebCore/ChangeLog:3 >>> + Avoid redundant calls to findHTTPHeaderName() >> >> Can some of this be changed to use StringView later? > > What part? findHTTPHeaderName() already takes a Stringview: > Source/WebCore/platform/network/create-http-header-name-table:bool findHTTPHeaderName(StringView stringView, HTTPHeaderName& headerName)
For example, setHTTPHeaderField and addHTTPHeaderField. It requires making arguments into String if they aren’t known HTTP header names, but do those String objects get kept around? It’s good we don’t do it with string literals, but what about other sources of strings? And what about the value? Does it get stored as a String or some other way? I think there are still extra String involved in those functions.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug