fix NativeImage size hint crashing when image is created from path

This commit is contained in:
Heilig Benedek 2017-05-11 11:38:34 +02:00
parent a76a4ddff2
commit bf58373a40

View file

@ -217,8 +217,10 @@ NativeImage::NativeImage(v8::Isolate* isolate, const base::FilePath& hicon_path)
ReadImageSkiaFromICO(&image_skia, GetHICON(256));
image_ = gfx::Image(image_skia);
Init(isolate);
if (image_.HasRepresentation(gfx::Image::kImageRepSkia)) {
isolate->AdjustAmountOfExternalAllocatedMemory(
image_.ToImageSkia()->bitmap()->computeSize64());
}
MarkHighMemoryUsage();
}
#endif