Skip to content

Commit

Permalink
Merge pull request #14972 from electron/chromium-upgrade/69
Browse files Browse the repository at this point in the history
feat: upgrade to Chromium 69.0.3497.106
  • Loading branch information
MarshallOfSound committed Oct 10, 2018
2 parents 185fe6c + dd43e92 commit cc0c6ad
Show file tree
Hide file tree
Showing 190 changed files with 3,633 additions and 7,699 deletions.
27 changes: 18 additions & 9 deletions .circleci/config.yml
Expand Up @@ -28,6 +28,9 @@ env-release-build: &env-release-build
env-headless-testing: &env-headless-testing
DISPLAY: ':99.0'

env-stack-dumping: &env-stack-dumping
ELECTRON_ENABLE_STACK_DUMPING: '1'

env-browsertests: &env-browsertests
GN_EXTRA_ARGS: 'is_component_ffmpeg = false'
BUILD_TARGET: electron:chromium_browsertests
Expand Down Expand Up @@ -606,7 +609,7 @@ steps-tests: &steps-tests
command: |
cd src
export ELECTRON_OUT_DIR=Default
(cd electron && npm run test -- --ci --enable-logging)
(cd electron && npm run test -- --ci)
- run:
name: Check test results existence
command: |
Expand Down Expand Up @@ -944,6 +947,7 @@ jobs:
<<: *machine-linux-medium
environment:
<<: *env-headless-testing
<<: *env-stack-dumping
<<: *steps-tests

linux-x64-release-tests:
Expand All @@ -965,6 +969,7 @@ jobs:
environment:
<<: *env-ia32
<<: *env-headless-testing
<<: *env-stack-dumping
<<: *steps-tests

linux-ia32-release-tests:
Expand All @@ -985,10 +990,14 @@ jobs:

osx-testing-tests:
<<: *machine-mac
environment:
<<: *env-stack-dumping
<<: *steps-tests

mas-testing-tests:
<<: *machine-mac
environment:
<<: *env-stack-dumping
<<: *steps-tests

# Layer 4: Summary.
Expand Down Expand Up @@ -1077,14 +1086,14 @@ workflows:
- mas-testing

nightly-release-test:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
- *chromium-upgrade-branches
# triggers:
# - schedule:
# cron: "0 0 * * *"
# filters:
# branches:
# only:
# - master
# - *chromium-upgrade-branches
jobs:
- linux-checkout

Expand Down
4 changes: 1 addition & 3 deletions BUILD.gn
Expand Up @@ -216,8 +216,8 @@ static_library("electron_lib") {
"//content/public/app:both",
"//content/public/child",
"//content/public/common:service_names",
"//device/geolocation",
"//gin",
"//media/mojo/interfaces",
"//net:net_resources",
"//ppapi/host",
"//ppapi/proxy",
Expand Down Expand Up @@ -693,7 +693,6 @@ if (is_mac) {
":electron_lib",
":js2asar",
":packed_resources",
"//build/config:exe_and_shlib_deps",
"//content:sandbox_helper_win",
"//ui/strings",
]
Expand Down Expand Up @@ -798,7 +797,6 @@ group("chromium_unittests") {
"//third_party/blink/public:all_blink",
"//third_party/blink/public:test_support",
"//third_party/leveldatabase:env_chromium_unittests",
"//tools/gn:gn_unittests",
"//ui/base:ui_base_unittests",
"//ui/compositor:compositor_unittests",
"//ui/display:display_unittests",
Expand Down
40 changes: 27 additions & 13 deletions DEPS
@@ -1,6 +1,18 @@
gclient_gn_args_file = 'src/build/config/gclient_args.gni'
gclient_gn_args = [
'build_with_chromium',
'checkout_android',
'checkout_android_native_support',
'checkout_libaom',
'checkout_nacl',
'checkout_oculus_sdk'
]

vars = {
'chromium_version': '68.0.3440.128',
'node_version': '18a9880b70039f5d41ee860a95fe84e5ef928973',
'chromium_version':
'69.0.3497.106',
'node_version':
'5331c9dc72e0db379a675efdb98f6a67bf7f23f0',

'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b',
'pyyaml_version': '3.12',
Expand All @@ -15,16 +27,25 @@ vars = {
# Python interface to Amazon Web Services. Is used for releases only.
'checkout_boto': False,

'checkout_nacl': False,
'checkout_libaom': True,
'checkout_oculus_sdk': False,

# Python "requests" module is used for releases only.
'checkout_requests': False,

# It is always needed for normal Electron builds,
# but might be impossible for custom in-house builds.
'download_external_binaries': True,

'checkout_nacl':
False,
'checkout_libaom':
True,
'checkout_oculus_sdk':
False,
'build_with_chromium':
True,
'checkout_android':
False,
'checkout_android_native_support':
False,
}

deps = {
Expand Down Expand Up @@ -100,10 +121,3 @@ hooks = [
recursedeps = [
'src',
]

gclient_gn_args = [
'checkout_libaom',
'checkout_nacl',
'checkout_oculus_sdk',
]
gclient_gn_args_file = 'src/build/config/gclient_args.gni'
25 changes: 13 additions & 12 deletions atom/app/atom_content_client.cc
Expand Up @@ -44,7 +44,7 @@ namespace {
bool IsWidevineAvailable(
base::FilePath* cdm_path,
std::vector<media::VideoCodec>* codecs_supported,
bool* supports_persistent_license,
base::flat_set<media::CdmSessionType>* session_types_supported,
base::flat_set<media::EncryptionMode>* modes_supported) {
static enum {
NOT_CHECKED,
Expand All @@ -71,12 +71,11 @@ bool IsWidevineAvailable(
codecs_supported->push_back(media::VideoCodec::kCodecH264);
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)

// TODO(crbug.com/767941): Push persistent-license support info here once
// we check in a new CDM that supports it on Linux.
// TODO(crbug.com/767941): Push persistent-license support info here once
// we check in a new CDM that supports it on Linux.
session_types_supported->insert(media::CdmSessionType::kTemporary);
#if defined(OS_CHROMEOS)
*supports_persistent_license = true;
#else
*supports_persistent_license = false;
session_types_supported->insert(media::CdmSessionType::kPersistentLicense);
#endif // defined(OS_CHROMEOS)

modes_supported->insert(media::EncryptionMode::kCenc);
Expand Down Expand Up @@ -211,8 +210,8 @@ void AtomContentClient::AddAdditionalSchemes(Schemes* schemes) {

void AtomContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
#if BUILDFLAG(ENABLE_PEPPER_FLASH)
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
AddPepperFlashFromCommandLine(command_line, plugins);
#endif // BUILDFLAG(ENABLE_PEPPER_FLASH)
ComputeBuiltInPlugins(plugins);
Expand All @@ -225,10 +224,10 @@ void AtomContentClient::AddContentDecryptionModules(
#if defined(WIDEVINE_CDM_AVAILABLE)
base::FilePath cdm_path;
std::vector<media::VideoCodec> video_codecs_supported;
bool supports_persistent_license = false;
base::flat_set<media::CdmSessionType> session_types_supported;
base::flat_set<media::EncryptionMode> encryption_modes_supported;
if (IsWidevineAvailable(&cdm_path, &video_codecs_supported,
&supports_persistent_license,
&session_types_supported,
&encryption_modes_supported)) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
auto cdm_version_string =
Expand All @@ -239,11 +238,13 @@ void AtomContentClient::AddContentDecryptionModules(
const base::Version version(cdm_version_string);
DCHECK(version.IsValid());

content::CdmCapability capability(
video_codecs_supported, encryption_modes_supported,
session_types_supported, base::flat_set<media::CdmProxy::Protocol>());

cdms->push_back(content::CdmInfo(
kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path,
kWidevineCdmFileSystemId, video_codecs_supported,
supports_persistent_license, encryption_modes_supported,
kWidevineKeySystem, false));
kWidevineCdmFileSystemId, capability, kWidevineKeySystem, false));
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
}
Expand Down
10 changes: 10 additions & 0 deletions atom/app/atom_main_delegate.cc
Expand Up @@ -35,6 +35,10 @@
#include "atom/common/common_message_generator.h"
#endif

#if defined(OS_MACOSX)
#include "atom/app/atom_main_delegate_mac.h"
#endif

namespace atom {

namespace {
Expand Down Expand Up @@ -158,6 +162,12 @@ void AtomMainDelegate::PreSandboxStartup() {
#endif
}

void AtomMainDelegate::PreContentInitialization() {
#if defined(OS_MACOSX)
RegisterAtomCrApp();
#endif
}

content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() {
browser_client_.reset(new AtomBrowserClient);
return browser_client_.get();
Expand Down
1 change: 1 addition & 0 deletions atom/app/atom_main_delegate.h
Expand Up @@ -22,6 +22,7 @@ class AtomMainDelegate : public brightray::MainDelegate {
// content::ContentMainDelegate:
bool BasicStartupComplete(int* exit_code) override;
void PreSandboxStartup() override;
void PreContentInitialization() override;
content::ContentBrowserClient* CreateContentBrowserClient() override;
content::ContentRendererClient* CreateContentRendererClient() override;
content::ContentUtilityClient* CreateContentUtilityClient() override;
Expand Down
15 changes: 15 additions & 0 deletions atom/app/atom_main_delegate_mac.h
@@ -0,0 +1,15 @@
// Copyright 2013 Slack Technologies, Inc. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ATOM_APP_ATOM_MAIN_DELEGATE_MAC_H_
#define ATOM_APP_ATOM_MAIN_DELEGATE_MAC_H_

namespace atom {

// Initializes NSApplication.
void RegisterAtomCrApp();

} // namespace atom

#endif // ATOM_APP_ATOM_MAIN_DELEGATE_MAC_H_
6 changes: 6 additions & 0 deletions atom/app/atom_main_delegate_mac.mm
Expand Up @@ -4,6 +4,7 @@

#include "atom/app/atom_main_delegate.h"

#include "atom/browser/mac/atom_application.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/mac/bundle_locations.h"
Expand Down Expand Up @@ -63,4 +64,9 @@
base::mac::SetBaseBundleID(base_bundle_id.c_str());
}

void RegisterAtomCrApp() {
// Force the NSApplication subclass to be used.
[AtomApplication sharedApplication];
}

} // namespace atom
3 changes: 2 additions & 1 deletion atom/app/node_main.cc
Expand Up @@ -51,7 +51,7 @@ int NodeMain(int argc, char* argv[]) {
base::TaskScheduler::CreateAndStartWithDefaultParams("Electron");

// Initialize gin::IsolateHolder.
JavascriptEnvironment gin_env;
JavascriptEnvironment gin_env(loop);

// Explicitly register electron's builtin modules.
NodeBindings::RegisterBuiltinModules();
Expand Down Expand Up @@ -100,6 +100,7 @@ int NodeMain(int argc, char* argv[]) {
node::RunAtExit(env);
gin_env.platform()->DrainTasks(env->isolate());
gin_env.platform()->CancelPendingDelayedTasks(env->isolate());
gin_env.platform()->UnregisterIsolate(env->isolate());

node::FreeEnvironment(env);
}
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_app.cc
Expand Up @@ -1173,7 +1173,7 @@ v8::Local<v8::Promise> App::GetGPUInfo(v8::Isolate* isolate,

auto* const info_mgr = GPUInfoManager::GetInstance();
if (info_type == "complete") {
#if defined(OS_MACOSX) || defined(OS_WIN)
#if defined(OS_WIN)
info_mgr->FetchCompleteInfo(promise);
#else
info_mgr->FetchBasicInfo(promise);
Expand Down
5 changes: 4 additions & 1 deletion atom/browser/api/atom_api_net_log.cc
Expand Up @@ -11,6 +11,7 @@
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "components/net_log/chrome_net_log.h"
#include "content/public/browser/storage_partition.h"
#include "native_mate/dictionary.h"
Expand Down Expand Up @@ -103,11 +104,13 @@ void NetLog::StopLogging(mate::Arguments* args) {

void NetLog::OnNewState(const base::DictionaryValue& state) {
net_log_state_ = state.CreateDeepCopy();
auto logging_state = GetLoggingState();
LOG(INFO) << "Got new state: " << logging_state;

if (stop_callback_queue_.empty())
return;

if (GetLoggingState() == "NOT_LOGGING") {
if (logging_state == "NOT_LOGGING") {
for (auto& callback : stop_callback_queue_) {
if (!callback.is_null())
net_log_writer_->GetFilePathToCompletedLog(callback);
Expand Down

0 comments on commit cc0c6ad

Please sign in to comment.