Make sure to propagate back the result of InstallImplementation and bail
if it fails. Bug 292944, r+sr=jst, a=asa
This commit is contained in:
Родитель
10fe0f8c6a
Коммит
c85bc2738e
|
@ -721,18 +721,22 @@ nsXBLBinding::InstallEventHandlers()
|
|||
mNextBinding->InstallEventHandlers();
|
||||
}
|
||||
|
||||
void
|
||||
nsresult
|
||||
nsXBLBinding::InstallImplementation()
|
||||
{
|
||||
// Always install the base class properties first, so that
|
||||
// derived classes can reference the base class properties.
|
||||
|
||||
if (mNextBinding)
|
||||
mNextBinding->InstallImplementation();
|
||||
|
||||
if (mNextBinding) {
|
||||
nsresult rv = mNextBinding->InstallImplementation();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
// iterate through each property in the prototype's list and install the property.
|
||||
if (AllowScripts())
|
||||
mPrototypeBinding->InstallImplementation(mBoundElement);
|
||||
return mPrototypeBinding->InstallImplementation(mBoundElement);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
void GenerateAnonymousContent();
|
||||
void InstallAnonymousContent(nsIContent* aAnonParent, nsIContent* aElement);
|
||||
void InstallEventHandlers();
|
||||
void InstallImplementation();
|
||||
nsresult InstallImplementation();
|
||||
|
||||
void ExecuteAttachedHandler();
|
||||
void ExecuteDetachedHandler();
|
||||
|
|
|
@ -639,7 +639,8 @@ nsXBLService::LoadBindings(nsIContent* aContent, nsIURI* aURL, PRBool aAugmentFl
|
|||
newBinding->InstallEventHandlers();
|
||||
|
||||
// Set up our properties
|
||||
newBinding->InstallImplementation();
|
||||
rv = newBinding->InstallImplementation();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Figure out if we need to execute a constructor.
|
||||
*aBinding = newBinding->GetFirstBindingWithConstructor();
|
||||
|
|
Загрузка…
Ссылка в новой задаче