| Index: chrome/browser/web_applications/update_shortcut_worker_win.cc
|
| diff --git a/chrome/browser/web_applications/update_shortcut_worker_win.cc b/chrome/browser/web_applications/update_shortcut_worker_win.cc
|
| index 9d3ae82e31c0af696a6d777e72b06e2e171d38fb..2c91af53b41866ea48a38c0a91a1915798a34f33 100644
|
| --- a/chrome/browser/web_applications/update_shortcut_worker_win.cc
|
| +++ b/chrome/browser/web_applications/update_shortcut_worker_win.cc
|
| @@ -86,6 +86,10 @@ void UpdateShortcutWorker::DownloadIcon() {
|
|
|
| if (unprocessed_icons_.empty()) {
|
| // No app icon. Just use the favicon from WebContents.
|
| + // TODO(mgiuca): This Image is passed to the FILE thread while still being
|
| + // used on the UI thread. This is not thread-safe and needs to be fixed.
|
| + // Remove this thread-check disable. https://crbug.com/596348.
|
| + shortcut_info_->favicon.DisableThreadChecking();
|
| UpdateShortcuts();
|
| return;
|
| }
|
| @@ -130,7 +134,10 @@ void UpdateShortcutWorker::DidDownloadFavicon(
|
|
|
| if (!bitmap.isNull()) {
|
| // Update icon with download image and update shortcut.
|
| - shortcut_info_->favicon.Add(gfx::Image::CreateFrom1xBitmap(bitmap));
|
| + gfx::Image icon = gfx::Image::CreateFrom1xBitmap(bitmap);
|
| + // |icon| will be used on the FILE thread, so detach it from this thread.
|
| + icon.DetachFromThread();
|
| + shortcut_info_->favicon.Add(icon);
|
| extensions::TabHelper* extensions_tab_helper =
|
| extensions::TabHelper::FromWebContents(web_contents_);
|
| extensions_tab_helper->SetAppIcon(bitmap);
|
|
|