Bug 1372029 - Use EnsureInserted instead of Contains+PutEntry to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 7p0ZFLVGFEY
This commit is contained in:
@@ -933,11 +933,7 @@ nsHtml5TreeOpExecutor::ShouldPreloadURI(nsIURI *aURI)
|
||||
nsAutoCString spec;
|
||||
nsresult rv = aURI->GetSpec(spec);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
if (mPreloadedURLs.Contains(spec)) {
|
||||
return false;
|
||||
}
|
||||
mPreloadedURLs.PutEntry(spec);
|
||||
return true;
|
||||
return mPreloadedURLs.EnsureInserted(spec);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user