Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: campersau <[email protected]>
  • Loading branch information
amaitland and campersau committed Jan 31, 2025
1 parent 961dc2a commit fcc0cdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions CefSharp/Internals/LegacyJavaScriptObjectCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ public void InsertOrUpdate(int browserId, IList<JavascriptObject> javascriptObje
{
foreach (var obj in javascriptObjects)
{
if (cache.ContainsKey(obj.Name))
{
cache.Remove(obj.Name);
}

cache.Add(obj.Name, obj);
cache[obj.Name] = obj;
}
}

Expand Down
7 changes: 1 addition & 6 deletions CefSharp/Internals/PerBrowserJavaScriptObjectCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ public void InsertOrUpdate(int browserId, IList<JavascriptObject> javascriptObje

foreach (var obj in javascriptObjects)
{
if (dict.ContainsKey(obj.Name))
{
dict.Remove(obj.Name);
}

dict.Add(obj.Name, obj);
dict[obj.Name] = obj;
}
}

Expand Down

0 comments on commit fcc0cdb

Please sign in to comment.