Closed
Bug 1501589
Opened 6 years ago
Closed 6 years ago
Port bug 1501404 (part 6): Replace use of NS_STARTTLSSOCKETPROVIDER_CONTRACTID - nsLDAPSecurityGlue.cpp:157:39: error: use of undeclared identifier 'NS_STARTTLSSOCKETPROVIDER_CONTRACTID'
Categories
(MailNews Core :: LDAP Integration, task)
MailNews Core
LDAP Integration
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 65.0
People
(Reporter: mkmelin, Assigned: mkmelin)
References
Details
Attachments
(1 file, 4 obsolete files)
3.82 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
From bug 1501404 part 6 - https://hg.mozilla.org/mozilla-central/rev/1766ed669623 nsLDAPSecurityGlue.cpp:157:39: error: use of undeclared identifier 'NS_STARTTLSSOCKETPROVIDER_CONTRACTID'
Assignee | ||
Comment 1•6 years ago
|
||
Think this should do it, but other build errors prevents verifying it
Attachment #9019603 -
Flags: review?(jorgk)
Assignee | ||
Comment 2•6 years ago
|
||
Comment on attachment 9019603 [details] [diff] [review] bug1501589_NS_STARTTLSSOCKETPROVIDER_CONTRACTID.patch Review of attachment 9019603 [details] [diff] [review]: ----------------------------------------------------------------- not ready
Attachment #9019603 -
Flags: review?(jorgk)
Comment 3•6 years ago
|
||
Indeed, it complains about NS_SOCKETPROVIDERSERVICE_CONTRACTID which was also removed here: https://hg.mozilla.org/mozilla-central/rev/79795a6721cc#l2.12 You want to use this code: https://hg.mozilla.org/mozilla-central/rev/1766ed669623#l4.43 + nsCOMPtr<nsISocketProvider> inst; + if (!nsCRT::strcmp(type, "ssl") && + XRE_IsParentProcess() && + EnsureNSSInitializedChromeOrContent()) { + inst = new nsSSLSocketProvider(); + } else if (!nsCRT::strcmp(type, "starttls") && + XRE_IsParentProcess() && + EnsureNSSInitializedChromeOrContent()) { + inst = new nsTLSSocketProvider(); So just: nsCOMPtr<nsISocketProvider> inst = new nsTLSSocketProvider();
Summary: nsLDAPSecurityGlue.cpp:157:39: error: use of undeclared identifier 'NS_STARTTLSSOCKETPROVIDER_CONTRACTID' → Port bug 1501404 (part 6): Replace use of NS_STARTTLSSOCKETPROVIDER_CONTRACTID - nsLDAPSecurityGlue.cpp:157:39: error: use of undeclared identifier 'NS_STARTTLSSOCKETPROVIDER_CONTRACTID'
Comment 4•6 years ago
|
||
Done.
Attachment #9019603 -
Attachment is obsolete: true
Attachment #9019614 -
Flags: review+
Assignee | ||
Comment 5•6 years ago
|
||
Alternatively this. Not sure which is better
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/fc3bc776f223 Port bug 1501404 (part 6): Replace use of NS_STARTTLSSOCKETPROVIDER_CONTRACTID. r=jorgk
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•6 years ago
|
||
Hm, actually to use startls it does some more checks - https://hg.mozilla.org/mozilla-central/rev/1766ed669623#l4.48 so perhaps the second version should be used?
Flags: needinfo?(jorgk)
Updated•6 years ago
|
Flags: needinfo?(jorgk)
Target Milestone: --- → Thunderbird 65.0
Comment 8•6 years ago
|
||
Umm, you attached the original patch again :-(
Comment 9•6 years ago
|
||
You're referring to: + } else if (!nsCRT::strcmp(type, "starttls") && + XRE_IsParentProcess() && + EnsureNSSInitializedChromeOrContent()) { + inst = new nsTLSSocketProvider(); Well, TB doesn't do e10s, so we don't need the XRE_IsParentProcess(). I don't know what the EnsureNSSInitializedChromeOrContent() is about.
Assignee | ||
Comment 10•6 years ago
|
||
Had forgot to qrefresh. I think this could be preferable. You never know if we start doing e10s one day
Attachment #9019616 -
Attachment is obsolete: true
Attachment #9019617 -
Flags: review?(jorgk)
Comment 11•6 years ago
|
||
Comment on attachment 9019617 [details] [diff] [review] bug1501589_NS_STARTTLSSOCKETPROVIDER_CONTRACTID.patch Yes, this compiles too and looks like the better solution. Sorry about the "trigger happy" landing. Any reason you moved the block up?
Attachment #9019617 -
Flags: review?(jorgk) → review+
Comment 12•6 years ago
|
||
Reshuffled this a bit. Also made it: sps = nsSocketProviderService::GetOrCreate(); if (!sps || NS_FAILED(sps->GetSocketProvider("starttls", getter_AddRefs(tlsSocketProvider)))) { The previous solution would have crashed if sps==null.
Attachment #9019614 -
Attachment is obsolete: true
Attachment #9019617 -
Attachment is obsolete: true
Attachment #9019624 -
Flags: review+
Comment 13•6 years ago
|
||
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/97346356d25c Backed out changeset fc3bc776f223 to make way for a better solution. a=backout https://hg.mozilla.org/comm-central/rev/3eb79f25d25b Port bug 1501404 (part 6): Replace use of NS_STARTTLSSOCKETPROVIDER_CONTRACTID. r=jorgk
Updated•5 years ago
|
Type: enhancement → task
You need to log in
before you can comment on or make changes to this bug.
Description
•