Memory leak and unnecessary copies in PresShell touch-event handling code

RESOLVED FIXED in mozilla17

Status

()

Core
Layout
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cjones, Assigned: wesj)

Tracking

Trunk
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Memory leak

 http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#5559

Unnecessary copies

 http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#6503
 http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#6553

(Since nsIDOMTouch is cycle collected, I think these unref's can be relatively expensive.)

Wes, want to grab these?
(Assignee)

Updated

5 years ago
Assignee: nobody → wjohnston
(Assignee)

Comment 1

5 years ago
Created attachment 643424 [details] [diff] [review]
Patch

I think this is right?
Attachment #643424 - Flags: review?(bugs)
Comment on attachment 643424 [details] [diff] [review]
Patch

Why not 

nsPoint pt(aTouch->mRefPoint.x, aTouch->mRefPoint.y);
widget = frame->GetView()->GetNearestWidget(&pt);
(Assignee)

Comment 3

5 years ago
Created attachment 643427 [details] [diff] [review]
Patch v2

I'm fine with that. Tested on Google maps. Everythings still good.
Attachment #643424 - Attachment is obsolete: true
Attachment #643424 - Flags: review?(bugs)
Attachment #643427 - Flags: review?(bugs)
Attachment #643427 - Flags: review?(bugs) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/1341ea4e3c80
https://hg.mozilla.org/mozilla-central/rev/1341ea4e3c80
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.