refactor: consolidate WebContents::{Create,New} (#26521)

This commit is contained in:
Jeremy Rose 2020-11-17 14:14:33 -08:00 committed by GitHub
parent a303813d15
commit 92643a5a1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 15 deletions

View file

@ -79,7 +79,7 @@ BrowserView::BrowserView(gin::Arguments* args,
options.Get(options::kWebPreferences, &web_preferences);
web_preferences.Set("type", "browserView");
gin::Handle<class WebContents> web_contents =
WebContents::Create(isolate, web_preferences);
WebContents::New(isolate, web_preferences);
web_contents_.Reset(isolate, web_contents.ToV8());
api_web_contents_ = web_contents.get();