Get it compiling, linking till fails though
authorYury Solovyov <biohazard707@gmail.com>
Sun, 30 Oct 2016 11:56:22 +0000 (14:56 +0300)
committerKevin Sawicki <kevinsawicki@gmail.com>
Tue, 7 Feb 2017 17:48:12 +0000 (09:48 -0800)
atom/common/api/atom_api_native_image.cc
atom/common/api/atom_api_native_image.h

index 3f6f830e14b9aafa5a87e864a9880bb992bacb57..33c38eac00e49c8d6f58717f382077dd7ad1df37 100644 (file)
@@ -308,7 +308,9 @@ void NativeImage::CreateFromFileIcon(v8::Isolate* isolate,
                                      const IconLoadedCallback& callback) {
   IconLoader::IconSize icon_size = IconLoader::IconSize::NORMAL;
   float scale_factor = 1.0f;
-  auto onready = base::Bind(&NativeImage::OnIconLoaded, isolate, callback);
+  auto onready = base::Bind(&NativeImage::OnIconLoaded,
+                            base::Unretained(isolate),
+                            callback);
   FileIconFetcher::FetchFileIcon(path, scale_factor, icon_size, onready);
 }
 
index d0474835eba77c24e2255022bb3473ee34b3d6c6..2b8cbf7a2ed2816c20b049d18952629bc2e2650a 100644 (file)
@@ -90,7 +90,7 @@ class NativeImage : public mate::Wrappable<NativeImage> {
   gfx::Size GetSize();
   float GetAspectRatio();
 
-  void OnIconLoaded(v8::Isolate* isolate,
+  static void OnIconLoaded(v8::Isolate* isolate,
                     const IconLoadedCallback& callback,
                     gfx::Image& image);
   // Mark the image as template image.