web_prefrences() => dict()

Having property name being the same with class name is making code
harder to understand, and dict is much shorter.
This commit is contained in:
Cheng Zhao 2018-03-08 16:05:12 +09:00
parent d323ce2c42
commit 9772777919
6 changed files with 38 additions and 32 deletions

View file

@ -118,11 +118,10 @@ BrowserWindow::BrowserWindow(v8::Isolate* isolate,
WebContentsPreferences::FromWebContents(web_contents->web_contents());
base::DictionaryValue web_preferences_dict;
if (mate::ConvertFromV8(isolate, web_preferences.GetHandle(),
&web_preferences_dict)) {
existing_preferences->web_preferences()->Clear();
&web_preferences_dict)) {
existing_preferences->dict()->Clear();
existing_preferences->Merge(web_preferences_dict);
}
} else {
// Creates the WebContents used by BrowserWindow.
web_contents = WebContents::Create(isolate, web_preferences);