gecko-dev/dom/media/gmp/widevine-adapter/moz.build
Chris Pearce 5734680cc7 Bug 1375708 - Use base::Time() instead of time(0) in WidevineDecryptor::GetCurrentWallTime(). r=gerald
On Linux some implementations of time(0) appear to be suffering from integer
overflow and giving us the wrong dates. This causes the time we expose to the
CDM to be wrong, and so licenses passed to the CDM are failing to authenticate,
and Netflix is thus broken on some Linux systems.

This is only happening in Firefox 54 and earlier, as in those versions we use
the WidevineDecryptor to talk to the CDM. In 55 (in beta) and later we use the
PChromiumCDM protocol to talk to the CDM. This doesn't use time(0) to get a
time for the CDM, so it's immune to the problem here.

So this patch makes the GetCurrentWallTime() implementation in
WidevineDecryptor match the code currently being used on Nightly and Beta in
the ChromiumCDMChild::GetCurrentWallTime() function.

Since we use the PChromiumCDM protocol to talk to the CDM on Nightly and Beta
by default, the WidevineDecryptor isn't actually being used on Nightly and
Beta. So this patch will only cause a behaviour change in Release, which still
uses the old backend. However it will make Release run the same code that we're
running in Nightly and Beta, so it should be safe to uplift to Release.

MozReview-Commit-ID: J58iDyinyQG

--HG--
extra : rebase_source : dcdf4a846f7b007526aa626db24598942f13f01d
2017-06-23 16:02:14 +12:00

34 lines
804 B
Python

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [
'WidevineAdapter.cpp',
'WidevineDecryptor.cpp',
'WidevineDummyDecoder.cpp',
'WidevineFileIO.cpp',
'WidevineUtils.cpp',
'WidevineVideoDecoder.cpp',
'WidevineVideoFrame.cpp',
]
EXPORTS += [
'WidevineDecryptor.h',
'WidevineFileIO.h',
'WidevineUtils.h',
'WidevineVideoFrame.h'
]
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/dom/media/gmp',
]
if CONFIG['CLANG_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
include('/ipc/chromium/chromium-config.mozbuild')