зеркало из https://github.com/mozilla/pjs.git
Fix crash on skin switching. r=ben
This commit is contained in:
Родитель
14f013552f
Коммит
b070ce7be3
|
@ -585,19 +585,21 @@ nsXBLEventHandler::RemoveEventHandlers()
|
|||
if (mNextHandler)
|
||||
mNextHandler->RemoveEventHandlers();
|
||||
|
||||
if (mEventName == NS_LITERAL_STRING("bindingattached") ||
|
||||
mEventName == NS_LITERAL_STRING("bindingdetached")) {
|
||||
// Release and drop.
|
||||
NS_RELEASE_THIS();
|
||||
return;
|
||||
}
|
||||
|
||||
// Figure out if we're using capturing or not.
|
||||
if (!mProtoHandler)
|
||||
return;
|
||||
|
||||
if (mEventName == NS_LITERAL_STRING("bindingattached") ||
|
||||
mEventName == NS_LITERAL_STRING("bindingdetached")) {
|
||||
// Release and drop.
|
||||
mProtoHandler = nsnull;
|
||||
NS_RELEASE_THIS();
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> handlerElement;
|
||||
mProtoHandler->GetHandlerElement(getter_AddRefs(handlerElement));
|
||||
mProtoHandler = nsnull;
|
||||
if (!handlerElement)
|
||||
return;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ protected:
|
|||
|
||||
protected:
|
||||
nsIDOMEventReceiver* mEventReceiver; // Both of these refs are weak.
|
||||
nsIXBLPrototypeHandler* mProtoHandler;
|
||||
nsCOMPtr<nsIXBLPrototypeHandler> mProtoHandler;
|
||||
|
||||
nsAutoString mEventName;
|
||||
|
||||
|
|
|
@ -585,19 +585,21 @@ nsXBLEventHandler::RemoveEventHandlers()
|
|||
if (mNextHandler)
|
||||
mNextHandler->RemoveEventHandlers();
|
||||
|
||||
if (mEventName == NS_LITERAL_STRING("bindingattached") ||
|
||||
mEventName == NS_LITERAL_STRING("bindingdetached")) {
|
||||
// Release and drop.
|
||||
NS_RELEASE_THIS();
|
||||
return;
|
||||
}
|
||||
|
||||
// Figure out if we're using capturing or not.
|
||||
if (!mProtoHandler)
|
||||
return;
|
||||
|
||||
if (mEventName == NS_LITERAL_STRING("bindingattached") ||
|
||||
mEventName == NS_LITERAL_STRING("bindingdetached")) {
|
||||
// Release and drop.
|
||||
mProtoHandler = nsnull;
|
||||
NS_RELEASE_THIS();
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> handlerElement;
|
||||
mProtoHandler->GetHandlerElement(getter_AddRefs(handlerElement));
|
||||
mProtoHandler = nsnull;
|
||||
if (!handlerElement)
|
||||
return;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ protected:
|
|||
|
||||
protected:
|
||||
nsIDOMEventReceiver* mEventReceiver; // Both of these refs are weak.
|
||||
nsIXBLPrototypeHandler* mProtoHandler;
|
||||
nsCOMPtr<nsIXBLPrototypeHandler> mProtoHandler;
|
||||
|
||||
nsAutoString mEventName;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче