refactor: omit redundant map searches (#19929)
* refactor: don't walk maps twice to remove elements * refactor: don't walk maps twice to read elements * refactor: don't walk maps twice to insert elements * refactor: don't walk map 3x on UvTaskRunner timeout * refactor: more don't-walk-maps-twice cleanup * fixup! refactor: don't walk maps twice to insert elements * refactor: don't walk containers twice when erasing * refactor: omit excess lookups in RemoteObjectFreer
This commit is contained in:
parent
27ce6a9cd3
commit
987300c97a
14 changed files with 88 additions and 86 deletions
|
@ -197,8 +197,9 @@ content::WebContents* AtomBrowserClient::GetWebContentsFromProcessID(
|
|||
int process_id) {
|
||||
// If the process is a pending process, we should use the web contents
|
||||
// for the frame host passed into RegisterPendingProcess.
|
||||
if (base::Contains(pending_processes_, process_id))
|
||||
return pending_processes_[process_id];
|
||||
const auto iter = pending_processes_.find(process_id);
|
||||
if (iter != std::end(pending_processes_))
|
||||
return iter->second;
|
||||
|
||||
// Certain render process will be created with no associated render view,
|
||||
// for example: ServiceWorker.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue