mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1699098 - Avoid double hashtable lookup in generated RemoveManagee code. r=ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D108768
This commit is contained in:
parent
80fd24eaab
commit
43b7a1eb09
@ -4321,14 +4321,9 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
||||
"""
|
||||
{
|
||||
${manageecxxtype} actor = static_cast<${manageecxxtype}>(aListener);
|
||||
auto& container = ${container};
|
||||
|
||||
// Use a temporary variable here so all the assertion expressions
|
||||
// in the MOZ_RELEASE_ASSERT call below are textually identical;
|
||||
// the linker can then merge the strings from the assertion macro(s).
|
||||
MOZ_RELEASE_ASSERT(container.Contains(actor),
|
||||
"actor not managed by this!");
|
||||
container.RemoveEntry(actor);
|
||||
const bool removed = ${container}.EnsureRemoved(actor);
|
||||
MOZ_RELEASE_ASSERT(removed, "actor not managed by this!");
|
||||
|
||||
auto* proxy = actor->GetLifecycleProxy();
|
||||
NS_IF_RELEASE(proxy);
|
||||
|
Loading…
Reference in New Issue
Block a user