Skip to content

Commit

Permalink
Weak link MediaPlayer.framework in //ui/base/now_playing.
Browse files Browse the repository at this point in the history
This framework is only available on 10.12+, and the normal framework
dependency is causing Chrome on macOS 10.10 and 10.11 to crash on
launch.

Bug: 943299
Change-Id: Ida122e7b339835ac67f20c25880e2e74c4f878b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529924
Reviewed-by: Elly Fong-Jones <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Commit-Queue: Robert Sesek <[email protected]>
Cr-Commit-Position: refs/heads/master@{#641979}
  • Loading branch information
rsesek authored and Commit Bot committed Mar 19, 2019
1 parent 8bbaff7 commit a3d3298
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions ui/base/now_playing/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

config("media_player_weak_link") {
ldflags = [
"-weak_framework",
"MediaPlayer",
]

visibility = [ ":now_playing" ]
}

component("now_playing") {
sources = [
"now_playing_info_center_delegate.cc",
Expand All @@ -26,10 +35,13 @@ component("now_playing") {
"//base",
]

libs = [
"Foundation.framework",
"MediaPlayer.framework",
]
libs = [ "Foundation.framework" ]

# MediaPlayer.framework is only available on macOS 10.12 and higher. In a
# release build, component() is a static_library, which does not transitively
# carry weak_link information. Ensure that all targets that directly or
# indirectly carry the weak_link on the framework.
all_dependent_configs = [ ":media_player_weak_link" ]
}

static_library("test_support") {
Expand Down

0 comments on commit a3d3298

Please sign in to comment.