mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user