Skip to content

Commit e012801

Browse files
nornagonMarshallOfSound
authored andcommitted
feat: upgrade to Chromium 68.0.3440.128 and Node 10.11.0 (electron#14677)
* Update to Chromium 68.0.3440.128 and Node 10.10.0 * update v8, ffmpeg, chromium, crashpad, boringssl, and webrtc patches * fix SSL_get_tlsext_status_type patch * pass encryption_modes_supported to CdmInfo * kNoSandbox moved into service_manager * bump CHROME_VERSION_STRING TODO: automatically pull in the real chrome version * PathService -> base::PathService * net::X509Certificate::Equals -> net::X509Certificate::EqualsExcludingChain * use content::ChildProcessTerminationInfo * GetHandle() -> GetProcess().Handle() * ScopedNestableTaskAllower doesn't take an argument * net::HttpAuthCache::ClearEntriesAddedWithin -> ClearAllEntries * std::unique_ptr<WebContents> * blink::WebFullscreenOptions * OnAudioStateChanged doesn't take a WebContents * content::RESULT_CODE_NORMAL_EXIT -> service_manager::RESULT_CODE_NORMAL_EXIT * MessageLoopCurrent * WasResized -> SynchronizeVisualProperties * SetTimeStamp takes a base::TimeTicks * ExecuteScriptInIsolatedWorld is single-script only * DispatchNonPersistentCloseEvent takes a callback now * expose URLRequestContextGetter::{Add,Remove}Observer * test: remove no longer existing Chromium test deps cc_blink_unittests has been removed in https://chromium-review.googlesource.com/1053765 mojo_common_unittests has been removed in https://chromium-review.googlesource.com/1028000 * SetFdLimit -> IncreaseFdLimitTo NOTE: the behaviour of this API has changed slightly, and we should mention that in the notes. * MessageLoop::QuitWhenIdleClosure -> RunLoop::QuitCurrentWhenIdleClosureDeprecated * certificate_transparency moved out of net/ pending a clearer decision about what to do with CT in the mean time, copy CreateLogVerifiersForKnownLogs from deleted chromium source * add secure_origin_whitelist to chrome source list NOTE: is this something we actually want? cc @deepak1556 * DrainBackgroundTasks -> DrainTasks * use new node options parser * fix disable_scroll_begin_dcheck.patch * ViewsDelegate::CreateWebContents went away see https://chromium-review.googlesource.com/c/chromium/src/+/1031314 * kZygoteProcess moved into service_manager * test: minor improvements to the Node spec - reformat some parts - better failures reporting with `expect` - skip some tests instead of marking them as passed * chromium removed *_posix.cc from the source filters * test: fix :electron_tests compilation * better crash diagnostics in ffmpeg test * fix: enable back a DCHECK in viz::ServerSharedBitmapManager Fixes electron#14327. Backports https://chromium-review.googlesource.com/802574. * chore: update linux sysroots * chore: remove obsolete "install-sysroot.py" script * test: fix frame-subscriber test on Mac * disable OSR for now * test: make before-input-event test more robust * test: make run-as-node --inspect test more robust on windows * roll node to v10.11.0 * avoid duplicate files when building a zip * disable failing assert in beginFrameSubscription dirty-rectangle test * experiment with is_cfi = false * fix: build torque with x64 toolchain Co-Authored-By: Alexey Kuzmin <github@alexeykuzmin.com> * test: disable the "app.relaunch" test on Linux * chore: bump node to get header tar file * chore: bump node to fix tar.py line endings
1 parent 14fc6f3 commit e012801

File tree

155 files changed

+9131
-8352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+9131
-8352
lines changed

BUILD.gn

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ static_library("electron_lib") {
248248
"*\bwin_*.cc",
249249
]
250250
}
251+
if (!is_posix) {
252+
extra_source_filters += [
253+
"*_posix.cc",
254+
"*_posix.h",
255+
]
256+
}
251257
if (is_mac) {
252258
extra_source_filters += [
253259
"*_views.cc",
@@ -744,7 +750,6 @@ group("chromium_unittests") {
744750
deps = [
745751
"//base:base_unittests",
746752
"//cc:cc_unittests",
747-
"//cc/blink:cc_blink_unittests",
748753
"//content/test:content_unittests",
749754
"//crypto:crypto_unittests",
750755
"//device:device_unittests",
@@ -756,7 +761,6 @@ group("chromium_unittests") {
756761
"//media/midi:midi_unittests",
757762
"//media/mojo:media_mojo_unittests",
758763
"//mojo:mojo_unittests",
759-
"//mojo/common:mojo_common_unittests",
760764
"//net:net_unittests",
761765
"//ppapi:ppapi_unittests",
762766
"//printing:printing_unittests",

DEPS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
vars = {
22
'chromium_version':
3-
'67.0.3396.99',
3+
'68.0.3440.128',
44
'node_version':
5-
'7295c611497c5e70d292e96e98f1180822b907a6',
5+
'18a9880b70039f5d41ee860a95fe84e5ef928973',
66

77
'pyyaml_version':
88
'3.12',

atom/app/atom_content_client.cc

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ namespace atom {
4141
namespace {
4242

4343
#if defined(WIDEVINE_CDM_AVAILABLE)
44-
bool IsWidevineAvailable(base::FilePath* cdm_path,
45-
std::vector<media::VideoCodec>* codecs_supported) {
44+
bool IsWidevineAvailable(
45+
base::FilePath* cdm_path,
46+
std::vector<media::VideoCodec>* codecs_supported,
47+
bool* supports_persistent_license,
48+
base::flat_set<media::EncryptionMode>* modes_supported) {
4649
static enum {
4750
NOT_CHECKED,
4851
FOUND,
@@ -68,6 +71,16 @@ bool IsWidevineAvailable(base::FilePath* cdm_path,
6871
codecs_supported->push_back(media::VideoCodec::kCodecH264);
6972
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
7073

74+
// TODO(crbug.com/767941): Push persistent-license support info here once
75+
// we check in a new CDM that supports it on Linux.
76+
#if defined(OS_CHROMEOS)
77+
*supports_persistent_license = true;
78+
#else
79+
*supports_persistent_license = false;
80+
#endif // defined(OS_CHROMEOS)
81+
82+
modes_supported->insert(media::EncryptionMode::kCenc);
83+
7184
return true;
7285
}
7386

@@ -213,7 +226,10 @@ void AtomContentClient::AddContentDecryptionModules(
213226
base::FilePath cdm_path;
214227
std::vector<media::VideoCodec> video_codecs_supported;
215228
bool supports_persistent_license = false;
216-
if (IsWidevineAvailable(&cdm_path, &video_codecs_supported)) {
229+
base::flat_set<media::EncryptionMode> encryption_modes_supported;
230+
if (IsWidevineAvailable(&cdm_path, &video_codecs_supported,
231+
&supports_persistent_license,
232+
&encryption_modes_supported)) {
217233
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
218234
auto cdm_version_string =
219235
command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
@@ -226,7 +242,8 @@ void AtomContentClient::AddContentDecryptionModules(
226242
cdms->push_back(content::CdmInfo(
227243
kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path,
228244
kWidevineCdmFileSystemId, video_codecs_supported,
229-
supports_persistent_license, kWidevineKeySystem, false));
245+
supports_persistent_license, encryption_modes_supported,
246+
kWidevineKeySystem, false));
230247
}
231248
#endif // defined(WIDEVINE_CDM_AVAILABLE)
232249
}

atom/app/atom_main_delegate.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void AtomMainDelegate::PreSandboxStartup() {
145145
service_manager::switches::kDisableSetuidSandbox);
146146
} else {
147147
// Disable renderer sandbox for most of node's functions.
148-
command_line->AppendSwitch(::switches::kNoSandbox);
148+
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
149149
}
150150
}
151151

@@ -168,7 +168,7 @@ AtomMainDelegate::CreateContentRendererClient() {
168168
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
169169
switches::kEnableSandbox) ||
170170
!base::CommandLine::ForCurrentProcess()->HasSwitch(
171-
::switches::kNoSandbox)) {
171+
service_manager::switches::kNoSandbox)) {
172172
renderer_client_.reset(new AtomSandboxedRendererClient);
173173
} else {
174174
renderer_client_.reset(new AtomRendererClient);

atom/app/atom_main_delegate_mac.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
GetHelperAppPath(frameworks_path, brightray::GetApplicationName());
5050
if (!base::PathExists(helper_path))
5151
LOG(FATAL) << "Unable to find helper app";
52-
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
52+
base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
5353
}
5454

5555
void AtomMainDelegate::SetUpBundleOverrides() {

atom/app/node_main.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int NodeMain(int argc, char* argv[]) {
8484
bool more;
8585
do {
8686
more = uv_run(env->event_loop(), UV_RUN_ONCE);
87-
gin_env.platform()->DrainBackgroundTasks(env->isolate());
87+
gin_env.platform()->DrainTasks(env->isolate());
8888
if (more == false) {
8989
node::EmitBeforeExit(env);
9090

@@ -98,7 +98,7 @@ int NodeMain(int argc, char* argv[]) {
9898

9999
exit_code = node::EmitExit(env);
100100
node::RunAtExit(env);
101-
gin_env.platform()->DrainBackgroundTasks(env->isolate());
101+
gin_env.platform()->DrainTasks(env->isolate());
102102
gin_env.platform()->CancelPendingDelayedTasks(env->isolate());
103103

104104
node::FreeEnvironment(env);

atom/browser/api/atom_api_app.cc

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "net/ssl/client_cert_identity.h"
5151
#include "net/ssl/ssl_cert_request_info.h"
5252
#include "services/network/public/cpp/network_switches.h"
53+
#include "services/service_manager/sandbox/switches.h"
5354
#include "ui/base/l10n/l10n_util.h"
5455
#include "ui/gfx/image/image.h"
5556

@@ -481,7 +482,7 @@ void OnClientCertificateSelected(
481482
if (!certs.empty()) {
482483
scoped_refptr<net::X509Certificate> cert(certs[0].get());
483484
for (size_t i = 0; i < identities->size(); ++i) {
484-
if (cert->Equals((*identities)[i]->certificate())) {
485+
if (cert->EqualsExcludingChain((*identities)[i]->certificate())) {
485486
net::ClientCertIdentity::SelfOwningAcquirePrivateKey(
486487
std::move((*identities)[i]),
487488
base::Bind(&GotPrivateKey, delegate, std::move(cert)));
@@ -786,18 +787,21 @@ void App::BrowserChildProcessHostDisconnected(
786787
ChildProcessDisconnected(base::GetProcId(data.handle));
787788
}
788789

789-
void App::BrowserChildProcessCrashed(const content::ChildProcessData& data,
790-
int exit_code) {
790+
void App::BrowserChildProcessCrashed(
791+
const content::ChildProcessData& data,
792+
const content::ChildProcessTerminationInfo& info) {
791793
ChildProcessDisconnected(base::GetProcId(data.handle));
792794
}
793795

794-
void App::BrowserChildProcessKilled(const content::ChildProcessData& data,
795-
int exit_code) {
796+
void App::BrowserChildProcessKilled(
797+
const content::ChildProcessData& data,
798+
const content::ChildProcessTerminationInfo& info) {
796799
ChildProcessDisconnected(base::GetProcId(data.handle));
797800
}
798801

799802
void App::RenderProcessReady(content::RenderProcessHost* host) {
800-
ChildProcessLaunched(content::PROCESS_TYPE_RENDERER, host->GetHandle());
803+
ChildProcessLaunched(content::PROCESS_TYPE_RENDERER,
804+
host->GetProcess().Handle());
801805
}
802806

803807
void App::RenderProcessDisconnected(base::ProcessId host_pid) {
@@ -836,7 +840,7 @@ base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
836840
base::FilePath path;
837841
int key = GetPathConstant(name);
838842
if (key >= 0)
839-
succeed = PathService::Get(key, &path);
843+
succeed = base::PathService::Get(key, &path);
840844
if (!succeed)
841845
args->ThrowError("Failed to get '" + name + "' path");
842846
return path;
@@ -853,7 +857,8 @@ void App::SetPath(mate::Arguments* args,
853857
bool succeed = false;
854858
int key = GetPathConstant(name);
855859
if (key >= 0)
856-
succeed = PathService::OverrideAndCreateIfNeeded(key, path, true, false);
860+
succeed =
861+
base::PathService::OverrideAndCreateIfNeeded(key, path, true, false);
857862
if (!succeed)
858863
args->ThrowError("Failed to set path");
859864
}
@@ -885,7 +890,7 @@ bool App::RequestSingleInstanceLock() {
885890
return true;
886891

887892
base::FilePath user_dir;
888-
PathService::Get(brightray::DIR_USER_DATA, &user_dir);
893+
base::PathService::Get(brightray::DIR_USER_DATA, &user_dir);
889894

890895
auto cb = base::Bind(&App::OnSecondInstance, base::Unretained(this));
891896

@@ -934,7 +939,7 @@ bool App::Relaunch(mate::Arguments* js_args) {
934939

935940
if (exec_path.empty()) {
936941
base::FilePath current_exe_path;
937-
PathService::Get(base::FILE_EXE, &current_exe_path);
942+
base::PathService::Get(base::FILE_EXE, &current_exe_path);
938943
argv.push_back(current_exe_path.value());
939944
} else {
940945
argv.push_back(exec_path.value());
@@ -1188,7 +1193,7 @@ void App::EnableMixedSandbox(mate::Arguments* args) {
11881193
}
11891194

11901195
auto* command_line = base::CommandLine::ForCurrentProcess();
1191-
if (command_line->HasSwitch(::switches::kNoSandbox)) {
1196+
if (command_line->HasSwitch(service_manager::switches::kNoSandbox)) {
11921197
#if defined(OS_WIN)
11931198
const base::CommandLine::CharType* noSandboxArg = L"--no-sandbox";
11941199
#else

atom/browser/api/atom_api_app.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,12 @@ class App : public AtomBrowserClient::Delegate,
162162
const content::ChildProcessData& data) override;
163163
void BrowserChildProcessHostDisconnected(
164164
const content::ChildProcessData& data) override;
165-
void BrowserChildProcessCrashed(const content::ChildProcessData& data,
166-
int exit_code) override;
167-
void BrowserChildProcessKilled(const content::ChildProcessData& data,
168-
int exit_code) override;
165+
void BrowserChildProcessCrashed(
166+
const content::ChildProcessData& data,
167+
const content::ChildProcessTerminationInfo& info) override;
168+
void BrowserChildProcessKilled(
169+
const content::ChildProcessData& data,
170+
const content::ChildProcessTerminationInfo& info) override;
169171

170172
private:
171173
void SetAppPath(const base::FilePath& app_path);

atom/browser/api/atom_api_menu_mac.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@
9797

9898
[popup_controllers_[window_id] setCloseCallback:close_callback];
9999
// Make sure events can be pumped while the menu is up.
100-
base::MessageLoop::ScopedNestableTaskAllower allow(
101-
base::MessageLoop::current());
100+
base::MessageLoop::ScopedNestableTaskAllower allow;
102101

103102
// One of the events that could be pumped is |window.close()|.
104103
// User-initiated event-tracking loops protect against this by

atom/browser/api/atom_api_session.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ void ClearAuthCacheInIO(
396396
options.origin, options.realm, options.auth_scheme,
397397
net::AuthCredentials(options.username, options.password));
398398
} else {
399-
auth_cache->ClearEntriesAddedWithin(base::TimeDelta::Max());
399+
auth_cache->ClearAllEntries();
400400
}
401401
} else if (options.type == "clientCertificate") {
402402
auto* client_auth_cache = network_session->ssl_client_auth_cache();

0 commit comments

Comments
 (0)