perf: avoid redundant map lookup in WebFrameMain
constructor (#46238)
perf: avoid double map lookup in WebFrameMain constructor
This commit is contained in:
parent
c8d3184a95
commit
6e44662f15
1 changed files with 2 additions and 2 deletions
|
@ -155,8 +155,8 @@ WebFrameMain::WebFrameMain(content::RenderFrameHost* rfh)
|
|||
if (!render_frame_detached_)
|
||||
GetFrameTreeNodeIdMap().emplace(frame_tree_node_id_, this);
|
||||
|
||||
DCHECK(!GetFrameTokenMap().contains(frame_token_));
|
||||
GetFrameTokenMap().emplace(frame_token_, this);
|
||||
const auto [_, inserted] = GetFrameTokenMap().emplace(frame_token_, this);
|
||||
DCHECK(inserted);
|
||||
|
||||
// WebFrameMain should only be created for active or unloading frames.
|
||||
DCHECK(GetLifecycleState(rfh) == LifecycleState::kActive ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue