Summary: | ResourceError::certificate() should return a PCCERT_CONTEXT | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jeff Miller <jeffm> | ||||
Component: | WebKit2 | Assignee: | Jeff Miller <jeffm> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
Attachments: |
|
Description
Jeff Miller
2011-03-28 12:47:48 PDT
Created attachment 87183 [details]
Patch
Attachment 87183 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebKit2/ChangeLog:13: ChangeLog entry has no bug number [changelog/bugnumber] [5]
Total errors found: 1 in 5 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 87183 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=87183&action=review > Source/WebCore/platform/network/cf/ResourceErrorCF.cpp:62 > +PCCERT_CONTEXT ResourceError::certificate() const > +{ > + if (!m_certificate) > + return 0; > + > + return reinterpret_cast<PCCERT_CONTEXT>(CFDataGetBytePtr(m_certificate.get())); > +} Now I'm starting to wonder whether making m_certificate itself a PCCERT_CONTEXT would be good. I guess one benefit of using CFDataRef is that we get to use RetainPtr. We don't have a comparable smart pointer for PCCERT_CONTEXT. (In reply to comment #3) > (From update of attachment 87183 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=87183&action=review > > > Source/WebCore/platform/network/cf/ResourceErrorCF.cpp:62 > > +PCCERT_CONTEXT ResourceError::certificate() const > > +{ > > + if (!m_certificate) > > + return 0; > > + > > + return reinterpret_cast<PCCERT_CONTEXT>(CFDataGetBytePtr(m_certificate.get())); > > +} > > Now I'm starting to wonder whether making m_certificate itself a PCCERT_CONTEXT would be good. I guess one benefit of using CFDataRef is that we get to use RetainPtr. We don't have a comparable smart pointer for PCCERT_CONTEXT. Yes, I originally went down the path of using PCCERT_CONTEXT, but without a comparable smart pointer I would have had to add a destructor, so it seemed cleaner to use a CFDataRef. Plus, we need it in a CFDataRef when we stick it in the user info dictionary in the CFErrorRef. (In reply to comment #2) > Attachment 87183 [details] did not pass style-queue: > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 > > Source/WebKit2/ChangeLog:13: ChangeLog entry has no bug number [changelog/bugnumber] [5] > Total errors found: 1 in 5 files > > > If any of these errors are false positives, please file a bug against check-webkit-style. Another false positive, which I assume is a similar issue to the bug I already filed: https://bugs.webkit.org/show_bug.cgi?id=57250 Committed r82146: <http://trac.webkit.org/changeset/82146> |