New issue
Advanced search Search tips

Issue 642602 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Feature

Blocking:
issue 512433



Sign in to add a comment

Reduce dependency in Windows 10 Web MIDI backend

Project Member Reported by shaochuan@chromium.org, Aug 31 2016

Issue description

Currently the new MIDI backend requires the binary to be linked with RuntimeObject.lib, which in turn introduces dependency to runtime libraries that may not exist on Windows 7 & 8. Eventually we will include both WinMM and WinRT implementations of Web MIDI backend in the same binary for auto or user (by flag) selection at runtime.

RuntimeObject.lib is required for the following functions:

- WindowsCreateString()
- WindowsCreateStringReference()
- WindowsDeleteString()
- WindowsGetStringRawBuffer()
- RoGetActivationFactory()

used in Microsoft::WRL::Wrappers::HString, Microsoft::WRL::Wrappers::HStringReference and ABI::Windows::Foundation::GetActivationFactory. A relatively easy workaround is to write the wrapper classes/functions by ourselves and refer to usages in base::win::IsWindows10TabletMode() which loads them at runtime.
 
Status: Started (was: Assigned)
Description: Show this description
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 1 2016

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

commit 7086ca44644de7beee7c5b0d5b6170b816575943
Author: shaochuan <shaochuan@chromium.org>
Date: Thu Sep 01 08:58:44 2016

Remove RuntimeObject.lib dependency in Windows 10 Web MIDI backend

Although required by WRL wrappers, linking with RuntimeObject.lib introduces
dependency to certain libraries that may not be available on Windows 7. As we
will eventually supply both WinMM and WinRT implementations for Web MIDI in the
same binary, here we eliminate the dependency by loading required library
functions at runtime with Win32 APIs and remove usages of WRL wrappers.

BUG= 642602 
R=toyoshim@chromium.org

Review-Url: https://codereview.chromium.org/2301513002
Cr-Commit-Position: refs/heads/master@{#415915}

[modify] https://crrev.com/7086ca44644de7beee7c5b0d5b6170b816575943/media/midi/BUILD.gn
[modify] https://crrev.com/7086ca44644de7beee7c5b0d5b6170b816575943/media/midi/midi_manager_winrt.cc

Status: Fixed (was: Started)

Sign in to add a comment