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

chore: update to chromium 75.0.3740.3 #17507

Merged
merged 37 commits into from Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7116c10
chore: update to chromium 75.0.3740.3
nornagon Mar 21, 2019
0f990c3
update boringssl patches
nornagon Mar 21, 2019
2dc4222
update chromium patches
nornagon Mar 21, 2019
9cc4cb2
download gn from cipd instead of GCS
nornagon Mar 21, 2019
e2f0852
fixup! download gn from cipd instead of GCS
nornagon Mar 21, 2019
9819433
fixup! download gn from cipd instead of GCS
nornagon Mar 21, 2019
47d5f9f
add //ui/base/idle dep
nornagon Mar 22, 2019
e44b526
add extra arguments to HandleExternalProtocol
nornagon Mar 22, 2019
50b9933
build: update circle base image and mac docs for 10.13 SDK
MarshallOfSound Mar 22, 2019
406ceaa
chore: update permission_status.h include for new path
MarshallOfSound Mar 22, 2019
2bf740d
fix: remove enable_data_url_support from OnNetworkServiceCreated
MarshallOfSound Mar 22, 2019
f95de3d
fix: RFH->ExecuteJavascript now requires a callback
MarshallOfSound Mar 22, 2019
ab92cfd
fix: enable_file_url_support and enable_data_url_support have been
MarshallOfSound Mar 22, 2019
74ac80e
fix: ViewHierarchyChangedDetails moved to the views namespace
MarshallOfSound Mar 22, 2019
7467e91
fix: RFH->ExecuteJavascriptForTesting now requires a callback
MarshallOfSound Mar 22, 2019
866cbb0
fix: SetCanonicalCookieAsync now takes the full CookieOptions
MarshallOfSound Mar 22, 2019
7382c51
fix: Add stub implementations for ScheduleTrigger and
MarshallOfSound Mar 22, 2019
158e41e
chore: add missing content:: namespace for BrowserContext in Platform…
MarshallOfSound Mar 22, 2019
1266398
Revert "device/fido/mac: add more specific check for TouchID availabi…
MarshallOfSound Mar 22, 2019
b429e6e
chore: disable clang-format and cpplint for impl of HandleExternalPro…
MarshallOfSound Mar 22, 2019
04a8b9f
fix: base::LaunchOptions environ is now environment
MarshallOfSound Mar 22, 2019
ab66c4b
fixme: IsNearDeath has been removed upstream
MarshallOfSound Mar 22, 2019
90a738a
fix: _ASSERT is not defined anymore, the appropriate replacement is D…
MarshallOfSound Mar 22, 2019
b965abf
chore: replace DCHECK(a > b) with DCHECK_GT
MarshallOfSound Mar 22, 2019
515c927
fixup! enable_file_url_support and enable_data_url_support have been …
deepak1556 Mar 22, 2019
30448bb
build: allow zip files to be created larger than 2GB
MarshallOfSound Mar 22, 2019
0fd0b3f
chore: make DCHECK available in win7 toast impl
MarshallOfSound Mar 22, 2019
43dc4e8
chore: include what we use, cmath in toast.cc
MarshallOfSound Mar 22, 2019
e352d73
fix: use default constructor for NotificationData struct
MarshallOfSound Mar 22, 2019
7e9a271
don't copy in make_shared in win32_desktop_notifications
nornagon Mar 22, 2019
fe06784
build: disable the custom libcxx on Windows
MarshallOfSound Mar 25, 2019
a34c47b
build: do not use custom libcxx on windows
MarshallOfSound Mar 29, 2019
2fda0bd
chore: enable_data_url_support does not exist anymore
MarshallOfSound Mar 29, 2019
d1a7b42
chore: disable custom libcxx on windows
MarshallOfSound Mar 29, 2019
63d6be0
chore: add patch to fix MSVC++ incompatibilty on Windows
MarshallOfSound Apr 2, 2019
76d584c
build: force a windows CI run
MarshallOfSound Apr 3, 2019
a65f242
chore: fixup ismediakey patch for lost changes
MarshallOfSound Apr 3, 2019
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
11 changes: 7 additions & 4 deletions .circleci/config.yml
Expand Up @@ -505,12 +505,15 @@ steps-lint: &steps-lint
name: Download GN Binary
command: |
chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)"
gn_version="$(curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/DEPS?format=TEXT" | base64 -d | grep gn_version | head -n1 | cut -d\' -f4)"

mkdir -p "buildtools/linux64"
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/linux64/gn.sha1?format=TEXT" | base64 -d > "buildtools/linux64/gn.sha1"
echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/buildtools"' >> $BASH_ENV
cipd ensure -ensure-file - -root . <<-CIPD
\$ServiceURL https://chrome-infra-packages.appspot.com/
@Subdir buildtools/linux64
gn/gn/linux-amd64 $gn_version
CIPD

download_from_google_storage --bucket chromium-gn -s "buildtools/linux64/gn.sha1"
echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/buildtools"' >> $BASH_ENV
- run:
name: Run Lint
command: |
Expand Down
1 change: 1 addition & 0 deletions BUILD.gn
Expand Up @@ -427,6 +427,7 @@ static_library("electron_lib") {
"//third_party/libyuv",
"//third_party/webrtc_overrides:init_webrtc",
"//third_party/widevine/cdm:headers",
"//ui/base/idle",
"//ui/events:dom_keycode_converter",
"//ui/gl",
"//ui/native_theme",
Expand Down
2 changes: 1 addition & 1 deletion DEPS
Expand Up @@ -10,7 +10,7 @@ gclient_gn_args = [

vars = {
'chromium_version':
'74.0.3729.58',
'75.0.3740.3',
'node_version':
'2dc0f8811b2b295c08d797b8a11b030234c98502',

Expand Down
6 changes: 5 additions & 1 deletion atom/browser/api/atom_api_cookies.cc
Expand Up @@ -303,8 +303,12 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
EXCLUDE_FAILURE_TO_STORE);
return;
}
net::CookieOptions options;
if (http_only) {
options.set_include_httponly();
}
GetCookieStore(getter)->SetCanonicalCookieAsync(
std::move(canonical_cookie), url.scheme(), http_only,
std::move(canonical_cookie), url.scheme(), options,
std::move(completion_callback));
}

Expand Down
6 changes: 5 additions & 1 deletion atom/browser/atom_browser_client.cc
Expand Up @@ -830,7 +830,11 @@ bool AtomBrowserClient::HandleExternalProtocol(
ui::PageTransition page_transition,
bool has_user_gesture,
const std::string& method,
const net::HttpRequestHeaders& headers) {
const net::HttpRequestHeaders& headers,
network::mojom::URLLoaderFactoryRequest* factory_request,
// clang-format off
network::mojom::URLLoaderFactory*& out_factory) { // NOLINT
deepak1556 marked this conversation as resolved.
Show resolved Hide resolved
// clang-format on
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::UI},
base::BindOnce(&HandleExternalProtocolInUI, url, web_contents_getter,
Expand Down
7 changes: 6 additions & 1 deletion atom/browser/atom_browser_client.h
Expand Up @@ -172,7 +172,12 @@ class AtomBrowserClient : public content::ContentBrowserClient,
ui::PageTransition page_transition,
bool has_user_gesture,
const std::string& method,
const net::HttpRequestHeaders& headers) override;
const net::HttpRequestHeaders& headers,
network::mojom::URLLoaderFactoryRequest* factory_request,
// clang-format off
network::mojom::URLLoaderFactory*& out_factory) // NOLINT
// clang-format on
override;

private:
struct ProcessPreferences {
Expand Down
3 changes: 3 additions & 0 deletions atom/browser/io_thread.cc
Expand Up @@ -40,6 +40,9 @@ void IOThread::Init() {
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
std::make_unique<network::URLRequestContextBuilderMojo>();

// Enable file:// support.
builder->set_file_enabled(true);

auto cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
net::CertVerifyProc::CreateDefault()));
Expand Down
16 changes: 16 additions & 0 deletions atom/browser/mac/atom_application.h
Expand Up @@ -17,6 +17,22 @@
- (void)setAppearance:(NSAppearance*)appearance API_AVAILABLE(macosx(10.14));
@end

#if !defined(MAC_OS_X_VERSION_10_13_2)

// forward declare Touch ID APIs
typedef NS_ENUM(NSInteger, LABiometryType) {
LABiometryTypeNone = 0,
LABiometryTypeFaceID = 1,
LABiometryTypeTouchID = 2,
} API_AVAILABLE(macosx(10.13.2));

@interface LAContext (HighSierraPointTwoSDK)
@property(nonatomic, readonly)
LABiometryType biometryType API_AVAILABLE(macosx(10.13.2));
@end

#endif

// forward declare Access APIs
typedef NSString* AVMediaType NS_EXTENSIBLE_STRING_ENUM;

Expand Down
3 changes: 0 additions & 3 deletions atom/browser/net/network_context_service.cc
Expand Up @@ -80,9 +80,6 @@ NetworkContextService::CreateNetworkContextParams(bool in_memory,
network_context_params->enable_ftp_url_support = true;
#endif // !BUILDFLAG(DISABLE_FTP_SUPPORT)

// Needed for PAC scripts that use data URLs.
network_context_params->enable_data_url_support = true;

proxy_config_monitor_.AddToNetworkContextParams(network_context_params.get());

BrowserProcessImpl::ApplyProxyModeFromCommandLine(
Expand Down
5 changes: 0 additions & 5 deletions atom/browser/net/system_network_context_manager.cc
Expand Up @@ -249,11 +249,6 @@ SystemNetworkContextManager::CreateNetworkContextParams() {

network_context_params->http_cache_enabled = false;

// These are needed for PAC scripts that use file or data URLs (Or FTP URLs?).
// TODO(crbug.com/839566): remove file support for all cases.
network_context_params->enable_data_url_support = true;
if (!base::FeatureList::IsEnabled(network::features::kNetworkService))
network_context_params->enable_file_url_support = true;
#if !BUILDFLAG(DISABLE_FTP_SUPPORT)
network_context_params->enable_ftp_url_support = true;
#endif
Expand Down
6 changes: 4 additions & 2 deletions atom/browser/net/url_request_context_getter.cc
Expand Up @@ -156,8 +156,6 @@ URLRequestContextGetter::Handle::CreateNetworkContextParams() {
net::HttpUtil::GenerateAcceptLanguageHeader(
AtomBrowserClient::Get()->GetApplicationLocale());

network_context_params->enable_data_url_support = false;

if (!browser_context_->IsOffTheRecord()) {
auto base_path = browser_context_->GetPath();
network_context_params->http_cache_path =
Expand Down Expand Up @@ -263,6 +261,10 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
if (!url_request_context_) {
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
std::make_unique<network::URLRequestContextBuilderMojo>();

// Enable file:// support.
builder->set_file_enabled(true);

auto network_delegate = std::make_unique<AtomNetworkDelegate>();
network_delegate_ = network_delegate.get();
builder->set_network_delegate(std::move(network_delegate));
Expand Down
9 changes: 9 additions & 0 deletions atom/browser/notifications/platform_notification_service.cc
Expand Up @@ -134,4 +134,13 @@ void PlatformNotificationService::RecordNotificationUkmEvent(
content::BrowserContext* browser_context,
const content::NotificationDatabaseData& data) {}

void PlatformNotificationService::ScheduleTrigger(
content::BrowserContext* browser_context,
base::Time timestamp) {}
deepak1556 marked this conversation as resolved.
Show resolved Hide resolved

base::Time PlatformNotificationService::ReadNextTriggerTimestamp(
content::BrowserContext* browser_context) {
return base::Time::Max();
}

} // namespace atom
4 changes: 4 additions & 0 deletions atom/browser/notifications/platform_notification_service.h
Expand Up @@ -49,6 +49,10 @@ class PlatformNotificationService
void RecordNotificationUkmEvent(
content::BrowserContext* browser_context,
const content::NotificationDatabaseData& data) override;
void ScheduleTrigger(content::BrowserContext* browser_context,
base::Time timestamp) override;
base::Time ReadNextTriggerTimestamp(
content::BrowserContext* browser_context) override;

private:
AtomBrowserClient* browser_client_;
Expand Down
Expand Up @@ -126,7 +126,7 @@ LRESULT CALLBACK DesktopNotificationController::WndProc(HWND hwnd,
}

void DesktopNotificationController::StartAnimation() {
_ASSERT(hwnd_controller_);
DCHECK(hwnd_controller_);

if (!is_animating_ && hwnd_controller_) {
// NOTE: 15ms is shorter than what we'd need for 60 fps, but since
Expand Down Expand Up @@ -217,7 +217,7 @@ void DesktopNotificationController::AnimateAll() {
}

if (!keep_animating) {
_ASSERT(hwnd_controller_);
DCHECK(hwnd_controller_);
if (hwnd_controller_)
KillTimer(hwnd_controller_, TimerID_Animate);
is_animating_ = false;
Expand Down Expand Up @@ -325,7 +325,7 @@ void DesktopNotificationController::CreateToast(NotificationLink&& data) {
int toast_pos = 0;
if (!instances_.empty()) {
auto& item = instances_.back();
_ASSERT(item.hwnd);
DCHECK(item.hwnd);

ScreenMetrics scr;
auto* toast = Toast::Get(item.hwnd);
Expand Down Expand Up @@ -379,7 +379,7 @@ DesktopNotificationController::Notification::Notification(
DesktopNotificationController::Notification::Notification(
const shared_ptr<NotificationData>& data)
: data_(data) {
_ASSERT(data != nullptr);
DCHECK(data != nullptr);
}

DesktopNotificationController::Notification::~Notification() = default;
Expand All @@ -391,7 +391,7 @@ bool DesktopNotificationController::Notification::operator==(

void DesktopNotificationController::Notification::Close() {
// No business calling this when not pointing to a valid instance
_ASSERT(data_);
DCHECK(data_);

if (data_->controller)
data_->controller->CloseNotification(*this);
Expand All @@ -401,7 +401,7 @@ void DesktopNotificationController::Notification::Set(std::wstring caption,
std::wstring body_text,
HBITMAP image) {
// No business calling this when not pointing to a valid instance
_ASSERT(data_);
DCHECK(data_);

// Do nothing when the notification has been closed
if (!data_->controller)
Expand Down
Expand Up @@ -13,6 +13,7 @@
#include <uxtheme.h>
#include <windowsx.h>
#include <algorithm>
#include <cmath>
#include <memory>

#include "atom/browser/notifications/win/win32_desktop_notifications/common.h"
Expand Down
Expand Up @@ -9,6 +9,8 @@

#include "atom/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h"

#include "base/logging.h"

namespace atom {

class DesktopNotificationController::Toast {
Expand Down Expand Up @@ -42,7 +44,7 @@ class DesktopNotificationController::Toast {
return ease_in_active_ || ease_out_active_ || IsStackCollapseActive();
}
bool IsHighlighted() const {
_ASSERT(!(is_highlighted_ && !IsWindowVisible(hwnd_)));
DCHECK(!(is_highlighted_ && !IsWindowVisible(hwnd_)));
return is_highlighted_;
}

Expand Down
Expand Up @@ -31,7 +31,7 @@ ULONG DesktopNotificationController::Toast::UIAutomationInterface::Release() {
delete this;
return 0;
}
_ASSERT(ret > 0);
DCHECK_GT(ret, 0);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion atom/browser/ui/cocoa/delayed_native_view_host.cc
Expand Up @@ -12,7 +12,7 @@ DelayedNativeViewHost::DelayedNativeViewHost(gfx::NativeView native_view)
DelayedNativeViewHost::~DelayedNativeViewHost() {}

void DelayedNativeViewHost::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) {
const views::ViewHierarchyChangedDetails& details) {
NativeViewHost::ViewHierarchyChanged(details);
if (details.is_add && GetWidget())
Attach(native_view_);
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/ui/cocoa/delayed_native_view_host.h
Expand Up @@ -18,7 +18,7 @@ class DelayedNativeViewHost : public views::NativeViewHost {

// views::View:
void ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) override;
const views::ViewHierarchyChangedDetails& details) override;

private:
gfx::NativeView native_view_;
Expand Down
11 changes: 7 additions & 4 deletions atom/browser/ui/inspectable_web_contents_impl.cc
Expand Up @@ -429,7 +429,7 @@ void InspectableWebContentsImpl::CallClientFunction(
}
javascript.append(");");
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(
base::UTF8ToUTF16(javascript));
base::UTF8ToUTF16(javascript), base::NullCallback());
}

gfx::Rect InspectableWebContentsImpl::GetDevToolsBounds() const {
Expand Down Expand Up @@ -476,7 +476,8 @@ void InspectableWebContentsImpl::LoadCompleted() {
}
base::string16 javascript = base::UTF8ToUTF16(
"Components.dockController.setDockSide(\"" + dock_state_ + "\");");
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(javascript);
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(
javascript, base::NullCallback());
}

if (view_->GetDelegate())
Expand Down Expand Up @@ -738,7 +739,8 @@ void InspectableWebContentsImpl::DispatchProtocolMessage(
if (message.length() < kMaxMessageChunkSize) {
base::string16 javascript =
base::UTF8ToUTF16("DevToolsAPI.dispatchMessage(" + message + ");");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol really, we don't escape this string at all?

GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(javascript);
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(
javascript, base::NullCallback());
return;
}

Expand Down Expand Up @@ -887,7 +889,8 @@ void InspectableWebContentsImpl::DidFinishNavigation(
base::GenerateGUID().c_str());
// Invoking content::DevToolsFrontendHost::SetupExtensionsAPI(frame, script);
// should be enough, but it seems to be a noop currently.
frame->ExecuteJavaScriptForTests(base::UTF8ToUTF16(script));
frame->ExecuteJavaScriptForTests(base::UTF8ToUTF16(script),
base::NullCallback());
}

void InspectableWebContentsImpl::SendMessageAck(int request_id,
Expand Down
2 changes: 1 addition & 1 deletion atom/common/native_mate_converters/content_converter.h
Expand Up @@ -12,7 +12,7 @@
#include "content/public/common/referrer.h"
#include "content/public/common/stop_find_action.h"
#include "native_mate/converter.h"
#include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"

namespace content {
struct ContextMenuParams;
Expand Down
2 changes: 1 addition & 1 deletion atom/common/platform_util_linux.cc
Expand Up @@ -27,7 +27,7 @@ bool XDGUtilV(const std::vector<std::string>& argv, const bool wait_for_exit) {
// to a command that needs a terminal. Set the environment variable telling
// it that we definitely don't have a terminal available and that it should
// bring up a new terminal if necessary. See "man mailcap".
options.environ["MM_NOTTTY"] = "1";
options.environment["MM_NOTTTY"] = "1";

base::Process process = base::LaunchProcess(argv, options);
if (!process.IsValid())
Expand Down
2 changes: 1 addition & 1 deletion build/zip.py
Expand Up @@ -52,7 +52,7 @@ def main(argv):
if sys.platform == 'darwin':
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
else:
with zipfile.ZipFile(dist_zip, 'w', zipfile.ZIP_DEFLATED) as z:
with zipfile.ZipFile(dist_zip, 'w', zipfile.ZIP_DEFLATED, True) as z:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with zipfile.ZipFile(dist_zip, 'w', zipfile.ZIP_DEFLATED, True) as z:
with zipfile.ZipFile(dist_zip, 'w', zipfile.ZIP_DEFLATED, allowZip64=True) as z:

for dep in dist_files:
if skip_path(dep, dist_zip, target_cpu):
continue
Expand Down
4 changes: 2 additions & 2 deletions docs/development/build-instructions-macos.md
Expand Up @@ -5,7 +5,7 @@ Follow the guidelines below for building Electron on macOS.
## Prerequisites

* macOS >= 10.11.6
* [Xcode](https://developer.apple.com/technologies/tools/) >= 8.2.1
* [Xcode](https://developer.apple.com/technologies/tools/) >= 9.0.0
* [node.js](https://nodejs.org) (external)
* Python 2.7 with support for TLS 1.2

Expand Down Expand Up @@ -36,7 +36,7 @@ the following Python modules:
If you're developing Electron and don't plan to redistribute your
custom Electron build, you may skip this section.

Official Electron builds are built with [Xcode 8.3.3](http://adcdownload.apple.com/Developer_Tools/Xcode_8.3.3/Xcode_8.3.3.xip), and the MacOS 10.12 SDK. Building with a newer SDK works too, but the releases currently use the 10.12 SDK.
Official Electron builds are built with [Xcode 9.4.1](http://adcdownload.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip), and the MacOS 10.13 SDK. Building with a newer SDK works too, but the releases currently use the 10.13 SDK.

## Building Electron

Expand Down
1 change: 0 additions & 1 deletion patches/common/boringssl/.patches
@@ -1,3 +1,2 @@
expose_ripemd160.patch
expose_aes-cfb.patch
handle_pub_key_null_in_ec_key_set_public_key.patch

This file was deleted.