fix NativeImage size hint crashing when image is created from path
This commit is contained in:
parent
a76a4ddff2
commit
bf58373a40
1 changed files with 4 additions and 2 deletions
|
@ -217,8 +217,10 @@ NativeImage::NativeImage(v8::Isolate* isolate, const base::FilePath& hicon_path)
|
||||||
ReadImageSkiaFromICO(&image_skia, GetHICON(256));
|
ReadImageSkiaFromICO(&image_skia, GetHICON(256));
|
||||||
image_ = gfx::Image(image_skia);
|
image_ = gfx::Image(image_skia);
|
||||||
Init(isolate);
|
Init(isolate);
|
||||||
|
if (image_.HasRepresentation(gfx::Image::kImageRepSkia)) {
|
||||||
isolate->AdjustAmountOfExternalAllocatedMemory(
|
isolate->AdjustAmountOfExternalAllocatedMemory(
|
||||||
image_.ToImageSkia()->bitmap()->computeSize64());
|
image_.ToImageSkia()->bitmap()->computeSize64());
|
||||||
|
}
|
||||||
MarkHighMemoryUsage();
|
MarkHighMemoryUsage();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue