summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-06-27 14:10:49 +0200
committerGitHub <noreply@github.com>2018-06-27 14:10:49 +0200
commit9168a0fc95f523c7c852ca95969edb39069f4a03 (patch)
treed9e7ea0c5086235d0cfa7a7cc34f1760a4d74bb4 /dom
parenta3724697dc38820c4918b9e674ff56d2c15c5bba (diff)
parent783b60aae187d75c8c1924eceec8c4c56aa40c5e (diff)
downloadUXP-9168a0fc95f523c7c852ca95969edb39069f4a03.tar
UXP-9168a0fc95f523c7c852ca95969edb39069f4a03.tar.gz
UXP-9168a0fc95f523c7c852ca95969edb39069f4a03.tar.lz
UXP-9168a0fc95f523c7c852ca95969edb39069f4a03.tar.xz
UXP-9168a0fc95f523c7c852ca95969edb39069f4a03.zip
Merge pull request #554 from MoonchildProductions/issue12
Resolve potential null deref crashes in the editor
Diffstat (limited to 'dom')
-rwxr-xr-xdom/events/Event.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp
index 4b9776c0a..f33bfa5a8 100755
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -280,16 +280,10 @@ Event::GetType(nsAString& aType)
return NS_OK;
}
-static EventTarget*
-GetDOMEventTarget(nsIDOMEventTarget* aTarget)
-{
- return aTarget ? aTarget->GetTargetForDOMEvent() : nullptr;
-}
-
EventTarget*
Event::GetTarget() const
{
- return GetDOMEventTarget(mEvent->mTarget);
+ return mEvent->GetDOMEventTarget();
}
NS_IMETHODIMP
@@ -302,7 +296,7 @@ Event::GetTarget(nsIDOMEventTarget** aTarget)
EventTarget*
Event::GetCurrentTarget() const
{
- return GetDOMEventTarget(mEvent->mCurrentTarget);
+ return mEvent->GetCurrentDOMEventTarget();
}
NS_IMETHODIMP
@@ -349,11 +343,7 @@ Event::GetExplicitOriginalTarget(nsIDOMEventTarget** aRealEventTarget)
EventTarget*
Event::GetOriginalTarget() const
{
- if (mEvent->mOriginalTarget) {
- return GetDOMEventTarget(mEvent->mOriginalTarget);
- }
-
- return GetTarget();
+ return mEvent->GetOriginalDOMEventTarget();
}
NS_IMETHODIMP