New issue
Advanced search Search tips

Issue 733463 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 708303



Sign in to add a comment

MigrateTaskbarPins needs to use a COM STA Task Runner

Project Member Reported by robliao@chromium.org, Jun 15 2017

Issue description

void MigrateTaskbarPins() {
  [...]
  base::PostTaskWithTraits(FROM_HERE,
                           {base::MayBlock(), base::TaskPriority::BACKGROUND},
                           base::Bind(&MigrateTaskbarPinsCallback));
}

MigrateTaskbarPinsCallback ends up calling CoCreateInstance.

0:043> kn20
 # ChildEBP RetAddr
00 2544e164 10102d0a base!base::debug::BreakDebugger+0x17
01 2544e6e8 103ae4a5 base!logging::LogMessage::~LogMessage+0x3ca
02 2544e7b4 103adb78 base!base::win::AssertComInitialized+0x95
03 2544e7bc 103c18df base!base::win::`anonymous namespace'::HookManager::DCheckedCoCreateInstance+0x8
04 2544ede0 103c16c1 base!base::win::ResolveShortcutProperties+0x14f
05 2544ef6c 06d300d5 base!base::win::ResolveShortcut+0xe1
06 2544f714 06d30b3d chrome_30d0000!shell_integration::win::MigrateShortcutsInPathInternal+0xe5
07 2544f818 03d4d066 chrome_30d0000!shell_integration::`anonymous namespace'::MigrateTaskbarPinsCallback+0xed
08 2544f820 03d4d717 chrome_30d0000!base::internal::FunctorTraits<void (__cdecl*)(void),void>::Invoke<>+0x6
09 2544f82c 03d4da95 chrome_30d0000!base::internal::InvokeHelper<0,void>::MakeItSo<void (__cdecl*const &)(void)>+0x17
0a 2544f838 03d59c34 chrome_30d0000!base::internal::Invoker<base::internal::BindState<void (__cdecl*)(void)>,void __cdecl(void)>::RunImpl<void (__cdecl*const &)(void),std::tuple<> const &>+0x15
0b 2544f854 1004ac85 chrome_30d0000!base::internal::Invoker<base::internal::BindState<void (__cdecl*)(void)>,void __cdecl(void)>::Run+0x24
0c 2544f86c 100b56ec base!base::Callback<void __cdecl(void),0,0>::Run+0x35
0d 2544f93c 1026a685 base!base::debug::TaskAnnotator::RunTask+0x1dc
0e 2544fb58 1026adfc base!base::internal::TaskTracker::PerformRunTask+0x4c5
0f 2544fce4 1025adb3 base!base::internal::TaskTracker::RunNextTask+0x15c
10 2544ff5c 1027644c base!base::internal::SchedulerWorker::Thread::ThreadMain+0x303
11 2544ff80 745b38f4 base!base::`anonymous namespace'::ThreadFunc+0xbc
12 2544ff94 76f65de3 KERNEL32!BaseThreadInitThunk+0x24
13 2544ffdc 76f65dae ntdll!__RtlUserThreadStart+0x2f
14 2544ffec 00000000 ntdll!_RtlUserThreadStart+0x1b
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9450f8c3d9767b43d61e670aa17dde9cda52990

commit e9450f8c3d9767b43d61e670aa17dde9cda52990
Author: Robert Liao <robliao@chromium.org>
Date: Thu Jun 15 18:23:04 2017

Move MigrateTaskbarPinsCallback to a COM STA TaskRunner

Before this change, MigrateTaskbarPinsCallback implicitly created an
MTA to create CLSID_ShellLink. This change explictly declares use of an
STA for this component.

For all intents and purposes, the code is apartment agnostic as the
objects don't live beyond the stack, so any supported apartment type
works.

BUG= 733463 

Change-Id: Iaf406bb9065836031deaf09f38c8ab05293103f1
Reviewed-on: https://chromium-review.googlesource.com/537312
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479759}
[modify] https://crrev.com/e9450f8c3d9767b43d61e670aa17dde9cda52990/chrome/browser/shell_integration_win.cc

Status: Fixed (was: Assigned)

Sign in to add a comment