зеркало из https://github.com/mozilla/pjs.git
fix for #7344. check for nsnull before dereferencing.
This commit is contained in:
Родитель
2caf63e2ca
Коммит
9cea6738a5
|
@ -2268,9 +2268,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
//Capturing stage
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
|
||||
nsIScriptGlobalObject* mGlobal;
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
if (mScriptContextOwner != nsnull) {
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2268,9 +2268,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
//Capturing stage
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
|
||||
nsIScriptGlobalObject* mGlobal;
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
if (mScriptContextOwner != nsnull) {
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче