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:
parent
d323ce2c42
commit
9772777919
6 changed files with 38 additions and 32 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue