Closed Bug 1372262 Opened 7 years ago Closed 7 years ago

nsGlobalWindow::GetGroupMessageManager does unnecessary hashtable lookups

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: perf)

Attachments

(1 file)

      No description provided.
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.
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
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: