Do not throw if the named image can not be found
This commit is contained in:
parent
ec610cd97b
commit
767a178bd1
2 changed files with 0 additions and 2 deletions
|
@ -544,7 +544,6 @@ mate::Handle<NativeImage> NativeImage::CreateFromDataURL(
|
|||
#if !defined(OS_MACOSX)
|
||||
mate::Handle<NativeImage> NativeImage::CreateFromNamedImage(
|
||||
mate::Arguments* args, const std::string& name) {
|
||||
args->ThrowError("Cannot create NativeImage from a name on non-darwin platforms");
|
||||
return CreateEmpty(args->isolate());
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -17,7 +17,6 @@ mate::Handle<NativeImage> NativeImage::CreateFromNamedImage(
|
|||
@autoreleasepool {
|
||||
NSImage* image = [NSImage imageNamed:base::SysUTF8ToNSString(name)];
|
||||
if (!image.valid) {
|
||||
args->ThrowError("Cannot create image from name: " + name);
|
||||
return CreateEmpty(args->isolate());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue