Closed
Bug 1393885
Opened 7 years ago
Closed 7 years ago
provide a faster path for do_GetWeakReference
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file)
3.02 KB,
patch
|
erahm
:
review+
|
Details | Diff | Splinter Review |
NS_GetWeakReference, called from do_GetWeakReference, QI's its argument to nsISupportsWeakReference to determine whether a weak reference can be obtained. If NS_GetWeakReference is already receiving a nsISupportsWeakReference pointer, or something than can be converted to one, then we can skip the QI for a small performance win.
Assignee | ||
Comment 1•7 years ago
|
||
This only fires in ~5% of all calls to do_GetWeakReference, but it's an easy win. I thought about trying to factor the common code out of the NS_GetWeakReference implementations, but decided it wasn't worth it. If you feel differently, I can try to do that.
Attachment #8901274 -
Flags: review?(erahm)
Comment 2•7 years ago
|
||
Comment on attachment 8901274 [details] [diff] [review] provide a faster path for do_GetWeakReference Review of attachment 8901274 [details] [diff] [review]: ----------------------------------------------------------------- Sorry I looked at this earlier, but forgot to r+
Attachment #8901274 -
Flags: review?(erahm) → review+
Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f56376db333b provide a faster path for do_GetWeakReference; r=erahm
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f56376db333b
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•