make sure mScriptContextOwner isn't NULL (apologies to sspitzer, made the test consistent with line #2283, hope you don't mind)
git-svn-id: svn://10.0.0.236/trunk@33252 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2266,13 +2266,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext,
|
||||
}
|
||||
|
||||
//Capturing stage
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags && nsnull != mScriptContextOwner) {
|
||||
nsIScriptGlobalObject* mGlobal;
|
||||
if (mScriptContextOwner != nsnull) {
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2266,13 +2266,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext,
|
||||
}
|
||||
|
||||
//Capturing stage
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags && nsnull != mScriptContextOwner) {
|
||||
nsIScriptGlobalObject* mGlobal;
|
||||
if (mScriptContextOwner != nsnull) {
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user