Closed Bug 489581 Opened 11 years ago Closed 11 years ago
Reduce Addref/Release when calling event handlers
Depending on the case this speeds up event handling up to 6-7%. Usually a lot less. I need to run tests...
Btw, I found this while debugging nsCxPusher::Push/JSContextStack::Push
Assignee: nobody → Olli.Pettay
Comment on attachment 374070 [details] [diff] [review] patch Passed the tests. So I'm swapping out-param and return value. Even though changes to nsContentUtils::GetContextForEventHandlers are simple, it needs to be reviewed carefully. NS_ENSURE_SUCCESS in nsXHREventTarget::AddEventListener isn't actually a must-have, but since I added the comment that caller must check the rv value...
Comment on attachment 374070 [details] [diff] [review] patch Looks good to me, and I did look through nsContentUtils::GetContextForEventHandlers() in detail as well.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.