Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to Chromium 68.0.3440.128 and Node 10.11.0 #14964

Merged
merged 51 commits into from Oct 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
78c8951
Update to Chromium 68.0.3440.128 and Node 10.10.0
nornagon Sep 13, 2018
d5e9b66
bump CHROME_VERSION_STRING
nornagon Sep 15, 2018
6f2f761
update v8, ffmpeg, chromium, crashpad, boringssl, and webrtc patches
nornagon Sep 14, 2018
e721388
fix SSL_get_tlsext_status_type patch
nornagon Sep 14, 2018
ce2c8e3
pass encryption_modes_supported to CdmInfo
nornagon Sep 15, 2018
7092fa3
kNoSandbox moved into service_manager
nornagon Sep 15, 2018
de581ca
PathService -> base::PathService
nornagon Sep 15, 2018
2804213
net::X509Certificate::Equals -> net::X509Certificate::EqualsExcluding…
nornagon Sep 15, 2018
1c60f9e
use content::ChildProcessTerminationInfo
nornagon Sep 15, 2018
b9cd349
GetHandle() -> GetProcess().Handle()
nornagon Sep 15, 2018
5a75744
ScopedNestableTaskAllower doesn't take an argument
nornagon Sep 15, 2018
8060e91
net::HttpAuthCache::ClearEntriesAddedWithin -> ClearAllEntries
nornagon Sep 15, 2018
a5b09e2
std::unique_ptr<WebContents>
nornagon Sep 15, 2018
517d38f
blink::WebFullscreenOptions
nornagon Sep 15, 2018
948fe21
OnAudioStateChanged doesn't take a WebContents
nornagon Sep 15, 2018
08265ba
content::RESULT_CODE_NORMAL_EXIT -> service_manager::RESULT_CODE_NORM…
nornagon Sep 15, 2018
5d9ba8b
MessageLoopCurrent
nornagon Sep 15, 2018
faf5768
WasResized -> SynchronizeVisualProperties
nornagon Sep 15, 2018
9c15c97
expose URLRequestContextGetter::{Add,Remove}Observer
nornagon Oct 1, 2018
3b76573
SetTimeStamp takes a base::TimeTicks
nornagon Sep 15, 2018
7a043a8
ExecuteScriptInIsolatedWorld is single-script only
nornagon Sep 15, 2018
7e5d90f
DispatchNonPersistentCloseEvent takes a callback now
nornagon Sep 15, 2018
e6da87b
test: remove no longer existing Chromium test deps
nornagon Sep 14, 2018
f0da5bc
MessageLoop::QuitWhenIdleClosure -> RunLoop::QuitCurrentWhenIdleClosu…
nornagon Sep 15, 2018
6a202c9
SetFdLimit -> IncreaseFdLimitTo
nornagon Sep 15, 2018
3657715
certificate_transparency moved out of net/
nornagon Sep 15, 2018
5d882c6
add secure_origin_whitelist to chrome source list
nornagon Sep 15, 2018
9aaedc3
DrainBackgroundTasks -> DrainTasks
nornagon Sep 17, 2018
6e037f5
use new node options parser
nornagon Sep 18, 2018
2f75777
fix disable_scroll_begin_dcheck.patch
nornagon Sep 18, 2018
f9ed25d
ViewsDelegate::CreateWebContents went away
nornagon Sep 18, 2018
4e679a3
kZygoteProcess moved into service_manager
nornagon Sep 19, 2018
ae95f77
test: minor improvements to the Node spec
alexeykuzmin Sep 19, 2018
aafe833
chromium removed *_posix.cc from the source filters
nornagon Sep 19, 2018
6ab5c2f
test: fix :electron_tests compilation
alexeykuzmin Sep 20, 2018
cc53269
better crash diagnostics in ffmpeg test
nornagon Sep 20, 2018
ae12d53
fix: enable back a DCHECK in viz::ServerSharedBitmapManager
alexeykuzmin Sep 20, 2018
09f018c
test: fix frame-subscriber test on Mac
nornagon Sep 24, 2018
01179ea
chore: remove obsolete "install-sysroot.py" script
alexeykuzmin Sep 23, 2018
0fc79ad
chore: update linux sysroots
alexeykuzmin Sep 22, 2018
41d806e
disable OSR for now
nornagon Oct 1, 2018
b11b4f2
test: make before-input-event test more robust
zcbenz Oct 2, 2018
0ee46cd
test: make run-as-node --inspect test more robust on windows
MarshallOfSound Oct 2, 2018
d4c8375
roll node to v10.11.0
nornagon Oct 3, 2018
81bd7fa
avoid duplicate files when building a zip
nornagon Oct 3, 2018
45c2dcd
disable failing assert in beginFrameSubscription dirty-rectangle test
nornagon Oct 3, 2018
f7f93d2
experiment with is_cfi = false
nornagon Oct 3, 2018
df32326
fix: build torque with x64 toolchain
Oct 3, 2018
21f382f
test: disable the "app.relaunch" test on Linux
alexeykuzmin Oct 3, 2018
b47081e
chore: bump node to get header tar file
MarshallOfSound Oct 3, 2018
a78fff0
chore: bump node to fix tar.py line endings
MarshallOfSound Oct 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions BUILD.gn
Expand Up @@ -248,6 +248,12 @@ static_library("electron_lib") {
"*\bwin_*.cc",
]
}
if (!is_posix) {
extra_source_filters += [
"*_posix.cc",
"*_posix.h",
]
}
if (is_mac) {
extra_source_filters += [
"*_views.cc",
Expand Down Expand Up @@ -744,7 +750,6 @@ group("chromium_unittests") {
deps = [
"//base:base_unittests",
"//cc:cc_unittests",
"//cc/blink:cc_blink_unittests",
"//content/test:content_unittests",
"//crypto:crypto_unittests",
"//device:device_unittests",
Expand All @@ -756,7 +761,6 @@ group("chromium_unittests") {
"//media/midi:midi_unittests",
"//media/mojo:media_mojo_unittests",
"//mojo:mojo_unittests",
"//mojo/common:mojo_common_unittests",
"//net:net_unittests",
"//ppapi:ppapi_unittests",
"//printing:printing_unittests",
Expand Down
4 changes: 2 additions & 2 deletions DEPS
@@ -1,8 +1,8 @@
vars = {
'chromium_version':
'67.0.3396.99',
'68.0.3440.128',
'node_version':
'7295c611497c5e70d292e96e98f1180822b907a6',
'18a9880b70039f5d41ee860a95fe84e5ef928973',

'pyyaml_version':
'3.12',
Expand Down
25 changes: 21 additions & 4 deletions atom/app/atom_content_client.cc
Expand Up @@ -41,8 +41,11 @@ namespace atom {
namespace {

#if defined(WIDEVINE_CDM_AVAILABLE)
bool IsWidevineAvailable(base::FilePath* cdm_path,
std::vector<media::VideoCodec>* codecs_supported) {
bool IsWidevineAvailable(
base::FilePath* cdm_path,
std::vector<media::VideoCodec>* codecs_supported,
bool* supports_persistent_license,
base::flat_set<media::EncryptionMode>* modes_supported) {
static enum {
NOT_CHECKED,
FOUND,
Expand All @@ -68,6 +71,16 @@ bool IsWidevineAvailable(base::FilePath* cdm_path,
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.
#if defined(OS_CHROMEOS)
*supports_persistent_license = true;
#else
*supports_persistent_license = false;
#endif // defined(OS_CHROMEOS)

modes_supported->insert(media::EncryptionMode::kCenc);

return true;
}

Expand Down Expand Up @@ -213,7 +226,10 @@ void AtomContentClient::AddContentDecryptionModules(
base::FilePath cdm_path;
std::vector<media::VideoCodec> video_codecs_supported;
bool supports_persistent_license = false;
if (IsWidevineAvailable(&cdm_path, &video_codecs_supported)) {
base::flat_set<media::EncryptionMode> encryption_modes_supported;
if (IsWidevineAvailable(&cdm_path, &video_codecs_supported,
&supports_persistent_license,
&encryption_modes_supported)) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
auto cdm_version_string =
command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
Expand All @@ -226,7 +242,8 @@ void AtomContentClient::AddContentDecryptionModules(
cdms->push_back(content::CdmInfo(
kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path,
kWidevineCdmFileSystemId, video_codecs_supported,
supports_persistent_license, kWidevineKeySystem, false));
supports_persistent_license, encryption_modes_supported,
kWidevineKeySystem, false));
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
}
Expand Down
4 changes: 2 additions & 2 deletions atom/app/atom_main_delegate.cc
Expand Up @@ -145,7 +145,7 @@ void AtomMainDelegate::PreSandboxStartup() {
service_manager::switches::kDisableSetuidSandbox);
} else {
// Disable renderer sandbox for most of node's functions.
command_line->AppendSwitch(::switches::kNoSandbox);
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
}
}

Expand All @@ -168,7 +168,7 @@ AtomMainDelegate::CreateContentRendererClient() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSandbox) ||
!base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kNoSandbox)) {
service_manager::switches::kNoSandbox)) {
renderer_client_.reset(new AtomSandboxedRendererClient);
} else {
renderer_client_.reset(new AtomRendererClient);
Expand Down
2 changes: 1 addition & 1 deletion atom/app/atom_main_delegate_mac.mm
Expand Up @@ -49,7 +49,7 @@
GetHelperAppPath(frameworks_path, brightray::GetApplicationName());
if (!base::PathExists(helper_path))
LOG(FATAL) << "Unable to find helper app";
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
}

void AtomMainDelegate::SetUpBundleOverrides() {
Expand Down
4 changes: 2 additions & 2 deletions atom/app/node_main.cc
Expand Up @@ -84,7 +84,7 @@ int NodeMain(int argc, char* argv[]) {
bool more;
do {
more = uv_run(env->event_loop(), UV_RUN_ONCE);
gin_env.platform()->DrainBackgroundTasks(env->isolate());
gin_env.platform()->DrainTasks(env->isolate());
if (more == false) {
node::EmitBeforeExit(env);

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

exit_code = node::EmitExit(env);
node::RunAtExit(env);
gin_env.platform()->DrainBackgroundTasks(env->isolate());
gin_env.platform()->DrainTasks(env->isolate());
gin_env.platform()->CancelPendingDelayedTasks(env->isolate());

node::FreeEnvironment(env);
Expand Down
27 changes: 16 additions & 11 deletions atom/browser/api/atom_api_app.cc
Expand Up @@ -50,6 +50,7 @@
#include "net/ssl/client_cert_identity.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/service_manager/sandbox/switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"

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

void App::BrowserChildProcessCrashed(const content::ChildProcessData& data,
int exit_code) {
void App::BrowserChildProcessCrashed(
const content::ChildProcessData& data,
const content::ChildProcessTerminationInfo& info) {
ChildProcessDisconnected(base::GetProcId(data.handle));
}

void App::BrowserChildProcessKilled(const content::ChildProcessData& data,
int exit_code) {
void App::BrowserChildProcessKilled(
const content::ChildProcessData& data,
const content::ChildProcessTerminationInfo& info) {
ChildProcessDisconnected(base::GetProcId(data.handle));
}

void App::RenderProcessReady(content::RenderProcessHost* host) {
ChildProcessLaunched(content::PROCESS_TYPE_RENDERER, host->GetHandle());
ChildProcessLaunched(content::PROCESS_TYPE_RENDERER,
host->GetProcess().Handle());
}

void App::RenderProcessDisconnected(base::ProcessId host_pid) {
Expand Down Expand Up @@ -836,7 +840,7 @@ base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
base::FilePath path;
int key = GetPathConstant(name);
if (key >= 0)
succeed = PathService::Get(key, &path);
succeed = base::PathService::Get(key, &path);
if (!succeed)
args->ThrowError("Failed to get '" + name + "' path");
return path;
Expand All @@ -853,7 +857,8 @@ void App::SetPath(mate::Arguments* args,
bool succeed = false;
int key = GetPathConstant(name);
if (key >= 0)
succeed = PathService::OverrideAndCreateIfNeeded(key, path, true, false);
succeed =
base::PathService::OverrideAndCreateIfNeeded(key, path, true, false);
if (!succeed)
args->ThrowError("Failed to set path");
}
Expand Down Expand Up @@ -885,7 +890,7 @@ bool App::RequestSingleInstanceLock() {
return true;

base::FilePath user_dir;
PathService::Get(brightray::DIR_USER_DATA, &user_dir);
base::PathService::Get(brightray::DIR_USER_DATA, &user_dir);

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

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

if (exec_path.empty()) {
base::FilePath current_exe_path;
PathService::Get(base::FILE_EXE, &current_exe_path);
base::PathService::Get(base::FILE_EXE, &current_exe_path);
argv.push_back(current_exe_path.value());
} else {
argv.push_back(exec_path.value());
Expand Down Expand Up @@ -1188,7 +1193,7 @@ void App::EnableMixedSandbox(mate::Arguments* args) {
}

auto* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(::switches::kNoSandbox)) {
if (command_line->HasSwitch(service_manager::switches::kNoSandbox)) {
#if defined(OS_WIN)
const base::CommandLine::CharType* noSandboxArg = L"--no-sandbox";
#else
Expand Down
10 changes: 6 additions & 4 deletions atom/browser/api/atom_api_app.h
Expand Up @@ -162,10 +162,12 @@ class App : public AtomBrowserClient::Delegate,
const content::ChildProcessData& data) override;
void BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) override;
void BrowserChildProcessCrashed(const content::ChildProcessData& data,
int exit_code) override;
void BrowserChildProcessKilled(const content::ChildProcessData& data,
int exit_code) override;
void BrowserChildProcessCrashed(
const content::ChildProcessData& data,
const content::ChildProcessTerminationInfo& info) override;
void BrowserChildProcessKilled(
const content::ChildProcessData& data,
const content::ChildProcessTerminationInfo& info) override;

private:
void SetAppPath(const base::FilePath& app_path);
Expand Down
3 changes: 1 addition & 2 deletions atom/browser/api/atom_api_menu_mac.mm
Expand Up @@ -97,8 +97,7 @@

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

// One of the events that could be pumped is |window.close()|.
// User-initiated event-tracking loops protect against this by
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_session.cc
Expand Up @@ -396,7 +396,7 @@ void ClearAuthCacheInIO(
options.origin, options.realm, options.auth_scheme,
net::AuthCredentials(options.username, options.password));
} else {
auth_cache->ClearEntriesAddedWithin(base::TimeDelta::Max());
auth_cache->ClearAllEntries();
}
} else if (options.type == "clientCertificate") {
auto* client_auth_cache = network_session->ssl_client_auth_cache();
Expand Down
47 changes: 25 additions & 22 deletions atom/browser/api/atom_api_web_contents.cc
Expand Up @@ -362,7 +362,7 @@ WebContents::WebContents(v8::Isolate* isolate,
}
session_.Reset(isolate, session.ToV8());

content::WebContents* web_contents;
std::unique_ptr<content::WebContents> web_contents;
if (IsGuest()) {
scoped_refptr<content::SiteInstance> site_instance =
content::SiteInstance::CreateForURL(session->browser_context(),
Expand Down Expand Up @@ -405,7 +405,7 @@ WebContents::WebContents(v8::Isolate* isolate,
web_contents = content::WebContents::Create(params);
}

InitWithSessionAndOptions(isolate, web_contents, session, options);
InitWithSessionAndOptions(isolate, web_contents.release(), session, options);
}

void WebContents::InitZoomController(content::WebContents* web_contents,
Expand Down Expand Up @@ -537,16 +537,17 @@ void WebContents::WebContentsCreated(content::WebContents* source_contents,
Emit("-web-contents-created", api_web_contents, target_url, frame_name);
}

void WebContents::AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
bool* was_blocked) {
new ChildWebContentsTracker(new_contents);
void WebContents::AddNewContents(
content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
bool* was_blocked) {
new ChildWebContentsTracker(new_contents.get());
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
auto api_web_contents = CreateFrom(isolate(), new_contents);
auto api_web_contents = CreateFrom(isolate(), new_contents.release());
if (Emit("-add-new-contents", api_web_contents, disposition, user_gesture,
initial_rect.x(), initial_rect.y(), initial_rect.width(),
initial_rect.height())) {
Expand Down Expand Up @@ -641,21 +642,25 @@ content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent(
return content::KeyboardEventProcessingResult::NOT_HANDLED;
}

void WebContents::EnterFullscreenModeForTab(content::WebContents* source,
const GURL& origin) {
void WebContents::EnterFullscreenModeForTab(
content::WebContents* source,
const GURL& origin,
const blink::WebFullscreenOptions& options) {
auto* permission_helper =
WebContentsPermissionHelper::FromWebContents(source);
auto callback = base::Bind(&WebContents::OnEnterFullscreenModeForTab,
base::Unretained(this), source, origin);
base::Unretained(this), source, origin, options);
permission_helper->RequestFullscreenPermission(callback);
}

void WebContents::OnEnterFullscreenModeForTab(content::WebContents* source,
const GURL& origin,
bool allowed) {
void WebContents::OnEnterFullscreenModeForTab(
content::WebContents* source,
const GURL& origin,
const blink::WebFullscreenOptions& options,
bool allowed) {
if (!allowed)
return;
CommonWebContentsDelegate::EnterFullscreenModeForTab(source, origin);
CommonWebContentsDelegate::EnterFullscreenModeForTab(source, origin, options);
Emit("enter-html-full-screen");
}

Expand Down Expand Up @@ -757,8 +762,7 @@ content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager(
return dialog_manager_.get();
}

void WebContents::OnAudioStateChanged(content::WebContents* web_contents,
bool audible) {
void WebContents::OnAudioStateChanged(bool audible) {
Emit("-audio-state-changed", audible);
}

Expand Down Expand Up @@ -1103,7 +1107,7 @@ int WebContents::GetProcessID() const {

base::ProcessId WebContents::GetOSProcessID() const {
base::ProcessHandle process_handle =
web_contents()->GetMainFrame()->GetProcess()->GetHandle();
web_contents()->GetMainFrame()->GetProcess()->GetProcess().Handle();
return base::GetProcId(process_handle);
}

Expand Down Expand Up @@ -1688,8 +1692,7 @@ void WebContents::StartDrag(const mate::Dictionary& item,

// Start dragging.
if (!files.empty()) {
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
base::MessageLoop::ScopedNestableTaskAllower allow;
DragFileItems(files, icon->image(), web_contents()->GetNativeView());
} else {
args->ThrowError("Must specify either 'file' or 'files' option");
Expand Down