Commit 95ef5b2b authored by henrika's avatar henrika Committed by Commit Bot

Adding COINIT_DISABLE_OLE1DDE to ScopedCOMInitializer on Windows.

Speculative change which might improve COM initialization according
to MSDN [1].

[1] https://docs.microsoft.com/en-us/windows/desktop/learnwin32/initializing-the-com-library

BUG=955434

Change-Id: I0f28279b576326149a7925adfb59cfde7b1633a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1598825
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657644}
parent daf05ee6
...@@ -29,7 +29,9 @@ bool ScopedCOMInitializer::Succeeded() const { ...@@ -29,7 +29,9 @@ bool ScopedCOMInitializer::Succeeded() const {
void ScopedCOMInitializer::Initialize(COINIT init) { void ScopedCOMInitializer::Initialize(COINIT init) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
hr_ = CoInitializeEx(NULL, init); // COINIT_DISABLE_OLE1DDE is always added based on:
// https://docs.microsoft.com/en-us/windows/desktop/learnwin32/initializing-the-com-library
hr_ = CoInitializeEx(NULL, init | COINIT_DISABLE_OLE1DDE);
DCHECK_NE(RPC_E_CHANGED_MODE, hr_) << "Invalid COM thread model change"; DCHECK_NE(RPC_E_CHANGED_MODE, hr_) << "Invalid COM thread model change";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment