WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 52637
WebCore should call alternate CFHTTPCookie functions, if available
https://bugs.webkit.org/show_bug.cgi?id=52637
Summary
WebCore should call alternate CFHTTPCookie functions, if available
Adam Roben (:aroben)
Reported
2011-01-18 10:15:57 PST
WebCore should call alternate CFHTTPCookie functions, if available
Attachments
Patch
(5.81 KB, patch)
2011-01-18 10:17 PST
,
Adam Roben (:aroben)
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2011-01-18 10:17:15 PST
Created
attachment 79292
[details]
Patch
Adam Roben (:aroben)
Comment 2
2011-01-18 10:18:19 PST
<
rdar://problem/8878984
>
Geoffrey Garen
Comment 3
2011-01-18 10:23:02 PST
> Source/WebCore/platform/network/cf/CookieJarCFNet.cpp:60 > +static RetainPtr<CFStringRef> cookieDomain(CFHTTPCookieRef cookie)
Can these wrappers be inlined?
Adam Roben (:aroben)
Comment 4
2011-01-18 10:26:28 PST
(In reply to
comment #3
)
> > Source/WebCore/platform/network/cf/CookieJarCFNet.cpp:60 > > +static RetainPtr<CFStringRef> cookieDomain(CFHTTPCookieRef cookie) > > Can these wrappers be inlined?
If you mean "Can you add the 'inline' keyword to these wrappers?", the answer is of course "yes". If you mean "Is it possible for the compiler to inline these wrappers, regardless of whether you specified the 'inline' keyword?", the answer is "I don't know, but I'd hope so." Are you suggesting I add the keyword? Do you think it would make a difference?
Geoffrey Garen
Comment 5
2011-01-18 10:35:27 PST
Heh -- I'm suggesting adding the keyword. All of the RetainPtr stuff inside these functions is inlined, so inlining these functions should produce good results. That said, I doubt this is performance-critical code.
Adam Roben (:aroben)
Comment 6
2011-01-18 10:38:38 PST
(In reply to
comment #5
)
> Heh -- I'm suggesting adding the keyword. > > All of the RetainPtr stuff inside these functions is inlined, so inlining these functions should produce good results. > > That said, I doubt this is performance-critical code.
Thanks for the clarification. Do you think the compiler is unlikely to inline these functions on its own?
Geoffrey Garen
Comment 7
2011-01-18 11:00:55 PST
> Do you think the compiler is unlikely to inline these functions on its own?
I'm always surprised by what the compiler chooses to inline automatically. In theory, "inline" is a hint to consider something for inlining, but compilers may ignore the hint, or may inline without the hint. Some compilers require you to set an explicit "inline even functions not marked inline" flag. I'm told that LLVM ignores the inline keyword altogether, and makes its own decisions about each function. I'm not sure what other compilers like MSVC and GCC do. Given all this uncertainty, I usually add the inline keyword to good-looking functions.
Adam Roben (:aroben)
Comment 8
2011-01-18 11:09:19 PST
(In reply to
comment #7
)
> > Do you think the compiler is unlikely to inline these functions on its own? > > I'm always surprised by what the compiler chooses to inline automatically. In theory, "inline" is a hint to consider something for inlining, but compilers may ignore the hint, or may inline without the hint. Some compilers require you to set an explicit "inline even functions not marked inline" flag. > > I'm told that LLVM ignores the inline keyword altogether, and makes its own decisions about each function. I'm not sure what other compilers like MSVC and GCC do.
MSDN says that MSVC treats "inline" as a hint. I also know that MSVC will sometimes inline functions that don't have the "inline" keyword. MSVC also has a __forceinline keyword, which lets you give a much stronger hint to the compiler.
> Given all this uncertainty, I usually add the inline keyword to good-looking functions.
OK, I'll add them. Thanks!
Adam Roben (:aroben)
Comment 9
2011-01-18 11:15:32 PST
Committed
r76041
: <
http://trac.webkit.org/changeset/76041
>
Geoffrey Garen
Comment 10
2011-01-21 20:30:20 PST
Following up, here's an example where I just had to mark a one line forwarding function inline in order to get GCC to do the right thing:
http://trac.webkit.org/changeset/76425
.
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