mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1348222 - Assign 'mScrollEvent' while 'ev' still has a non-null value. r=smaug
MozReview-Commit-ID: 3OsNlgHFEzM
This commit is contained in:
parent
67d7b8af2a
commit
4ef842400f
@ -6185,6 +6185,7 @@ Selection::PostScrollSelectionIntoViewEvent(
|
||||
RefPtr<ScrollSelectionIntoViewEvent> ev =
|
||||
new ScrollSelectionIntoViewEvent(this, aRegion, aVertical, aHorizontal,
|
||||
aFlags);
|
||||
mScrollEvent = ev;
|
||||
nsresult rv;
|
||||
nsIDocument* doc = GetParentObject();
|
||||
if (doc) {
|
||||
@ -6195,10 +6196,10 @@ Selection::PostScrollSelectionIntoViewEvent(
|
||||
rv = NS_DispatchToCurrentThread(ev);
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mScrollEvent = ev;
|
||||
return NS_OK;
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
mScrollEvent = nullptr; // no need to hold on to the event
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user