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

* fix: remove ipc wrapper for nativeImage.createThumbnailFromPath

* ScopedCOMInitializer

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
This commit is contained in:
trop[bot]
2021-08-30 19:31:40 +09:00
committed by GitHub
parent a2ae0e16b5
commit 2c406ff566
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;