зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1326023 - Make Element::GetBindingURL return a strong reference. r=smaug
MozReview-Commit-ID: 5QI6UuvwDrE --HG-- extra : rebase_source : 42f7a481590020d4b7c30df7036cc922a5d9d275
This commit is contained in:
Родитель
7346feaa9c
Коммит
7a4522824d
|
@ -448,7 +448,6 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult)
|
|||
nsCOMPtr<nsIPresShell> shell = aDocument->GetShell();
|
||||
if (!shell || GetPrimaryFrame() || !isXULorPluginElement) {
|
||||
*aResult = nullptr;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -457,8 +456,7 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult)
|
|||
nsComputedDOMStyle::GetStyleContextForElementNoFlush(this, nullptr, shell);
|
||||
NS_ENSURE_TRUE(sc, false);
|
||||
|
||||
*aResult = sc->StyleDisplay()->mBinding;
|
||||
|
||||
NS_IF_ADDREF(*aResult = sc->StyleDisplay()->mBinding);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -535,8 +533,8 @@ Element::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
|
||||
// Make sure the style context goes away _before_ we load the binding
|
||||
// since that can destroy the relevant presshell.
|
||||
mozilla::css::URLValue *bindingURL;
|
||||
bool ok = GetBindingURL(doc, &bindingURL);
|
||||
RefPtr<css::URLValue> bindingURL;
|
||||
bool ok = GetBindingURL(doc, getter_AddRefs(bindingURL));
|
||||
if (!ok) {
|
||||
dom::Throw(aCx, NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
|
|
|
@ -387,7 +387,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult);
|
||||
bool GetBindingURL(nsIDocument* aDocument, css::URLValue **aResult);
|
||||
|
||||
// The bdi element defaults to dir=auto if it has no dir attribute set.
|
||||
// Other elements will only have dir=auto if they have an explicit dir=auto,
|
||||
|
|
Загрузка…
Ссылка в новой задаче