refactor: WebContents::From returns pointer (#24605)

This commit is contained in:
Jeremy Rose 2020-07-16 16:16:05 -07:00 committed by GitHub
parent 14bbc07f1e
commit 45551f6bf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 48 additions and 63 deletions

View file

@ -712,9 +712,9 @@ bool App::CanCreateWindow(
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(opener);
if (web_contents) {
auto api_web_contents = WebContents::From(isolate(), web_contents);
WebContents* api_web_contents = WebContents::From(web_contents);
// No need to emit any event if the WebContents is not available in JS.
if (!api_web_contents.IsEmpty()) {
if (api_web_contents) {
api_web_contents->OnCreateWindow(target_url, referrer, frame_name,
disposition, raw_features, body);
}