Skip to content

Commit

Permalink
Merge pull request #15405 from electron/chromium-upgrade/70
Browse files Browse the repository at this point in the history
feat: upgrade to Chromium 70.0.3538.110
  • Loading branch information
MarshallOfSound committed Dec 3, 2018
2 parents a33eeda + 8ec3bc0 commit 3ddd917
Show file tree
Hide file tree
Showing 165 changed files with 1,660 additions and 4,738 deletions.
4 changes: 4 additions & 0 deletions BUILD.gn
Expand Up @@ -247,13 +247,15 @@ static_library("electron_lib") {
"//components/network_session_configurator/common",
"//components/prefs",
"//components/spellcheck/renderer",
"//components/viz/host",
"//components/viz/service",
"//content/public/app:both",
"//content/public/browser",
"//content/public/child",
"//content/public/common:service_names",
"//content/shell:copy_shell_resources",
"//gin",
"//media/capture/mojom:video_capture",
"//media/mojo/interfaces",
"//net:extras",
"//net:net_resources",
Expand All @@ -263,6 +265,7 @@ static_library("electron_lib") {
"//ppapi/shared_impl",
"//services/device/public/mojom",
"//services/proxy_resolver:lib",
"//services/viz/privileged/interfaces/compositing",
"//skia",
"//third_party/blink/public:blink",
"//third_party/boringssl",
Expand Down Expand Up @@ -385,6 +388,7 @@ static_library("electron_lib") {
":libnotify_loader",
"//build/config/linux/gtk",
"//chrome/browser/ui/libgtkui",
"//dbus",
"//device/bluetooth",
"//ui/events/devices/x11",
"//ui/events/platform/x11",
Expand Down
4 changes: 2 additions & 2 deletions DEPS
Expand Up @@ -10,9 +10,9 @@ gclient_gn_args = [

vars = {
'chromium_version':
'69.0.3497.106',
'70.0.3538.110',
'node_version':
'4d44266b78256449dd6ae86e419e3ec07257b569',
'1b192088522d10d126e5bb9316adae2a97add62a',

'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b',
'pyyaml_version': '3.12',
Expand Down
2 changes: 1 addition & 1 deletion atom/app/atom_main_delegate.cc
Expand Up @@ -219,7 +219,7 @@ void AtomMainDelegate::PreSandboxStartup() {
#endif
}

void AtomMainDelegate::PreContentInitialization() {
void AtomMainDelegate::PreCreateMainMessageLoop() {
#if defined(OS_MACOSX)
RegisterAtomCrApp();
#endif
Expand Down
2 changes: 1 addition & 1 deletion atom/app/atom_main_delegate.h
Expand Up @@ -24,7 +24,7 @@ class AtomMainDelegate : public content::ContentMainDelegate {
// content::ContentMainDelegate:
bool BasicStartupComplete(int* exit_code) override;
void PreSandboxStartup() override;
void PreContentInitialization() override;
void PreCreateMainMessageLoop() override;
content::ContentBrowserClient* CreateContentBrowserClient() override;
content::ContentRendererClient* CreateContentRendererClient() override;
content::ContentUtilityClient* CreateContentUtilityClient() override;
Expand Down
2 changes: 1 addition & 1 deletion atom/app/node_main.cc
Expand Up @@ -16,7 +16,7 @@
#include "atom/common/node_bindings.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/task_scheduler/task_scheduler.h"
#include "base/task/task_scheduler/task_scheduler.h"
#include "base/threading/thread_task_runner_handle.h"
#include "gin/array_buffer.h"
#include "gin/public/isolate_holder.h"
Expand Down
8 changes: 4 additions & 4 deletions atom/browser/api/atom_api_app.cc
Expand Up @@ -788,24 +788,24 @@ void App::OnGpuProcessCrashed(base::TerminationStatus status) {

void App::BrowserChildProcessLaunchedAndConnected(
const content::ChildProcessData& data) {
ChildProcessLaunched(data.process_type, data.handle);
ChildProcessLaunched(data.process_type, data.GetHandle());
}

void App::BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) {
ChildProcessDisconnected(base::GetProcId(data.handle));
ChildProcessDisconnected(base::GetProcId(data.GetHandle()));
}

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

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

void App::RenderProcessReady(content::RenderProcessHost* host) {
Expand Down
3 changes: 2 additions & 1 deletion atom/browser/api/atom_api_browser_window.cc
Expand Up @@ -20,6 +20,7 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "gin/converter.h"
#include "native_mate/dictionary.h"
#include "ui/gl/gpu_switching_manager.h"

Expand Down Expand Up @@ -311,7 +312,7 @@ void BrowserWindow::SetBrowserView(v8::Local<v8::Value> value) {

void BrowserWindow::SetVibrancy(v8::Isolate* isolate,
v8::Local<v8::Value> value) {
std::string type = mate::V8ToString(value);
std::string type = gin::V8ToString(isolate, value);

auto* render_view_host = web_contents()->GetRenderViewHost();
if (render_view_host) {
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_menu.cc
Expand Up @@ -90,7 +90,7 @@ void Menu::ExecuteCommand(int command_id, int flags) {
command_id);
}

void Menu::MenuWillShow(ui::SimpleMenuModel* source) {
void Menu::OnMenuWillShow(ui::SimpleMenuModel* source) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
menu_will_show_.Run(GetWrapper());
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_menu.h
Expand Up @@ -53,7 +53,7 @@ class Menu : public mate::TrackableObject<Menu>,
ui::Accelerator* accelerator) const override;
bool ShouldRegisterAcceleratorForCommandId(int command_id) const override;
void ExecuteCommand(int command_id, int event_flags) override;
void MenuWillShow(ui::SimpleMenuModel* source) override;
void OnMenuWillShow(ui::SimpleMenuModel* source) override;

virtual void PopupAt(TopLevelWindow* window,
int x,
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_power_save_blocker.cc
Expand Up @@ -6,7 +6,7 @@

#include <string>

#include "base/task_scheduler/post_task.h"
#include "base/task/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/common/service_manager_connection.h"
#include "native_mate/dictionary.h"
Expand Down
9 changes: 5 additions & 4 deletions atom/browser/api/atom_api_session.cc
Expand Up @@ -359,7 +359,7 @@ void DestroyGlobalHandle(v8::Isolate* isolate,
if (!global_handle.IsEmpty()) {
v8::Local<v8::Value> local_handle = global_handle.Get(isolate);
if (local_handle->IsObject()) {
v8::Local<v8::Object> object = local_handle->ToObject();
v8::Local<v8::Object> object = local_handle->ToObject(isolate);
void* ptr = object->GetAlignedPointerFromInternalField(0);
if (!ptr)
return;
Expand Down Expand Up @@ -471,13 +471,14 @@ void Session::SetProxy(const mate::Dictionary& options,
if (!pac_url.empty()) {
browser_context_->in_memory_pref_store()->SetValue(
proxy_config::prefs::kProxy,
ProxyConfigDictionary::CreatePacScript(pac_url,
true /* pac_mandatory */),
std::make_unique<base::Value>(ProxyConfigDictionary::CreatePacScript(
pac_url, true /* pac_mandatory */)),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
} else {
browser_context_->in_memory_pref_store()->SetValue(
proxy_config::prefs::kProxy,
ProxyConfigDictionary::CreateFixedServers(proxy_rules, bypass_list),
std::make_unique<base::Value>(ProxyConfigDictionary::CreateFixedServers(
proxy_rules, bypass_list)),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}

Expand Down
6 changes: 4 additions & 2 deletions atom/browser/api/atom_api_top_level_window.cc
Expand Up @@ -20,6 +20,7 @@
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/options_switches.h"
#include "electron/buildflags/buildflags.h"
#include "gin/converter.h"
#include "native_mate/handle.h"
#include "native_mate/persistent_dictionary.h"

Expand Down Expand Up @@ -643,7 +644,8 @@ void TopLevelWindow::SetFocusable(bool focusable) {
void TopLevelWindow::SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> value) {
mate::Handle<Menu> menu;
if (value->IsObject() &&
mate::V8ToString(value->ToObject()->GetConstructorName()) == "Menu" &&
gin::V8ToString(
isolate, value->ToObject(isolate)->GetConstructorName()) == "Menu" &&
mate::ConvertFromV8(isolate, value, &menu) && !menu.IsEmpty()) {
menu_.Reset(isolate, menu.ToV8());
window_->SetMenu(menu->model());
Expand Down Expand Up @@ -740,7 +742,7 @@ void TopLevelWindow::SetAutoHideCursor(bool auto_hide) {

void TopLevelWindow::SetVibrancy(v8::Isolate* isolate,
v8::Local<v8::Value> value) {
std::string type = mate::V8ToString(value);
std::string type = gin::V8ToString(isolate, value);
window_->SetVibrancy(type);
}

Expand Down
6 changes: 5 additions & 1 deletion atom/browser/api/atom_api_web_contents.h
Expand Up @@ -15,6 +15,7 @@
#include "atom/browser/common_web_contents_delegate.h"
#include "atom/browser/ui/autofill_popup.h"
#include "base/observer_list.h"
#include "base/observer_list_types.h"
#include "content/common/cursors/webcursor.h"
#include "content/public/browser/keyboard_event_processing_result.h"
#include "content/public/browser/web_contents.h"
Expand Down Expand Up @@ -60,10 +61,13 @@ namespace api {

// Certain events are only in WebContentsDelegate, provide our own Observer to
// dispatch those events.
class ExtendedWebContentsObserver {
class ExtendedWebContentsObserver : public base::CheckedObserver {
public:
virtual void OnCloseContents() {}
virtual void OnRendererResponsive() {}

protected:
~ExtendedWebContentsObserver() override {}
};

// Wrapper around the content::WebContents.
Expand Down
2 changes: 0 additions & 2 deletions atom/browser/api/atom_api_web_contents_view.cc
Expand Up @@ -36,8 +36,6 @@ class WebContentsViewRelay

} // namespace

DEFINE_WEB_CONTENTS_USER_DATA_KEY(WebContentsViewRelay);

namespace atom {

namespace api {
Expand Down
3 changes: 2 additions & 1 deletion atom/browser/api/event_emitter.h
Expand Up @@ -103,7 +103,8 @@ class EventEmitter : public Wrappable<T> {
v8::HandleScope handle_scope(isolate());
EmitEvent(isolate(), GetWrapper(), name, event, args...);
return event->Get(StringToV8(isolate(), "defaultPrevented"))
->BooleanValue();
->BooleanValue(isolate()->GetCurrentContext())
.ToChecked();
}

DISALLOW_COPY_AND_ASSIGN(EventEmitter);
Expand Down

0 comments on commit 3ddd917

Please sign in to comment.