refactor: WebContents::From returns pointer (#24605)
This commit is contained in:
parent
14bbc07f1e
commit
45551f6bf2
14 changed files with 48 additions and 63 deletions
|
@ -31,8 +31,8 @@ ElectronNavigationThrottle::WillRedirectRequest() {
|
|||
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
auto api_contents = electron::api::WebContents::From(isolate, contents);
|
||||
if (api_contents.IsEmpty()) {
|
||||
api::WebContents* api_contents = api::WebContents::From(contents);
|
||||
if (!api_contents) {
|
||||
// No need to emit any event if the WebContents is not available in JS.
|
||||
return PROCEED;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue