Skip to content

Commit

Permalink
Use Clone explicitly instead of MergeDictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Mar 22, 2018
1 parent 0abbedc commit 05fcec8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions atom/browser/web_contents_preferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ WebContentsPreferences::WebContentsPreferences(
#endif
SetDefaultBoolIfUndefined("offscreen", false);

last_dict_.MergeDictionary(&web_preferences_);
last_dict_ = std::move(*dict_.CreateDeepCopy());
}

WebContentsPreferences::~WebContentsPreferences() {
Expand Down Expand Up @@ -256,8 +256,7 @@ void WebContentsPreferences::AppendCommandLineSwitches(
// We are appending args to a webContents so let's save the current state
// of our preferences object so that during the lifetime of the WebContents
// we can fetch the options used to initally configure the WebContents
last_dict_.Clear();
last_dict_.MergeDictionary(&dict_);
last_dict_ = std::move(*dict_.CreateDeepCopy());
}

void WebContentsPreferences::OverrideWebkitPrefs(
Expand Down

0 comments on commit 05fcec8

Please sign in to comment.