diff options
author | Pale Moon <git-repo@palemoon.org> | 2015-09-22 20:11:01 +0200 |
---|---|---|
committer | Pale Moon <git-repo@palemoon.org> | 2015-09-22 20:11:01 +0200 |
commit | 379ae0a2eec244a018ec50f9e2adc4e043dbefa8 (patch) | |
tree | 231a03d047ca95751c0f8178db1ce40d74dd9f2a /content | |
parent | 032cafa6c4552c94d07a5613df46050f00acfbae (diff) | |
download | palemoon-gre-379ae0a2eec244a018ec50f9e2adc4e043dbefa8.tar.gz |
Make nsXBLService::GetBinding deal with shutting down during binding loading.
Diffstat (limited to 'content')
-rw-r--r-- | content/xbl/src/nsXBLService.cpp | 8 | ||||
-rw-r--r-- | content/xbl/src/nsXBLService.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/content/xbl/src/nsXBLService.cpp b/content/xbl/src/nsXBLService.cpp index 9b8bade21..54dc4d91e 100644 --- a/content/xbl/src/nsXBLService.cpp +++ b/content/xbl/src/nsXBLService.cpp @@ -684,7 +684,7 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI, bool* aIsReady, nsXBLBinding** aResult) { // More than 6 binding URIs are rare, see bug 55070 comment 18. - nsAutoTArray<nsIURI*, 6> uris; + nsAutoTArray<nsCOMPtr<nsIURI>, 6> uris; return GetBinding(aBoundElement, aURI, aPeekOnly, aOriginPrincipal, aIsReady, aResult, uris); } @@ -740,7 +740,7 @@ nsresult nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI, bool aPeekOnly, nsIPrincipal* aOriginPrincipal, bool* aIsReady, nsXBLBinding** aResult, - nsTArray<nsIURI*>& aDontExtendURIs) + nsTArray<nsCOMPtr<nsIURI>>& aDontExtendURIs) { NS_ASSERTION(aPeekOnly || aResult, "Must have non-null out param if not just peeking to see " @@ -818,7 +818,7 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI, rv = protoBinding->ResolveBaseBinding(); NS_ENSURE_SUCCESS(rv, rv); - nsIURI* baseBindingURI; + nsCOMPtr<nsIURI> baseBindingURI; nsXBLPrototypeBinding* baseProto = protoBinding->GetBasePrototype(); if (baseProto) { baseBindingURI = baseProto->BindingURI(); @@ -864,6 +864,8 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI, if (!aPeekOnly) { // Make a new binding + protoBinding = docInfo->GetPrototypeBinding(ref); + NS_ENSURE_STATE(protoBinding); nsXBLBinding *newBinding = new nsXBLBinding(protoBinding); NS_ENSURE_TRUE(newBinding, NS_ERROR_OUT_OF_MEMORY); diff --git a/content/xbl/src/nsXBLService.h b/content/xbl/src/nsXBLService.h index 573fd0a58..1ebcc1c57 100644 --- a/content/xbl/src/nsXBLService.h +++ b/content/xbl/src/nsXBLService.h @@ -116,7 +116,7 @@ protected: nsresult GetBinding(nsIContent* aBoundElement, nsIURI* aURI, bool aPeekFlag, nsIPrincipal* aOriginPrincipal, bool* aIsReady, nsXBLBinding** aResult, - nsTArray<nsIURI*>& aDontExtendURIs); + nsTArray<nsCOMPtr<nsIURI>>& aDontExtendURIs); // MEMBER VARIABLES public: |