Bug 1487082 - fix 'cannot be captured by a lambda' error in nsLDAPURL.cpp. r=bcampbell
authorJorg K <jorgk@jorgk.com>
Wed, 19 Sep 2018 08:36:50 +0200
changeset 33185 f2758a1d5320e382435e089e2df3920e9d4e21c5
parent 33184 743a00e211a5d8d13eac398b39fa1e0d43c66c14
child 33186 4d57e86cdce5865c1071ff2b05c735b6ee302717
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbcampbell
bugs1487082
Bug 1487082 - fix 'cannot be captured by a lambda' error in nsLDAPURL.cpp. r=bcampbell
ldap/xpcom/src/nsLDAPURL.cpp
--- a/ldap/xpcom/src/nsLDAPURL.cpp
+++ b/ldap/xpcom/src/nsLDAPURL.cpp
@@ -32,21 +32,22 @@ nsLDAPURL::~nsLDAPURL()
 }
 
 nsresult
 nsLDAPURL::Init(uint32_t aUrlType, int32_t aDefaultPort,
                 const nsACString &aSpec, const char* aOriginCharset,
                 nsIURI *aBaseURI)
 {
   nsresult rv;
+  nsCOMPtr<nsIURI> base(aBaseURI);
   rv = NS_MutateURI(NS_STANDARDURLMUTATOR_CONTRACTID)
          .Apply(NS_MutatorMethod(&nsIStandardURLMutator::Init,
                                  nsIStandardURL::URLTYPE_STANDARD,
                                  aDefaultPort, PromiseFlatCString(aSpec),
-                                 aOriginCharset, aBaseURI, nullptr))
+                                 aOriginCharset, base, nullptr))
          .Finalize(mBaseURL);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Now get the spec from the mBaseURL in case it was a relative one
   nsCString spec;
   rv = mBaseURL->GetSpec(spec);
   NS_ENSURE_SUCCESS(rv, rv);