New issue
Advanced search Search tips

Issue 660376 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

clear_key_cdm.cc has a static initializer

Project Member Reported by primiano@chromium.org, Oct 28 2016

Issue description

I just found this today by accident (by accidentally adding another static initializer myself while writing a CL and being bitten by ordering fiasco):

in media/cdm/ppapi/external_clear_key/clear_key_cdm.cc

// Prepare media library.
static bool InitializeFFmpegLibraries() {
  media::InitializeMediaLibrary();
  return true;
}
static bool g_ffmpeg_lib_initialized = InitializeFFmpegLibraries();

Which is a non-trivial static initializer.
I guess this managed to escape the static initializer checks we have in the tree because is part of a standalone so (libclearkeycdm.so)
 

Comment 1 by xhw...@chromium.org, Oct 28 2016

This code is old and is only used for testing. That said, we should get it fixed.

Comment 2 by xhw...@chromium.org, Oct 28 2016

Components: Internals>Media>Encrypted
Labels: OS-All
Owner: jrumm...@chromium.org
Status: Available (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 15 2016

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

commit 5871a5a23990bc54a90de839e62a36497025123d
Author: jrummell <jrummell@chromium.org>
Date: Tue Nov 15 07:17:21 2016

Remove non-trivial static initializer

Even though this is test-only code, non-trivial static initializers
aren't allowed in Chromium, so remove it.

BUG= 660376 
TEST=EME browser_tests pass

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

[modify] https://crrev.com/5871a5a23990bc54a90de839e62a36497025123d/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc

Status: Fixed (was: Available)
Thanks a lot

Sign in to add a comment