fix: remove ipc wrapper for nativeImage.createThumbnailFromPath (#30728)

This commit is contained in:
Jeremy Rose 2021-08-27 21:21:36 +00:00 committed by GitHub
parent 352ac21413
commit aa9da78edb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 14 deletions

View file

@ -9,6 +9,7 @@
#include <thumbcache.h>
#include <wrl/client.h>
#include "base/win/scoped_com_initializer.h"
#include "shell/common/gin_converters/image_converter.h"
#include "shell/common/gin_helper/promise.h"
#include "shell/common/skia_util.h"
@ -25,6 +26,8 @@ v8::Local<v8::Promise> NativeImage::CreateThumbnailFromPath(
v8::Isolate* isolate,
const base::FilePath& path,
const gfx::Size& size) {
base::win::ScopedCOMInitializer scoped_com_initializer;
gin_helper::Promise<gfx::Image> promise(isolate);
v8::Local<v8::Promise> handle = promise.GetHandle();
HRESULT hr;