fix: use try/catch for base class converter error (#24246)
This commit is contained in:
parent
446100cdfe
commit
cadc142d05
1 changed files with 8 additions and 4 deletions
|
@ -98,10 +98,14 @@ BaseWindow::BaseWindow(v8::Isolate* isolate,
|
||||||
window_->AddObserver(this);
|
window_->AddObserver(this);
|
||||||
|
|
||||||
#if defined(TOOLKIT_VIEWS)
|
#if defined(TOOLKIT_VIEWS)
|
||||||
// Sets the window icon.
|
{
|
||||||
gin::Handle<NativeImage> icon;
|
v8::TryCatch try_catch(isolate);
|
||||||
if (options.Get(options::kIcon, &icon) && !icon.IsEmpty())
|
gin::Handle<NativeImage> icon;
|
||||||
SetIcon(icon);
|
if (options.Get(options::kIcon, &icon) && !icon.IsEmpty())
|
||||||
|
SetIcon(icon);
|
||||||
|
if (try_catch.HasCaught())
|
||||||
|
LOG(ERROR) << "Failed to convert NativeImage";
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue