mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Fix crash on skin switching. r=ben
This commit is contained in:
parent
be4ff1fbf1
commit
ba7b94b9b1
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user