RESOLVED FIXED Bug 57262
ResourceError::certificate() should return a PCCERT_CONTEXT
https://bugs.webkit.org/show_bug.cgi?id=57262
Summary ResourceError::certificate() should return a PCCERT_CONTEXT
Jeff Miller
Reported 2011-03-28 12:47:48 PDT
Follow-up to <https://bugs.webkit.org/show_bug.cgi?id=57195>. This allows us to clean up encodeResourceError() in WebCoreArgumentCoders.win.cpp.
Attachments
Patch (4.41 KB, patch)
2011-03-28 12:54 PDT, Jeff Miller
aroben: review+
Jeff Miller
Comment 1 2011-03-28 12:54:26 PDT
WebKit Review Bot
Comment 2 2011-03-28 12:57:12 PDT
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.
Adam Roben (:aroben)
Comment 3 2011-03-28 12:58:32 PDT
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.
Jeff Miller
Comment 4 2011-03-28 13:05:19 PDT
(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.
Jeff Miller
Comment 5 2011-03-28 13:07:39 PDT
(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
Jeff Miller
Comment 6 2011-03-28 13:09:34 PDT
Note You need to log in before you can comment on or make changes to this bug.