nsGlobalWindow::GetGroupMessageManager does unnecessary hashtable lookups

RESOLVED FIXED in Firefox 56

Status

()

Core
DOM: Core & HTML
P2
normal
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: Mats Palmgren (vacation - back in August), Assigned: Mats Palmgren (vacation - back in August))

Tracking

({perf})

Trunk
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 8876770 [details] [diff] [review]
Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups
Attachment #8876770 - Flags: review?(nfroyd)
Comment on attachment 8876770 [details] [diff] [review]
Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups

Review of attachment 8876770 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsGlobalWindow.cpp
@@ +14486,5 @@
>    MOZ_ASSERT(IsChromeWindow());
>    MOZ_RELEASE_ASSERT(IsInnerWindow());
>  
>    nsGlobalChromeWindow* myself = static_cast<nsGlobalChromeWindow*>(this);
>    nsCOMPtr<nsIMessageBroadcaster> messageManager =

Would be nice if we passed this ref out of the function rather than returning a raw pointer, too.  Followup bug?
Attachment #8876770 - Flags: review?(nfroyd) → review+
(In reply to Nathan Froyd [:froydnj] from comment #2)
> Would be nice if we passed this ref out of the function rather than
> returning a raw pointer, too.  Followup bug?

Filed bug 1372764.

Comment 4

2 months ago
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a0434f8d2cf1
Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups.  r=froydnj
https://hg.mozilla.org/mozilla-central/rev/a0434f8d2cf1
Status: NEW → RESOLVED
Last Resolved: 2 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.